Changeset c0256f3 for iknow-api/DTOs


Ignore:
Timestamp:
10/27/25 21:50:02 (11 months ago)
Author:
stefansaveski <stefansaveski19@…>
Branches:
master
Children:
e423ff3
Parents:
4f5d8fd
Message:

Add user-related entities and enforce one-to-one mappings

Enhanced the User model with new entities: ContactInfo,
EnrollmentInfo, and HighSchool, establishing one-to-one
relationships. Updated UserDTO with additional fields and
introduced enums for type, quota, and major. Modified
UserRepository and AuthService to handle new entities.

Updated database schema with unique constraints on UserId
for related tables and added EF Core migration
20251027191028_dbRelations. Adjusted JSON serialization
to prevent circular references.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iknow-api/DTOs/UserDTO.cs

    r4f5d8fd rc0256f3  
    2222        public DateTime Bday { get; set; }
    2323        public UserRole Role { get; set; }
     24        public float gpa { get; set; }
     25        public type tip { get; set; }
     26        public string city { get; set; } = string.Empty;
     27        public string address { get; set; } = string.Empty;
     28        public string municipality { get; set; } = string.Empty;
     29        public string phoneNumber { get; set; } = string.Empty;
     30        public string microsoftEmail { get; set; } = string.Empty;
     31        public int enrollmentYear { get; set; }
     32        public quota quotaType { get; set; }
     33        public major majorType { get; set; }
     34
    2435    }
    2536
     
    4455        Student
    4556    }
     57    public enum type
     58    {
     59        strucen, gimnazija
     60    }
     61    public enum quota
     62    {
     63        drzavna, privatna, stipendija
     64    }
     65    public enum major
     66    {
     67        SIIS, PIT, KN, KI, IMB, IE, SSP, SEIS
     68    }
    4669}
Note: See TracChangeset for help on using the changeset viewer.