using CoviDok.Api.Objects; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace CoviDok.Data.Model { public class Doctor : RoleUser { public ICollection Children { get; set; } = new List(); public ICollection Assistants { get; set; } = new List(); public void UpdateSelf(PublicDoctor doctor) { FirstName = doctor.FirstName; LastName = doctor.LastName; Email = doctor.Email; PictureId = doctor.PictureID; Gender = doctor.Gender; } public PublicDoctor ToPublic() { return new PublicDoctor { FirstName = FirstName, LastName = LastName, Email = Email, PictureID = PictureId, ID = Id, Gender = Gender, Role = Api.Role.Doc }; } } }