using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Flexitime.DataAccess.Objects { public class UserDb { public UserDb() { AssociatedIdentifiers = new List(); Groups = new List(); DirectReports = new List(); Permissions = new List(); } [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public double HoursPerWeek { get; set; } public bool IsContractor { get; set; } public int AssociatedIdentifierCount => AssociatedIdentifiers.Count; public DateTime LastEventDateTime { get; set; } public List AssociatedIdentifiers { get; set; } //TODO: Is this that the user is in the group or this is their groups? public List Groups { get; set; } public int State { get; set; } public Guid? TeamId { get; set; } /// /// user that belongs to team /// /// differs from Groups in that a group is a symbolic collection where a team is a publicly identifiable entity public TeamDb Team { get; set; } /// /// Id of the Users Line Manager /// public UserDb LineManager { get; set; } /// /// Ids of the users direct reports /// public List DirectReports { get; set; } public string UserName { get; set; } public string Password { get; set; } public List Permissions { get; set; } } }