using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo; using Kreta.Ellenorzo.Dto.VN.Documentation; using Swashbuckle.Examples; namespace Kreta.Ellenorzo.Dto.VN.Felhasznalo.Gondviselo { public class GondviseloBaseAdatlapRequestDto : IExamplesProvider { [Description(DescriptionLookUp.FelhasznaloElotag)] public string Elotag { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloVezeteknev)] public string Vezeteknev { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloUtonev)] public string Utonev { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloSzuletesiVezeteknev)] public string SzuletesiVezeteknev { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloSzuletesiUtonev)] public string SzuletesiUtonev { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloSzuletesiHelye)] public string SzuletesiHely { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloSzuletesiDatuma)] public DateTime? SzuletesiDatum { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloAnyjaVezeteknev)] public string AnyjaVezeteknev { get; set; } [Required, Description(DescriptionLookUp.FelhasznaloAnyjaUtonev)] public string AnyjaUtonev { get; set; } public static implicit operator GondviseloBaseAdatlapRequest(GondviseloBaseAdatlapRequestDto dto) => new GondviseloBaseAdatlapRequest { Elotag = dto.Elotag, Vezeteknev = dto.Vezeteknev, Utonev = dto.Utonev, SzuletesiVezeteknev = dto.SzuletesiVezeteknev, SzuletesiUtonev = dto.SzuletesiUtonev, SzuletesiHely = dto.SzuletesiHely, SzuletesiDatum = dto.SzuletesiDatum, AnyjaVezeteknev = dto.AnyjaVezeteknev, AnyjaUtonev = dto.AnyjaUtonev }; public object GetExamples() => new GondviseloBaseAdatlapRequestDto { Elotag = "Dr.", Vezeteknev = "Teszt", Utonev = "Gondviselő", SzuletesiVezeteknev = "GondviselőSzületésiVezetéknév", SzuletesiUtonev = "GondviselőSzületésiUtónév", SzuletesiHely = "Budapest", SzuletesiDatum = new DateTime(1975, 04, 15), AnyjaVezeteknev = "GondviselőAnyjaVezetéknév", AnyjaUtonev = "GondviselőAnyjaUtónév" }; } }