Skip to content

Instantly share code, notes, and snippets.

@johnmmoss
Created February 21, 2015 22:22
Show Gist options
  • Save johnmmoss/0809971957eb425e8f4b to your computer and use it in GitHub Desktop.
Save johnmmoss/0809971957eb425e8f4b to your computer and use it in GitHub Desktop.
Timesheets Application Initial Data Model
public class Department
{
public int Id { get; set; }
public string Code { get; set; }
public string Name { get; set; }
ICollection<Employee> Employees { get; set; }
ICollection<TimeCode> TimeCodes { get; set; }
}
public class Employee
{
public int Id { get; set; }
public string Forename { get; set; }
public string Surname { get; set; }
public string Email { get; set; }
public bool IsAdmin { get; set; }
public ICollection<Timesheet> Timesheets { get; set; }
}
public class TimeCode
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
public class Timesheet
{
public int Id { get; set; }
public ICollection<TimesheetEntry> Entries { get; set; }
public bool IsAuthorised { get; set; }
}
public class TimesheetEntry
{
public int Id { get; set; }
public DateTime Date { get; set; }
public TimeCode TimeCode { get; set; }
public int TimeSpent { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment