I'm trying to create class where Physician.cs have a ICollection Appointmets property with DateTime inside of it but I'm trying to create Workday class where Physician can say from when he start to when he finishes his workday (ex. Monday from 07:00 to 13:00 regardless of the date).
Do I need to declare DateTime as datatype to the property of Start and Finish in Workday class?
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; }
}
}