init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat.Csatolmany
|
||||
{
|
||||
public class CsatolmanySimplifiedResponse : IEqualityComparer<CsatolmanySimplifiedResponse>
|
||||
{
|
||||
public HaziFeladatCsatolmanyUid Uid { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public bool Equals(CsatolmanySimplifiedResponse x, CsatolmanySimplifiedResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(CsatolmanySimplifiedResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.HaziFeladat.Csatolmany;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatDetailResponse : HaziFeladatListResponse
|
||||
{
|
||||
public IEnumerable<CsatolmanySimplifiedResponse> Csatolmanyok { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatGetRequest : IRequestUidFilter<HaziFeladatUid>
|
||||
{
|
||||
public HaziFeladatGetRequest(string uidRaw = null)
|
||||
{
|
||||
Uid = UidLogic.GetUid(uidRaw, UidConverter);
|
||||
}
|
||||
|
||||
public HaziFeladatUid Uid { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; } = true;
|
||||
|
||||
public static readonly Converter<string[], HaziFeladatUid> UidConverter = uidRaw => new HaziFeladatUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatListRequest : IValidatableObject, IModelValidacio<HaziFeladatListRequest>
|
||||
{
|
||||
public Dictionary<Predicate<HaziFeladatListRequest>, string> ModelValidaciok => new Dictionary<Predicate<HaziFeladatListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} érték!"
|
||||
},
|
||||
{
|
||||
x => x.DatumIg.HasValue && ((TimeSpan)(x.DatumIg - x.DatumTol)).Days > 21,
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de maximum 3 hetes intervallum kérdezhető le!"
|
||||
}
|
||||
};
|
||||
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatListResponse : IEqualityComparer<HaziFeladatListResponse>
|
||||
{
|
||||
public DateTime FeladasDatuma { get; set; }
|
||||
|
||||
public DateTime? HataridoDatuma { get; set; }
|
||||
|
||||
public DateTime RogzitesIdopontja { get; set; }
|
||||
|
||||
public HaziFeladatUid Uid { get; set; }
|
||||
|
||||
public bool IsMegoldva { get; set; }
|
||||
|
||||
public bool IsTanarRogzitette { get; set; }
|
||||
|
||||
public bool IsTanuloHaziFeladatEnabled { get; set; }
|
||||
|
||||
public bool IsBeadhato { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse RogzitoTanar { get; set; }
|
||||
|
||||
public string Szoveg { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public bool IsCsatolasEngedelyezes { get; set; }
|
||||
|
||||
public bool Equals(HaziFeladatListResponse x, HaziFeladatListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(HaziFeladatListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue