Я пытаюсь создать класс, где Physician.cs имеет свойство ICollection Appointmets с DateTime внутри него, но я пытаюсь создать Рабочий день класс, где врач может сказать, когда он начинает, когда он заканчивает свой рабочий день (например, понедельник с 07:00 до 13:00 независимо от даты).
Нужно ли объявлять DateTime как тип данных для свойства Start и Fini sh в Рабочий день класс?
Physician.cs
using System.Collections.Generic;
namespace Med_App_API.Models
{
public class Physician
{
public int Id { get; set; }
public int UserId { get; set; }
public User User { get; set; }
public ICollection<Patient> Patients { get; set; }
public ICollection<Appointments> Appointments { get; set; }
}
}
Appointment.cs
using System;
namespace Med_App_API.Models
{
public class Appointments
{
public int Id { get; set; }
public int PatientId { get; set; }
public Patient Patient { get; set; }
public int PhysicianId { get; set; }
public Physician Physician { get; set; }
public DateTime TimeofAppointment { get; set; }
public string TypeOfAppointment { get; set; }
}
}
Workday.cs
using System;
namespace Med_App_API.Models
{
public class Workday
{
public int Id { get; set; }
public int PhysicianId { get; set; }
public Physician Physician { get; set; }
public DateTime Start { get; set; }
public DateTime Finish { get; set; }
}
}