Skip to content

Commit b3ec697

Browse files
committed
(#418) users: udpate core
1 parent 0593b41 commit b3ec697

10 files changed

+31
-31
lines changed

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Entities/UserNotifications.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace MiniSpace.Services.Students.Core.Entities
55
{
66
public class UserNotifications : AggregateRoot
77
{
8-
public Guid StudentId { get; private set; }
8+
public Guid UserId { get; private set; }
99
public NotificationPreferences NotificationPreferences { get; private set; }
1010

11-
public UserNotifications(Guid studentId, NotificationPreferences notificationPreferences)
11+
public UserNotifications(Guid userId, NotificationPreferences notificationPreferences)
1212
{
13-
StudentId = studentId;
13+
UserId = userId;
1414
NotificationPreferences = notificationPreferences ?? new NotificationPreferences();
1515
}
1616

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Entities/UserSettings.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace MiniSpace.Services.Students.Core.Entities
55
{
66
public class UserSettings : AggregateRoot
77
{
8-
public Guid StudentId { get; private set; }
8+
public Guid UserId { get; private set; }
99
public UserAvailableSettings AvailableSettings { get; private set; }
1010

11-
public UserSettings(Guid studentId, UserAvailableSettings availableSettings)
11+
public UserSettings(Guid userId, UserAvailableSettings availableSettings)
1212
{
13-
StudentId = studentId;
13+
UserId = userId;
1414
AvailableSettings = availableSettings ?? new UserAvailableSettings();
1515
}
1616

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Events/StudentNotificationPreferencesUpdated.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace MiniSpace.Services.Students.Core.Events
55
{
66
public class StudentNotificationPreferencesUpdated : IDomainEvent
77
{
8-
public Guid StudentId { get; }
8+
public Guid UserId { get; }
99
public NotificationPreferences NotificationPreferences { get; }
1010

1111
public StudentNotificationPreferencesUpdated(UserNotifications userNotifications)
1212
{
13-
StudentId = userNotifications.StudentId;
13+
UserId = userNotifications.UserId;
1414
NotificationPreferences = userNotifications.NotificationPreferences;
1515
}
1616
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Exceptions/StudentAlreadyInterestedInException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
public class StudentAlreadyInterestedInException : DomainException
44
{
55
public override string Code { get; } = "student_already_interested_in_event";
6-
public Guid StudentId { get; }
6+
public Guid UserId { get; }
77
public Guid EventId { get; }
88

9-
public StudentAlreadyInterestedInException(Guid studentId, Guid eventId)
10-
: base($"Student with id: {studentId} is already interested in event with id: {eventId}")
9+
public StudentAlreadyInterestedInException(Guid userId, Guid eventId)
10+
: base($"Student with id: {userId} is already interested in event with id: {eventId}")
1111
{
12-
StudentId = studentId;
12+
UserId = userId;
1313
EventId = eventId;
1414
}
1515
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Exceptions/StudentAlreadySignedUpException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
public class StudentAlreadySignedUpException : DomainException
44
{
55
public override string Code { get; } = "student_already_signed_up";
6-
public Guid StudentId { get; }
6+
public Guid UserId { get; }
77
public Guid EventId { get; }
88

9-
public StudentAlreadySignedUpException(Guid studentId, Guid eventId)
10-
: base($"Student with id: {studentId} is already signed up for event with id: {eventId}")
9+
public StudentAlreadySignedUpException(Guid userId, Guid eventId)
10+
: base($"Student with id: {userId} is already signed up for event with id: {eventId}")
1111
{
12-
StudentId = studentId;
12+
UserId = userId;
1313
EventId = eventId;
1414
}
1515
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Exceptions/StudentGalleryImageNotFoundException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ namespace MiniSpace.Services.Students.Core.Exceptions
33
public class StudentGalleryImageNotFoundException : DomainException
44
{
55
public override string Code { get; } = "student_gallery_image_not_found";
6-
public Guid StudentId { get; }
6+
public Guid UserId { get; }
77
public string MediaFileId { get; }
88

9-
public StudentGalleryImageNotFoundException(Guid studentId, string mediaFileId)
10-
: base($"Student with id: {studentId} does not have an image with media file id: {mediaFileId} in the gallery.")
9+
public StudentGalleryImageNotFoundException(Guid userId, string mediaFileId)
10+
: base($"Student with id: {userId} does not have an image with media file id: {mediaFileId} in the gallery.")
1111
{
12-
StudentId = studentId;
12+
UserId = userId;
1313
MediaFileId = mediaFileId;
1414
}
1515
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Exceptions/StudentIsNotInterestedException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
public class StudentIsNotInterestedException : DomainException
44
{
55
public override string Code { get; } = "student_is_not_interested_in_event";
6-
public Guid StudentId { get; }
6+
public Guid UserId { get; }
77
public Guid EventId { get; }
88

9-
public StudentIsNotInterestedException(Guid studentId, Guid eventId)
10-
: base($"Student with id: {studentId} is not interested in event with id: {eventId}")
9+
public StudentIsNotInterestedException(Guid userId, Guid eventId)
10+
: base($"Student with id: {userId} is not interested in event with id: {eventId}")
1111
{
12-
StudentId = studentId;
12+
UserId = userId;
1313
EventId = eventId;
1414
}
1515
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Exceptions/StudentIsNotSignedUpException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
public class StudentIsNotSignedUpException : DomainException
44
{
55
public override string Code { get; } = "student_is_not_signed_up_to_event";
6-
public Guid StudentId { get; }
6+
public Guid UserId { get; }
77
public Guid EventId { get; }
88

9-
public StudentIsNotSignedUpException(Guid studentId, Guid eventId)
10-
: base($"Student with id: {studentId} is not signed up to event with id: {eventId}")
9+
public StudentIsNotSignedUpException(Guid userId, Guid eventId)
10+
: base($"Student with id: {userId} is not signed up to event with id: {eventId}")
1111
{
12-
StudentId = studentId;
12+
UserId = userId;
1313
EventId = eventId;
1414
}
1515
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Repositories/IUserNotificationPreferencesRepository.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace MiniSpace.Services.Students.Core.Repositories
66
{
77
public interface IUserNotificationPreferencesRepository
88
{
9-
Task<NotificationPreferences> GetNotificationPreferencesAsync(Guid studentId);
10-
Task UpdateNotificationPreferencesAsync(Guid studentId, NotificationPreferences notificationPreferences);
9+
Task<NotificationPreferences> GetNotificationPreferencesAsync(Guid userId);
10+
Task UpdateNotificationPreferencesAsync(Guid userId, NotificationPreferences notificationPreferences);
1111
}
1212
}

MiniSpace.Services.Students/src/MiniSpace.Services.Students.Core/Repositories/IUserSettingsRepository.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace MiniSpace.Services.Students.Core.Repositories
66
{
77
public interface IUserSettingsRepository
88
{
9-
Task<UserSettings> GetUserSettingsAsync(Guid studentId);
9+
Task<UserSettings> GetUserSettingsAsync(Guid userId);
1010
Task AddUserSettingsAsync(UserSettings userSettings);
1111
Task UpdateUserSettingsAsync(UserSettings userSettings);
1212
}

0 commit comments

Comments
 (0)