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/Models/User.cs

    r4f5d8fd rc0256f3  
    2121        public DateTime CreatedAt { get; set; }
    2222        public UserRole Role { get; set; }
     23        public HighSchool? HighSchool { get; set; }
     24        public ContactInfo? ContactInfo { get; set; }
     25        public EnrollmentInfo? EnrollmentInfo { get; set; }
     26
    2327    }
    2428}
Note: See TracChangeset for help on using the changeset viewer.