init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using Swashbuckle.Examples;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class SzamonkeresRequestDto : IExamplesProvider
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.OrarendElemUid)]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.ErtekelesMod)]
|
||||
public int ErtekelesMod { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.Tema)]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.ForceSave)]
|
||||
public bool ForceSave { get; set; }
|
||||
|
||||
public static implicit operator SzamonkeresRequest(SzamonkeresRequestDto dto) => new SzamonkeresRequest(dto.OrarendElemUid)
|
||||
{
|
||||
ErtekelesMod = dto.ErtekelesMod,
|
||||
Tema = dto.Tema,
|
||||
ForceSave = dto.ForceSave
|
||||
};
|
||||
|
||||
public object GetExamples() => new SzamonkeresRequestDto
|
||||
{
|
||||
OrarendElemUid = "813423,OrarendiOra,2022-10-06T22:00:00Z",
|
||||
ErtekelesMod = 1507,
|
||||
Tema = "Doga lesz, készüljetek!",
|
||||
ForceSave = false
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user