source: iknow-api/Models/EnrollmentInfo.cs@ f8af32b

Last change on this file since f8af32b was cab02ad, checked in by stefansaveski <stefansaveski19@…>, 11 months ago

Add user-related models, services, and JWT validation

Added ContactInfo, EnrollmentInfo, and HighSchool models with relationships to the User entity. Updated AppDbContext and migrations to reflect these changes. Introduced UserService and IUserService for handling user data retrieval via JWT validation. Added UserController with a getUser endpoint to fetch user data based on JWT.

Enhanced IUserRepository and UserRepository with a method to fetch users by ID. Registered UserService in the DI container. Defined enums for EnrollmentInfo and HighSchool. Removed outdated migration files and performed general refactoring and cleanup.

  • Property mode set to 100644
File size: 515 bytes
Line 
1using System.ComponentModel.DataAnnotations.Schema;
2
3namespace iknow_api.Models
4{
5 public enum quota
6 {
7 drzavna, privatna, stipendija
8 }
9 public enum major
10 {
11 SIIS, PIT, KN, KI, IMB, IE, SSP, SEIS
12 }
13 public class EnrollmentInfo
14 {
15 public int Id { get; set; }
16 public int enrollmentYear { get; set; }
17 public quota quota;
18 public major major { get; set; }
19 public int UserId { get; set; }
20 public User User { get; set; }
21 }
22}
Note: See TracBrowser for help on using the repository browser.