source: iknow-api/Models/User.cs@ ea40556

Last change on this file since ea40556 was ea40556, checked in by Stefan-Saveski <stefansaveski19@…>, 9 days ago
  • ready for presentation
  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[e49c3ed]1namespace iknow_api.Models
[2859225]2{
3 public enum UserRole
4 {
5 Admin,
6 Professor,
[c2f79d7]7 Student
[2859225]8 }
9
[ea40556]10 // Attributes follow the Users entity in the ER model exactly.
[9a57e89]11 public class User
[2859225]12 {
13 public int Id { get; set; }
14 public string? Name { get; set; }
[ea40556]15 public string? EMBG { get; set; }
[2859225]16 public string? Surname { get; set; }
17 public string? Index { get; set; }
18 public string? Email { get; set; }
[5b42c8d]19 public string? PasswordHash { get; set; }
[ea40556]20 public DateTime? Bday { get; set; }
[2859225]21 public DateTime CreatedAt { get; set; }
22 public UserRole Role { get; set; }
[ea40556]23 public Quota? Quota { get; set; }
24 public int? EnrollmentYear { get; set; }
25
[b38c39c]26 public HighSchool? HighSchool { get; set; }
27 public ContactInfo? ContactInfo { get; set; }
[a92a2a4]28 public ICollection<UserDocuments>? Documents { get; set; }
29
[ea40556]30 // Named for the relationship it carries: Users 1 --pays-- N Payment.
31 public ICollection<Payment>? Payments { get; set; }
32
33 // Users 1 --submits-- N EnrolledSemesters
34 public ICollection<EnrolledSemesters>? Enrolments { get; set; }
[b38c39c]35
[ea40556]36 // Users 1 --teaches-- N SemestersSubjects
37 public ICollection<SemesterSubject>? TeachingSubjects { get; set; }
[2859225]38 }
[ea40556]39}
Note: See TracBrowser for help on using the repository browser.