init
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class HetirendListRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Záró időpont (UTC ISO 8601) (A filter zárt intervallumot határoz meg)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime OrarendElemVegNapDatuma { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Kezdő időpont (UTC ISO 8601) (A filter zárt intervallumot határoz meg)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime OrarendElemKezdoNapDatuma { get; set; }
|
||||
|
||||
public static implicit operator HetirendListRequest(HetirendListRequestDto dto) => new HetirendListRequest
|
||||
{
|
||||
OrarendElemVegNapDatuma = dto.OrarendElemVegNapDatuma.ToLocalTime(),
|
||||
OrarendElemKezdoNapDatuma = dto.OrarendElemKezdoNapDatuma.ToLocalTime()
|
||||
};
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend;
|
||||
using Kreta.Ellenorzo.Dto.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Ellenorzo.Dto.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Dto.VN.Utility;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class HetirendListResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[Required, Description("Az entitás kezdő napja " + DescriptionLookUp.ShortDateTimeUtcIso)]
|
||||
public DateTime KezdoNapDatuma { get; set; }
|
||||
|
||||
[Required, Description("Az entitás végének napja " + DescriptionLookUp.ShortDateTimeUtcIso)]
|
||||
public DateTime VegNapDatuma { get; set; }
|
||||
|
||||
[Required, Description("A hét sorszáma a tanév kezdetétől számítva")]
|
||||
public int HetSorszama { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasTipusa)]
|
||||
public AdatszotarResponseDto<HetiRendTipusEnum> Tipus { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"ListHetirend",
|
||||
new HetirendListRequestDto
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = new DateTime(2021, 3, 2, 0, 0, 0),
|
||||
OrarendElemVegNapDatuma = new DateTime(2021, 3, 21, 0, 0, 0)
|
||||
});
|
||||
|
||||
public static implicit operator HetirendListResponseDto(HetirendListResponse model) => new HetirendListResponseDto
|
||||
{
|
||||
Uid = model.Uid.UidRaw,
|
||||
KezdoNapDatuma = model.KezdoNapDatuma.ToIso8601Utc(),
|
||||
VegNapDatuma = model.VegNapDatuma.ToIso8601Utc(),
|
||||
HetSorszama = model.HetSorszama,
|
||||
Tipus = AdatszotarResponseDto<HetiRendTipusEnum>.Create(model.Tipus)
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user