init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Dto.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Tantargy
|
||||
{
|
||||
public class TantargyResponseDto
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
||||
public string Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TantargyNeve)]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TantargyKategoria)]
|
||||
public AdatszotarResponseDto<TargyKategoriaTipusEnum> Kategoria { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.RendezesiIndex)]
|
||||
public int SortIndex { get; set; }
|
||||
|
||||
public static implicit operator TantargyResponseDto(TantargyResponse model) => model == null ? null : new TantargyResponseDto
|
||||
{
|
||||
Uid = model.Uid.UidRaw,
|
||||
Nev = model.Nev,
|
||||
Kategoria = AdatszotarResponseDto<TargyKategoriaTipusEnum>.Create(model.Kategoria),
|
||||
SortIndex = model.SortIndex
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user