init
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresListRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Végdátum (UTC ISO 8601, BE ShortDateTime-ra normalizálja) is még a lekérdezés része (zárt intervallumon működik a szűrés)
|
||||
/// </summary>
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Kezdő dátum (UTC ISO 8601, BE ShortDateTime-ra normalizálja) is már a lekérdezés része (zárt intervallumon működik a szűrés)
|
||||
/// </summary>
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Uid lista filter pontosvesszővel elválasztva
|
||||
/// </summary>
|
||||
public string Uids { get; set; }
|
||||
|
||||
public static implicit operator BejelentettSzamonkeresListRequest(BejelentettSzamonkeresListRequestDto dto)
|
||||
=> dto == null ? new BejelentettSzamonkeresListRequest() : new BejelentettSzamonkeresListRequest(dto.Uids)
|
||||
{
|
||||
DatumTol = dto.DatumTol?.Date,
|
||||
DatumIg = dto.DatumIg?.Date
|
||||
};
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres;
|
||||
using Kreta.Ellenorzo.Dto.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Ellenorzo.Dto.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Dto.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Dto.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Dto.VN.Utility;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresListResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasDatumaShortDateTime)]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasLetrehozasanakDatuma)]
|
||||
public DateTime BejelentesDatuma { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitastRogzitoTanarNeve)]
|
||||
public string RogzitoTanarNeve { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasOraszamaAzAdottNapon)]
|
||||
public int OrarendiOraOraszama { get; set; }
|
||||
|
||||
////[Required, Description(DescriptionLookUp.EntitasMelyikNapraEsik)]
|
||||
////public AdatszotarResponseDto<HetNapjaTipusEnum> HetNapja { get; set; }
|
||||
[Required, Description(DescriptionLookUp.EntitashozRogzitettTantargy)]
|
||||
public TantargyResponseDto Tantargy { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitashozRogzitettTantargyNeve)]
|
||||
public string TantargyNeve { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.BejelentettSzamonkeresTemaja)]
|
||||
public string Temaja { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasModja)]
|
||||
public AdatszotarResponseDto<ErtekelesModEnum> Modja { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitashozRogzitettOsztalyCsoport)]
|
||||
public OsztalyCsoportSimplifiedResponseDto OsztalyCsoport { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"ListBejelentettSzamonkeres",
|
||||
new BejelentettSzamonkeresListRequestDto
|
||||
{
|
||||
Uids = $"10460{Constant.UidDelimiter}10461",
|
||||
DatumTol = new DateTime(2021, 9, 2, 0, 0, 0),
|
||||
DatumIg = new DateTime(2021, 9, 21, 0, 0, 0)
|
||||
});
|
||||
|
||||
public static implicit operator BejelentettSzamonkeresListResponseDto(BejelentettSzamonkeresListResponse model) => new BejelentettSzamonkeresListResponseDto
|
||||
{
|
||||
Uid = model.Uid.UidRaw,
|
||||
Datum = model.Datum.ToIso8601Utc(),
|
||||
BejelentesDatuma = model.BejelentesDatuma.ToIso8601Utc(),
|
||||
////HetNapja = AdatszotarResponseDto<HetNapjaTipusEnum>.Create(model.HetNapja),
|
||||
RogzitoTanarNeve = model.RogzitoTanar.Nev,
|
||||
OrarendiOraOraszama = model.OrarendiOraOraszama,
|
||||
Tantargy = model.Tantargy,
|
||||
TantargyNeve = model.Tantargy.Nev,
|
||||
Temaja = model.SzamonkeresTemaja,
|
||||
Modja = AdatszotarResponseDto<ErtekelesModEnum>.Create(model.SzamonkeresModja),
|
||||
OsztalyCsoport = model.OsztalyCsoport
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user