init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Kreta.Ellenorzo.Domain.VN.Faliujsag;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagListRequestDto
|
||||
{
|
||||
/// <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; }
|
||||
|
||||
public static implicit operator FaliujsagListRequest(FaliujsagListRequestDto dto)
|
||||
=> dto == null ? new FaliujsagListRequest() : new FaliujsagListRequest()
|
||||
{
|
||||
DatumTol = dto.DatumTol?.Date,
|
||||
DatumIg = dto.DatumIg?.Date
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Faliujsag;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Ellenorzo.Dto.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Dto.VN.Utility;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagListResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitastRogzitoTanar)]
|
||||
public string RogzitoNeve { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.FaliujsagErvenyessegKezdete)]
|
||||
public DateTime ErvenyessegKezdete { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.FaliujsagErvenyessegVege)]
|
||||
public DateTime ErvenyessegVege { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"ListFaliujsag",
|
||||
new FaliujsagListRequestDto
|
||||
{
|
||||
DatumTol = new DateTime(2021, 9, 10, 0, 0, 0),
|
||||
DatumIg = new DateTime(2021, 9, 25, 0, 0, 0)
|
||||
});
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasCime)]
|
||||
public string Cim { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasTartalma + "; plain text")]
|
||||
public string Tartalom { get; set; }
|
||||
|
||||
public static implicit operator FaliujsagListResponseDto(FaliujsagListResponse model) => new FaliujsagListResponseDto
|
||||
{
|
||||
Uid = model.Uid.UidRaw,
|
||||
RogzitoNeve = model.RogzitoNeve,
|
||||
ErvenyessegKezdete = model.ErvenyessegKezdete.ToIso8601Utc(),
|
||||
ErvenyessegVege = model.ErvenyessegVege.ToIso8601Utc(),
|
||||
Cim = model.Cim,
|
||||
Tartalom = model.Tartalom
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user