init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend;
|
||||
using Kreta.Naplo.Domain.V2.Interface;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Orarend
|
||||
{
|
||||
public class OraGetRequest : IGetRequest
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime DatumUtc { get; set; }
|
||||
|
||||
public static implicit operator OraGetRequestCo(OraGetRequest model) => new OraGetRequestCo
|
||||
{
|
||||
Hash = model.Hash,
|
||||
Datum = model.DatumUtc
|
||||
};
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Orarend
|
||||
{
|
||||
public class OraGetResponse
|
||||
{
|
||||
public int? OrarendiOraId { get; set; }
|
||||
public int? TanitasiOraId { get; set; }
|
||||
public NaploEnum Allapot { get; set; }
|
||||
public DateTime KezdeteUtc { get; set; }
|
||||
public DateTime VegeUtc { get; set; }
|
||||
public int? EvesOraszam { get; set; }
|
||||
public int? Oraszam { get; set; }
|
||||
public bool IsElmaradt { get; set; }
|
||||
public string Tema { get; set; }
|
||||
public int TantargyId { get; set; }
|
||||
public string TantargyNev { get; set; }
|
||||
public string TantargyKategoria { get; set; }
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
public string TeremNev { get; set; }
|
||||
public string HazifeladatSzovege { get; set; }
|
||||
public int? HazifeladatId { get; set; }
|
||||
public DateTime? HazifeladatHataridoUtc { get; set; }
|
||||
public TanarSimplifiedGetResponse OraTulajdonosTanar { get; set; }
|
||||
public int? HelyettesitoId { get; set; }
|
||||
|
||||
public static implicit operator OraGetResponse(OraGetResponseCo co) => new OraGetResponse
|
||||
{
|
||||
OrarendiOraId = co.OrarendiOraId,
|
||||
TanitasiOraId = co.TanitasiOraId,
|
||||
Allapot = NaploEnum.Create(co.Allapot),
|
||||
KezdeteUtc = co.Kezdete.ToUniversalTime(),
|
||||
VegeUtc = co.Vege.ToUniversalTime(),
|
||||
EvesOraszam = co.EvesOraszam,
|
||||
Oraszam = co.Oraszam,
|
||||
IsElmaradt = co.IsElmaradt,
|
||||
Tema = co.Tema,
|
||||
TantargyId = co.TantargyId,
|
||||
TantargyNev = co.TantargyNev,
|
||||
TantargyKategoria = co.TantargyKategoria,
|
||||
HelyettesitoId = co.HelyettesitoId,
|
||||
OsztalyCsoportId = co.OsztalyCsoportId,
|
||||
OsztalyCsoportNev = co.OsztalyCsoportNev,
|
||||
TeremNev = co.TeremNev,
|
||||
HazifeladatSzovege = CommonUtils.RemoveHtmlTags(co.HazifeladatSzovege),
|
||||
HazifeladatId = co.HazifeladatId,
|
||||
OraTulajdonosTanar = co.OraTulajdonosTanar,
|
||||
HazifeladatHataridoUtc = co.HazifeladatHatarido?.ToUniversalTime(),
|
||||
};
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
namespace Kreta.Naplo.Domain.V2.Model.Get.Orarend
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend;
|
||||
|
||||
public class TanarSimplifiedGetResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
|
||||
public static implicit operator TanarSimplifiedGetResponse(TanarSimplifiedGetResponseCo co) => co == null ? null : new TanarSimplifiedGetResponse
|
||||
{
|
||||
Id = co.Id,
|
||||
Nev = co.Nev
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user