|
Last change
on this file since 1d32d5c was 4f5d8fd, 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:
490 bytes
|
| Line | |
|---|
| 1 | using System.ComponentModel.DataAnnotations.Schema;
|
|---|
| 2 |
|
|---|
| 3 | namespace iknow_api.Models
|
|---|
| 4 | {
|
|---|
| 5 | public class ContactInfo
|
|---|
| 6 | {
|
|---|
| 7 | public int Id { get; set; }
|
|---|
| 8 | public string? city { get; set; }
|
|---|
| 9 | public string? address { get; set; }
|
|---|
| 10 | public string? municipality { get; set; }
|
|---|
| 11 | public string? phoneNumber { get; set; }
|
|---|
| 12 | public string? microsoftEmail { get; set; }
|
|---|
| 13 |
|
|---|
| 14 | public int UserId { get; set; }
|
|---|
| 15 | public User User { get; set; }
|
|---|
| 16 | }
|
|---|
| 17 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.