using AyCode.Interfaces.Profiles; using AyCode.Interfaces.Profiles.Dtos; using AyCode.Interfaces.Users; using AyCode.Interfaces.Users.Dtos; namespace AyCode.Models.Users; public abstract class AcUserModelDtoMinBase : AcModelDtoBase where TUserDtoMin : class, IAcUserDtoMinBase where TProfile : class, IAcProfile where TProfileDto : class, IAcProfileDtoBase { public TUserDtoMin UserDto { get; set;} public TProfileDto? Profile { get; set; } protected AcUserModelDtoMinBase() {} protected AcUserModelDtoMinBase(IAcUserDtoMinBase user) : base(user.Id) { Id = user.Id; UserDto = Activator.CreateInstance(); UserDto.Id = user.Id; UserDto.AffiliateId = user.AffiliateId; Profile = Activator.CreateInstance(); Profile.Id = user.Profile.Id; Profile.Name = user.Profile.Name; } }