using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Kreta.Ellenorzo.Domain.VN.Felhasznalo; using Kreta.Ellenorzo.Dto.VN.Documentation; using Swashbuckle.Examples; namespace Kreta.Ellenorzo.Dto.VN.Felhasznalo { public class BankszamlaRequestDto : IExamplesProvider { [Required, Description(DescriptionLookUp.BankszamlaSzam)] public string BankszamlaSzam { get; set; } [Required, Description(DescriptionLookUp.BankszamlaTulajdonosTipusId)] public int? BankszamlaTulajdonosTipusId { get; set; } [Required, Description(DescriptionLookUp.BankszamlaTulajdonosNeve)] public string BankszamlaTulajdonosNeve { get; set; } [Required, Description(DescriptionLookUp.SzamlavezetoBank)] public string SzamlavezetoBank { get; set; } public static implicit operator BankszamlaRequest(BankszamlaRequestDto dto) => new BankszamlaRequest { BankszamlaSzam = dto.BankszamlaSzam, BankszamlaTulajdonosTipusId = dto.BankszamlaTulajdonosTipusId, BankszamlaTulajdonosNeve = dto.BankszamlaTulajdonosNeve, SzamlavezetoBank = dto.SzamlavezetoBank }; public object GetExamples() => new BankszamlaRequestDto { BankszamlaSzam = "11111111-11111111-00000000", BankszamlaTulajdonosTipusId = 7885, BankszamlaTulajdonosNeve = "Antal Imre", SzamlavezetoBank = "CIB Bank" }; } }