|
Last change
on this file since c0256f3 was c0256f3, checked in by stefansaveski <stefansaveski19@…>, 11 months ago |
|
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.
|
-
Property mode
set to
100644
|
|
File size:
517 bytes
|
| Line | |
|---|
| 1 | using iknow_api.Models;
|
|---|
| 2 | namespace iknow_api.Repositories
|
|---|
| 3 | {
|
|---|
| 4 | public interface IUserRepository
|
|---|
| 5 | {
|
|---|
| 6 | Task<bool> UserExistsAsync(string username);
|
|---|
| 7 | Task<User?> GetUserByUsernameAsync(string username);
|
|---|
| 8 | Task AddUserAsync(User user);
|
|---|
| 9 | Task AddContactAsync(ContactInfo contactInfo);
|
|---|
| 10 | Task AddEnrollmentAsync(EnrollmentInfo enrollment);
|
|---|
| 11 | Task AddHighSchoolAsync(HighSchool highSchool);
|
|---|
| 12 | Task<int> GetUsersCountAsync();
|
|---|
| 13 | Task<User> GetUserByIdAsync(int id);
|
|---|
| 14 | }
|
|---|
| 15 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.