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 AcUserModelDtoBase : AcUserModelDtoMinBase where TUserDto : class, IAcUserDtoBase where TProfile : class, IAcProfileBase where TProfileDto : class, IAcProfileDtoBase { public TProfileDto Profile { get; set; } protected AcUserModelDtoBase() {} protected AcUserModelDtoBase(IUserBase user, TProfile? profile) : base(user) { if (profile == null) return; Profile = Activator.CreateInstance(); Profile.Id = profile.Id; Profile.Name = profile.Name; Profile.OwnerId = profile.OwnerId; } }