|
Last change
on this file since 18e0c10 was f0fc386, checked in by Stefan-Saveski <stefan@…>, 10 months ago |
|
Refactor and enhance application structure
Enhanced error handling in AuthController with detailed exception handling for user registration. Updated UserDTO to improve JSON serialization and renamed enums for clarity. Introduced new entities (Major, PassedSubject, etc.) and seeded initial data in AppDbContext.
Replaced legacy migrations with 20251208203846_InitialCreate, reflecting the updated schema. Fixed typographical errors and improved JSON serialization in Program.cs with case-insensitive property matching and enum handling.
Refactored repository interfaces for better null safety. Improved debugging in AuthService and updated connection strings. Added the PassedSubject entity and cleaned up redundant code and unused imports for better maintainability.
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [618be76] | 1 |
|
|---|
| 2 |
|
|---|
| [5eb7847] | 3 | namespace iknow_api.Models
|
|---|
| [618be76] | 4 | {
|
|---|
| 5 | public enum UserRole
|
|---|
| 6 | {
|
|---|
| 7 | Admin,
|
|---|
| 8 | Professor,
|
|---|
| [f0fc386] | 9 | Student
|
|---|
| [618be76] | 10 | }
|
|---|
| 11 |
|
|---|
| [9694de9] | 12 | public class User
|
|---|
| [618be76] | 13 | {
|
|---|
| 14 | public int Id { get; set; }
|
|---|
| 15 | public string? Name { get; set; }
|
|---|
| [f844b7e] | 16 | public string? EMBG {get; set; }
|
|---|
| [618be76] | 17 | public string? Surname { get; set; }
|
|---|
| 18 | public string? Index { get; set; }
|
|---|
| 19 | public string? Email { get; set; }
|
|---|
| [fc7b4b4] | 20 | public string? PasswordHash { get; set; }
|
|---|
| [618be76] | 21 | public DateTime Bday { get; set; }
|
|---|
| 22 | public DateTime CreatedAt { get; set; }
|
|---|
| 23 | public UserRole Role { get; set; }
|
|---|
| [c0256f3] | 24 | public HighSchool? HighSchool { get; set; }
|
|---|
| 25 | public ContactInfo? ContactInfo { get; set; }
|
|---|
| 26 | public EnrollmentInfo? EnrollmentInfo { get; set; }
|
|---|
| [5e22720] | 27 | public ICollection<UserDocuments>? Documents { get; set; }
|
|---|
| 28 | public ICollection<Payment>? EnrolledSemesters { get; set; }
|
|---|
| 29 | public ICollection<SemesterSubject>? EnrolledSemesterUserSubjects { get; set; }
|
|---|
| 30 |
|
|---|
| 31 | public ICollection<SemesterSubject>? TeachingSubjects { get; set; }
|
|---|
| [c0256f3] | 32 |
|
|---|
| [618be76] | 33 | }
|
|---|
| 34 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.