init
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Lep;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Ellenorzo.Dto.VN.Utility;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Lep
|
||||
{
|
||||
public class EloadasResponseDto
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.EloadasId)]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasDatum)]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasKezdete)]
|
||||
public DateTime EloadasKezdete { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasVege)]
|
||||
public DateTime EloadasVege { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasNev)]
|
||||
public string EloadasNev { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.SzervezetNev)]
|
||||
public string SzervezetNev { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasHelyszin)]
|
||||
public string Helyszin { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EloadasonMegjelent)]
|
||||
public bool Megjelent { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EloadasGondviseloElfogadas)]
|
||||
public bool? GondviseloElfogadas { get; set; }
|
||||
|
||||
public static implicit operator EloadasResponseDto(EloadasResponse model) => model == null ? null : new EloadasResponseDto
|
||||
{
|
||||
Uid = model.Uid.UidRaw,
|
||||
Datum = model.Datum.ToIso8601Utc(),
|
||||
EloadasKezdete = model.EloadasKezdete.ToIso8601Utc(),
|
||||
EloadasVege = model.EloadasVege.ToIso8601Utc(),
|
||||
EloadasNev = model.EloadasNev,
|
||||
SzervezetNev = model.SzervezetNev,
|
||||
Helyszin = model.Helyszin,
|
||||
Megjelent = model.Megjelent,
|
||||
GondviseloElfogadas = model.GondviseloElfogadas
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Lep;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Lep
|
||||
{
|
||||
public class GondviseloEngedelyezesRequestDto : IExamplesProvider
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.EloadasId)]
|
||||
public int EloadasId { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Dontes)]
|
||||
public bool? Dontes { get; set; }
|
||||
|
||||
public static implicit operator GondviseloEngedelyezesRequest(GondviseloEngedelyezesRequestDto dto) => new GondviseloEngedelyezesRequest
|
||||
{
|
||||
EloadasId = dto.EloadasId,
|
||||
Dontes = dto.Dontes
|
||||
};
|
||||
|
||||
public object GetExamples() => new GondviseloEngedelyezesRequestDto
|
||||
{
|
||||
EloadasId = 8796,
|
||||
Dontes = true
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user