using CoviDok.Api.Objects; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace CoviDok.Data.Model { public class Child : User { public int DoctorId { get; set; } public int ParentId { get; set; } //public ICollection MedicalHistory { get; set; } = new List(); public string SSN { get; set; } public Gender Gender { get; set; } public PublicChild ToPublic() { return new PublicChild { FirstName = FirstName, LastName = LastName, DoctorId = DoctorId, ParentId = ParentId, SSN = SSN, BirthDate = BirthDate, ImageId = ImageId, Id = Id, Gender = Gender, Role = Api.Role.Chi }; } public void UpdateSelf(PublicChild newVal) { FirstName = newVal.FirstName; LastName = newVal.LastName; DoctorId = newVal.DoctorId; ParentId = newVal.ParentId; SSN = newVal.SSN; BirthDate = newVal.BirthDate; ImageId = newVal.ImageId; Gender = newVal.Gender; } } }