using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Kreta.Naplo.Domain.V3.Orarend; using Kreta.Naplo.Dto.V3.Documentation; using Kreta.Naplo.Dto.V3.Interfaces; namespace Kreta.Naplo.Dto.V3.Orarend { public class TanuloJelenletResponseDto : IDtoListDocumentation { [Required, Description(DescriptionLookUp.TanuloId)] public int TanuloId { get; set; } [Required, Description(DescriptionLookUp.MulasztasTipus)] public int Allapot { get; set; } [Required, Description(DescriptionLookUp.MulasztasTipus)] public int MulasztasTipus { get; set; } [Description(DescriptionLookUp.Keses)] public int? Keses { get; set; } [Required, Description(DescriptionLookUp.TanuloNaplozasFelkialtojelSzoveg)] public string Szoveg { get; set; } [Required, Description(DescriptionLookUp.HasMulasztasGomb)] public bool HasMulasztasGomb { get; set; } public DocumentationExampleDto ListExample => new DocumentationExampleDto( "GetJelenlet", new TanuloJelenletRequestDto { OrarendElemUid = "13279471,TanitasiOra,2022-02-27T23:00:00Z" }); public static implicit operator TanuloJelenletResponseDto(TanuloJelenletResponse model) => new TanuloJelenletResponseDto { TanuloId = model.TanuloId, Allapot = model.Allapot, MulasztasTipus = model.MulasztasTipus, Keses = model.Keses, Szoveg = model.Szoveg, HasMulasztasGomb = model.HasMulasztasGomb, }; public object GetExamples() => new TanuloJelenletResponseDto { TanuloId = 218789, Allapot = 1827, MulasztasTipus = 1827, Szoveg = "Előző órán hiányzott", HasMulasztasGomb = true, Keses = null }; } }