diff --git a/MBS_COMMAND.Application/UserCases/Commands/Slots/CreateSlotCommandHandler.cs b/MBS_COMMAND.Application/UserCases/Commands/Slots/CreateSlotCommandHandler.cs index b6a34f7..8408c4e 100644 --- a/MBS_COMMAND.Application/UserCases/Commands/Slots/CreateSlotCommandHandler.cs +++ b/MBS_COMMAND.Application/UserCases/Commands/Slots/CreateSlotCommandHandler.cs @@ -40,11 +40,11 @@ public async Task Handle(Command.CreateSlot request, CancellationToken c return new { - Date = x.Date, + x.Date, StartTime = startTime, EndTime = endTime, IsDateInvalid = date < currentSemester.From || date > semesterEndDate, - IsDurationInvalid = duration < TimeSpan.FromHours(1.5) + IsDurationInvalid = duration < TimeSpan.FromMinutes(30) || duration > TimeSpan.FromHours(1) }; }) .Where(x => x.IsDateInvalid || x.IsDurationInvalid) @@ -68,7 +68,7 @@ public async Task Handle(Command.CreateSlot request, CancellationToken c if (durationErrors.Any()) errorMessages.Add( - $"Slots must be at least 1.5 hours long. Invalid slots: {string.Join(", ", durationErrors)}"); + $"Slots must be between 30 minutes and 1 hour long. Invalid slots: {string.Join(", ", durationErrors)}"); return Result.Failure(new Error("400", string.Join(". ", errorMessages))); } diff --git a/MBS_COMMAND.Domain/Entities/User.cs b/MBS_COMMAND.Domain/Entities/User.cs index d11825c..507f99f 100644 --- a/MBS_COMMAND.Domain/Entities/User.cs +++ b/MBS_COMMAND.Domain/Entities/User.cs @@ -4,7 +4,6 @@ using static MBS_CONTRACT.SHARE.Services.Mentors.DomainEvent; namespace MBS_COMMAND.Domain.Entities; - public class User : AggregateRoot, IAuditableEntity { public string Email { get; set; }