using AyCode.Interfaces.Addresses; 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, /*AcModelDtoBase>,*/ IAcUserModelDtoMinBase where TUserDtoMin : class, IAcUserDtoMinBase //where TProfile : class, IAcProfileDtoBase where TProfileDto : class, IAcProfileDtoBase //where TAddress : class, IAcAddress { public TUserDtoMin UserDto { get; set;} public TProfileDto ProfileDto { 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; ProfileDto = Activator.CreateInstance(); ProfileDto.Id = user.Profile.Id; ProfileDto.Name = user.Profile.Name; ProfileDto.FirstName = user.Profile.FirstName; ProfileDto.LastName = user.Profile.LastName; //Profile.NickName = user.Profile.NickName; } //public virtual TUserDtoMin CreateMainEntity() //{ // var user = base.CreateMainEntity(); // user.AffiliateId = UserDto.AffiliateId; // user.ProfileId = ProfileDto.Id; // user.Profile = Activator.CreateInstance<>() //} }