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<Child> Children { get; set; } = new List<Child>();

        public ICollection<Assistant> Assistants { get; set; } = new List<Assistant>();

        public void UpdateSelf(PublicDoctor doctor) {
            FirstName = doctor.FirstName;
            LastName = doctor.LastName;
            Email = doctor.Email;
            ImageId = doctor.ImageId;
        }
        public PublicDoctor ToPublic()
        {
            return new PublicDoctor
            {
                FirstName = FirstName,
                LastName = LastName,
                Email = Email,
                ImageId = ImageId,
                Id = Id,
                Role = Api.Role.Doc
            };
        }

    }
}