From e918e8d3f7218787fa15e3b5c96d397dd063f058 Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Sat, 6 Jul 2024 21:20:10 +0330 Subject: [PATCH] fix(Change Entities NameSpace ) --- .../Configurations/ServiceExtensions.cs | 1 + .../CoreServices/Abstracts/IJwtService.cs | 4 +++- Brizco.Core/CoreServices/AccountService.cs | 6 ++++-- Brizco.Core/CoreServices/JwtService.cs | 1 + Brizco.Core/CoreServices/PageService.cs | 12 +++++++----- .../ShiftPlanReportCommandHandler.cs | 4 ++-- .../ReportServices/TaskReportCommandHandler.cs | 4 ++-- .../EntityServices/Abstracts/IUserService.cs | 4 +++- Brizco.Core/EntityServices/ActivityService.cs | 6 +++--- Brizco.Core/EntityServices/ComplexService.cs | 4 +++- Brizco.Core/EntityServices/ShiftPlanService.cs | 2 +- Brizco.Core/EntityServices/UserService.cs | 5 ++++- .../QuartzServices/NotificationScheduledJob.cs | 2 +- Brizco.Domain/Brizco.Domain.csproj | 3 +++ .../CommandQueries/Commands/ShiftCommands.cs | 4 +--- Brizco.Domain/Dtos/LargeDtos/ActivityLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/ComplexLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/PositionLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/SectionLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/ShiftLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/ShiftPlanLDto.cs | 4 +++- Brizco.Domain/Dtos/LargeDtos/TaskLDto.cs | 13 ++++++------- Brizco.Domain/Dtos/SmallDtos/ActivitySDto.cs | 4 +++- .../Dtos/SmallDtos/ApplicationUserSDto.cs | 2 +- Brizco.Domain/Dtos/SmallDtos/ComplexSDto.cs | 2 +- .../Dtos/SmallDtos/ComplexUserRoleSDto.cs | 2 +- .../Dtos/SmallDtos/ComplexUserSDto.cs | 2 +- Brizco.Domain/Dtos/SmallDtos/PositionSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/RoutineSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/SectionSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/ShiftDaySDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/ShiftPlanSDto.cs | 4 +++- .../Dtos/SmallDtos/ShiftPlanUserSDto.cs | 4 +++- .../Dtos/SmallDtos/ShiftRoutineSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/ShiftSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs | 4 +++- .../Dtos/SmallDtos/TaskPositionSDto.cs | 2 +- .../Dtos/SmallDtos/TaskRoutineSDto.cs | 4 +++- Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs | 6 ++++-- Brizco.Domain/Dtos/SmallDtos/TaskShiftSDto.cs | 4 +++- .../Aggregate.Complex.cs | 2 +- .../Entities/{Complex => Complexes}/Complex.cs | 14 ++++++++------ .../{Complex => Complexes}/ComplexUser.cs | 4 ++-- .../{Complex => Complexes}/ComplexUserRole.cs | 4 ++-- .../{Complex => Complexes}/Position.cs | 10 +++++----- .../PositionPermission.cs | 6 +++--- .../Entities/{Complex => Complexes}/Section.cs | 6 +++--- .../{Routine => Routines}/Aggregate.Routine.cs | 4 +++- .../Entities/{Routine => Routines}/Routine.cs | 7 +++++-- .../{Shift => Shifts}/Aggregate.Shift.cs | 4 +--- .../Entities/{Shift => Shifts}/Shift.cs | 6 +++--- .../Entities/{Shift => Shifts}/ShiftDay.cs | 2 +- .../Entities/{Shift => Shifts}/ShiftPlan.cs | 9 +++++---- .../{Shift => Shifts}/ShiftPlanUser.cs | 4 ++-- .../Entities/{Shift => Shifts}/ShiftRoutine.cs | 6 ++++-- .../Entities/{Task => Tasks}/Activity.cs | 4 +--- .../Entities/{Task => Tasks}/Aggregate.Task.cs | 3 +-- Brizco.Domain/Entities/{Task => Tasks}/Task.cs | 12 +++++------- .../Entities/{Task => Tasks}/TaskDay.cs | 2 +- .../Entities/{Task => Tasks}/TaskPosition.cs | 4 +--- .../Entities/{Task => Tasks}/TaskRoutine.cs | 6 ++++-- .../Entities/{Task => Tasks}/TaskShift.cs | 4 ++-- .../{User => Users}/ApplicationRole.cs | 4 ++-- .../{User => Users}/ApplicationUser.cs | 2 +- Brizco.Domain/Mappers/ActivityMapper.g.cs | 6 +++--- .../Mappers/ApplicationUserMapper.g.cs | 2 +- Brizco.Domain/Mappers/ComplexMapper.g.cs | 4 ++-- Brizco.Domain/Mappers/ComplexUserMapper.g.cs | 4 ++-- .../Mappers/ComplexUserRoleMapper.g.cs | 4 ++-- Brizco.Domain/Mappers/PositionMapper.g.cs | 2 +- Brizco.Domain/Mappers/RoutineMapper.g.cs | 2 +- Brizco.Domain/Mappers/SectionMapper.g.cs | 2 +- Brizco.Domain/Mappers/ShiftDayMapper.g.cs | 2 +- Brizco.Domain/Mappers/ShiftMapper.g.cs | 4 ++-- Brizco.Domain/Mappers/ShiftPlanMapper.g.cs | 8 ++++---- Brizco.Domain/Mappers/ShiftPlanUserMapper.g.cs | 6 +++--- Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs | 2 +- Brizco.Domain/Mappers/TaskDayMapper.g.cs | 2 +- Brizco.Domain/Mappers/TaskMapper.g.cs | 8 ++++---- Brizco.Domain/Mappers/TaskPositionMapper.g.cs | 6 +++--- Brizco.Domain/Mappers/TaskRoutineMapper.g.cs | 2 +- Brizco.Domain/Mappers/TaskShiftMapper.g.cs | 6 +++--- Brizco.Domain/MapsterRegister.cs | 5 ++++- .../Activity/CreateActivityCommandHandler.cs | 4 ++-- .../Activity/DeleteActivityCommandHandler.cs | 4 ++-- .../Activity/GetActivitiesQueryHandler.cs | 2 +- .../Activity/GetActivityQueryHandler.cs | 2 +- .../GetShiftPlanActivitiesQueryHandler.cs | 2 +- .../Activity/UpdateActivityCommandHandler.cs | 6 +++--- .../Complex/CreateComplexCommandHandler.cs | 4 ++-- .../Complex/CreateComplexUserCommandHandler.cs | 6 +++--- .../Complex/DeleteComplexCommandHandler.cs | 4 ++-- .../Complex/DeleteComplexUserCommandHandler.cs | 2 +- .../Handlers/Complex/GetComplexQueryHandler.cs | 2 +- .../Complex/GetComplexUsersQueryHandler.cs | 4 ++-- .../Complex/GetComplexesQueryHandler.cs | 2 +- .../Complex/UpdateComplexUserCommandHandler.cs | 4 ++-- .../Position/CreatePositionCommandHandler.cs | 4 ++-- .../Position/DeletePositionCommandHandler.cs | 4 ++-- .../Position/GetPositionQueryHandler.cs | 2 +- .../Position/GetPositionsQueryHandler.cs | 2 +- .../Position/UpdatePositionCommandHandler.cs | 10 ++++++---- .../Routine/CreateRoutineCommandHandler.cs | 4 ++-- .../Routine/DeleteRoutineCommandHandler.cs | 4 ++-- .../Handlers/Routine/GetRoutineQueryHandler.cs | 2 +- .../Routine/GetRoutineShiftsQueryHandler.cs | 6 +++--- .../Routine/GetRoutinesQueryHandler.cs | 2 +- .../Routine/UpdateRoutineCommandHandler.cs | 6 +++--- .../Section/CreateSectionCommandHandler.cs | 4 ++-- .../Section/DeleteSectionCommandHandler.cs | 6 +++--- .../Handlers/Section/GetSectionQueryHandler.cs | 2 +- .../Section/GetSectionsQueryHandler.cs | 2 +- .../Section/UpdateSectionCommandHandler.cs | 6 +++--- .../Shift/CreateShiftCommandHandler.cs | 4 ++-- .../Shift/DeleteShiftCommandHandler.cs | 4 ++-- .../Handlers/Shift/GetShiftQueryHandler.cs | 3 +-- .../Handlers/Shift/GetShiftsQueryHandler.cs | 18 +++++++++--------- .../Shift/UpdateShiftCommandHandler.cs | 8 ++++---- .../ShiftPlan/CreateShiftPlanCommandHandler.cs | 6 +++--- .../ShiftPlan/DeleteShiftPlanCommandHandler.cs | 4 ++-- .../ShiftPlan/GetShiftPlanQueryHandler.cs | 2 +- .../ShiftPlan/GetShiftPlansQueryHandler.cs | 10 +++++----- .../ShiftPlan/UpdateShiftPlanCommandHandler.cs | 14 ++++++++------ .../Handlers/Task/CreateTaskCommandHandler.cs | 4 ++-- .../Handlers/Task/DeleteTaskCommandHandler.cs | 4 ++-- .../Handlers/Task/GetTaskQueryHandler.cs | 2 +- .../Handlers/Task/GetTasksQueryHandler.cs | 2 +- .../Handlers/Task/UpdateTaskCommandHandler.cs | 8 ++++---- Brizco.Repository/Models/ApplicationContext.cs | 2 +- .../Services/DbInitializerService.cs | 2 +- 130 files changed, 321 insertions(+), 259 deletions(-) rename Brizco.Domain/Entities/{Complex => Complexes}/Aggregate.Complex.cs (97%) rename Brizco.Domain/Entities/{Complex => Complexes}/Complex.cs (67%) rename Brizco.Domain/Entities/{Complex => Complexes}/ComplexUser.cs (88%) rename Brizco.Domain/Entities/{Complex => Complexes}/ComplexUserRole.cs (88%) rename Brizco.Domain/Entities/{Complex => Complexes}/Position.cs (78%) rename Brizco.Domain/Entities/{Complex => Complexes}/PositionPermission.cs (82%) rename Brizco.Domain/Entities/{Complex => Complexes}/Section.cs (85%) rename Brizco.Domain/Entities/{Routine => Routines}/Aggregate.Routine.cs (80%) rename Brizco.Domain/Entities/{Routine => Routines}/Routine.cs (83%) rename Brizco.Domain/Entities/{Shift => Shifts}/Aggregate.Shift.cs (95%) rename Brizco.Domain/Entities/{Shift => Shifts}/Shift.cs (88%) rename Brizco.Domain/Entities/{Shift => Shifts}/ShiftDay.cs (92%) rename Brizco.Domain/Entities/{Shift => Shifts}/ShiftPlan.cs (85%) rename Brizco.Domain/Entities/{Shift => Shifts}/ShiftPlanUser.cs (90%) rename Brizco.Domain/Entities/{Shift => Shifts}/ShiftRoutine.cs (79%) rename Brizco.Domain/Entities/{Task => Tasks}/Activity.cs (93%) rename Brizco.Domain/Entities/{Task => Tasks}/Aggregate.Task.cs (98%) rename Brizco.Domain/Entities/{Task => Tasks}/Task.cs (87%) rename Brizco.Domain/Entities/{Task => Tasks}/TaskDay.cs (92%) rename Brizco.Domain/Entities/{Task => Tasks}/TaskPosition.cs (87%) rename Brizco.Domain/Entities/{Task => Tasks}/TaskRoutine.cs (79%) rename Brizco.Domain/Entities/{Task => Tasks}/TaskShift.cs (83%) rename Brizco.Domain/Entities/{User => Users}/ApplicationRole.cs (74%) rename Brizco.Domain/Entities/{User => Users}/ApplicationUser.cs (93%) diff --git a/Brizco.Api/WebFramework/Configurations/ServiceExtensions.cs b/Brizco.Api/WebFramework/Configurations/ServiceExtensions.cs index a3d53f4..379e751 100644 --- a/Brizco.Api/WebFramework/Configurations/ServiceExtensions.cs +++ b/Brizco.Api/WebFramework/Configurations/ServiceExtensions.cs @@ -2,6 +2,7 @@ using Asp.Versioning; using AspNetCoreRateLimit; using AspNetCoreRateLimit.Redis; +using Brizco.Domain.Entities.Users; using Marten; using Microsoft.AspNetCore.ResponseCompression; using StackExchange.Redis.Extensions.Core.Configuration; diff --git a/Brizco.Core/CoreServices/Abstracts/IJwtService.cs b/Brizco.Core/CoreServices/Abstracts/IJwtService.cs index 042cf3b..5adb635 100644 --- a/Brizco.Core/CoreServices/Abstracts/IJwtService.cs +++ b/Brizco.Core/CoreServices/Abstracts/IJwtService.cs @@ -1,4 +1,6 @@ -namespace Brizco.Core.CoreServices.Abstracts; +using Brizco.Domain.Entities.Users; + +namespace Brizco.Core.CoreServices.Abstracts; public interface IJwtService : IScopedDependency { diff --git a/Brizco.Core/CoreServices/AccountService.cs b/Brizco.Core/CoreServices/AccountService.cs index 4d8c6d5..118292f 100644 --- a/Brizco.Core/CoreServices/AccountService.cs +++ b/Brizco.Core/CoreServices/AccountService.cs @@ -1,5 +1,7 @@ -using Brizco.Domain.Entities.Shift; -using System.Threading; +using System.Threading; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Users; using NPOI.SS.Formula.Functions; namespace Brizco.Core.CoreServices; diff --git a/Brizco.Core/CoreServices/JwtService.cs b/Brizco.Core/CoreServices/JwtService.cs index e46de78..bdaee5a 100644 --- a/Brizco.Core/CoreServices/JwtService.cs +++ b/Brizco.Core/CoreServices/JwtService.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.Options; using System.IdentityModel.Tokens.Jwt; using System.Text; +using Brizco.Domain.Entities.Users; namespace Brizco.Core.CoreServices; diff --git a/Brizco.Core/CoreServices/PageService.cs b/Brizco.Core/CoreServices/PageService.cs index e6d222f..09db5c2 100644 --- a/Brizco.Core/CoreServices/PageService.cs +++ b/Brizco.Core/CoreServices/PageService.cs @@ -1,8 +1,10 @@ -using Brizco.Domain.Entities.Task; -using Brizco.Domain.Entities.Routine; -using Brizco.Domain.Entities.Shift; -using Task = Brizco.Domain.Entities.Task.Task; +using Task = Brizco.Domain.Entities.Tasks.Task; using System.Linq; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Routines; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; +using Brizco.Domain.Entities.Users; namespace Brizco.Core.CoreServices; @@ -206,7 +208,7 @@ public class PageService : IPageService .SelectMany(s=>s.Shifts).OrderBy(s=>s.StartAt).ToList().ForEach(s=>item.Shifts.Add(s.Clone())); foreach (var shift in item.Shifts) { - var existedShiftPlan = await _repositoryWrapper.SetRepository() + var existedShiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == day.Date, cancellationToken); shift.CurrentShiftPlanId = existedShiftPlan?.Id ?? default; diff --git a/Brizco.Core/CoreServices/ReportServices/ShiftPlanReportCommandHandler.cs b/Brizco.Core/CoreServices/ReportServices/ShiftPlanReportCommandHandler.cs index 5ada8cf..814ec21 100644 --- a/Brizco.Core/CoreServices/ReportServices/ShiftPlanReportCommandHandler.cs +++ b/Brizco.Core/CoreServices/ReportServices/ShiftPlanReportCommandHandler.cs @@ -1,5 +1,5 @@ -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; using MD.PersianDateTime.Standard; namespace Brizco.Core.CoreServices.ReportServices; diff --git a/Brizco.Core/CoreServices/ReportServices/TaskReportCommandHandler.cs b/Brizco.Core/CoreServices/ReportServices/TaskReportCommandHandler.cs index b5e01fa..0c97152 100644 --- a/Brizco.Core/CoreServices/ReportServices/TaskReportCommandHandler.cs +++ b/Brizco.Core/CoreServices/ReportServices/TaskReportCommandHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Tasks; using Task = System.Threading.Tasks.Task; namespace Brizco.Core.CoreServices.ReportServices; @@ -12,7 +12,7 @@ public class TaskReportCommandHandler : IRequestHandler Handle(TaskReportCommand request, CancellationToken cancellationToken) { - var tasks = await _repositoryWrapper.SetRepository() + var tasks = await _repositoryWrapper.SetRepository() .TableNoTracking .Select(TaskMapper.ProjectToLDto) .ToListAsync(cancellationToken); diff --git a/Brizco.Core/EntityServices/Abstracts/IUserService.cs b/Brizco.Core/EntityServices/Abstracts/IUserService.cs index 1a7d040..c67a781 100644 --- a/Brizco.Core/EntityServices/Abstracts/IUserService.cs +++ b/Brizco.Core/EntityServices/Abstracts/IUserService.cs @@ -1,4 +1,6 @@ -namespace Brizco.Core.EntityServices.Abstracts; +using Brizco.Domain.Entities.Users; + +namespace Brizco.Core.EntityServices.Abstracts; public interface IUserService : IScopedDependency { diff --git a/Brizco.Core/EntityServices/ActivityService.cs b/Brizco.Core/EntityServices/ActivityService.cs index 15ab09b..e1b867c 100644 --- a/Brizco.Core/EntityServices/ActivityService.cs +++ b/Brizco.Core/EntityServices/ActivityService.cs @@ -1,6 +1,6 @@ -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.Task; -using Task = Brizco.Domain.Entities.Task.Task; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; +using Task = Brizco.Domain.Entities.Tasks.Task; namespace Brizco.Core.EntityServices; diff --git a/Brizco.Core/EntityServices/ComplexService.cs b/Brizco.Core/EntityServices/ComplexService.cs index 0b33104..4906fb8 100644 --- a/Brizco.Core/EntityServices/ComplexService.cs +++ b/Brizco.Core/EntityServices/ComplexService.cs @@ -1,4 +1,6 @@ -namespace Brizco.Core.EntityServices; +using Brizco.Domain.Entities.Users; + +namespace Brizco.Core.EntityServices; public class ComplexService : IComplexService { diff --git a/Brizco.Core/EntityServices/ShiftPlanService.cs b/Brizco.Core/EntityServices/ShiftPlanService.cs index ee54551..e546cb7 100644 --- a/Brizco.Core/EntityServices/ShiftPlanService.cs +++ b/Brizco.Core/EntityServices/ShiftPlanService.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; namespace Brizco.Core.EntityServices; diff --git a/Brizco.Core/EntityServices/UserService.cs b/Brizco.Core/EntityServices/UserService.cs index 18166fe..afba39f 100644 --- a/Brizco.Core/EntityServices/UserService.cs +++ b/Brizco.Core/EntityServices/UserService.cs @@ -1,4 +1,7 @@ -namespace Brizco.Core.EntityServices; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; + +namespace Brizco.Core.EntityServices; public class UserService : IUserService { diff --git a/Brizco.Core/QuartzServices/NotificationScheduledJob.cs b/Brizco.Core/QuartzServices/NotificationScheduledJob.cs index 5faa7c8..b0fa9c7 100644 --- a/Brizco.Core/QuartzServices/NotificationScheduledJob.cs +++ b/Brizco.Core/QuartzServices/NotificationScheduledJob.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; using Microsoft.Extensions.Logging; using Quartz; diff --git a/Brizco.Domain/Brizco.Domain.csproj b/Brizco.Domain/Brizco.Domain.csproj index e4555db..9f6ec27 100644 --- a/Brizco.Domain/Brizco.Domain.csproj +++ b/Brizco.Domain/Brizco.Domain.csproj @@ -56,9 +56,12 @@ + + + diff --git a/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs b/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs index fe10666..ab179c5 100644 --- a/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs +++ b/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs @@ -1,6 +1,4 @@ -using Brizco.Domain.Entities.Shift; - -namespace Brizco.Domain.CommandQueries.Commands; +namespace Brizco.Domain.CommandQueries.Commands; public sealed record CreateShiftCommand(string Title, TimeSpan StartAt, TimeSpan EndAt, string Description, List DayOfWeeks, List Routines) : IRequest; diff --git a/Brizco.Domain/Dtos/LargeDtos/ActivityLDto.cs b/Brizco.Domain/Dtos/LargeDtos/ActivityLDto.cs index 90e05e6..c8bb196 100644 --- a/Brizco.Domain/Dtos/LargeDtos/ActivityLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/ActivityLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Dtos.LargeDtos; public class ActivityLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/ComplexLDto.cs b/Brizco.Domain/Dtos/LargeDtos/ComplexLDto.cs index 0fb65cd..7591244 100644 --- a/Brizco.Domain/Dtos/LargeDtos/ComplexLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/ComplexLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Domain.Dtos.LargeDtos; public class ComplexLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/PositionLDto.cs b/Brizco.Domain/Dtos/LargeDtos/PositionLDto.cs index 9562efa..67d25ea 100644 --- a/Brizco.Domain/Dtos/LargeDtos/PositionLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/PositionLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Domain.Dtos.LargeDtos; public class PositionLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/SectionLDto.cs b/Brizco.Domain/Dtos/LargeDtos/SectionLDto.cs index 712e8e4..05a370b 100644 --- a/Brizco.Domain/Dtos/LargeDtos/SectionLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/SectionLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Domain.Dtos.LargeDtos; public class SectionLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/ShiftLDto.cs b/Brizco.Domain/Dtos/LargeDtos/ShiftLDto.cs index d503c99..ee61854 100644 --- a/Brizco.Domain/Dtos/LargeDtos/ShiftLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/ShiftLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.LargeDtos; public class ShiftLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/ShiftPlanLDto.cs b/Brizco.Domain/Dtos/LargeDtos/ShiftPlanLDto.cs index 10bf32f..b6d6746 100644 --- a/Brizco.Domain/Dtos/LargeDtos/ShiftPlanLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/ShiftPlanLDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.LargeDtos; public class ShiftPlanLDto : BaseDto { diff --git a/Brizco.Domain/Dtos/LargeDtos/TaskLDto.cs b/Brizco.Domain/Dtos/LargeDtos/TaskLDto.cs index bde71bb..50694ba 100644 --- a/Brizco.Domain/Dtos/LargeDtos/TaskLDto.cs +++ b/Brizco.Domain/Dtos/LargeDtos/TaskLDto.cs @@ -1,6 +1,8 @@ -namespace Brizco.Domain.Dtos.LargeDtos; +using Task = Brizco.Domain.Entities.Tasks.Task; -public class TaskLDto : BaseDto +namespace Brizco.Domain.Dtos.LargeDtos; + +public class TaskLDto : BaseDto { public TaskType Type { get; set; } public string Title { get; set; } = string.Empty; @@ -17,10 +19,7 @@ public class TaskLDto : BaseDto public List Shifts { get; set; } = new(); - public List Positions { get; set; } = new(); - - public List Days { get; internal set; } = new(); - - public List Routines { get; internal set; } = new(); + public List Days { get; set; } = new(); + public List Routines { get; set; } = new(); } \ No newline at end of file diff --git a/Brizco.Domain/Dtos/SmallDtos/ActivitySDto.cs b/Brizco.Domain/Dtos/SmallDtos/ActivitySDto.cs index 225d9ed..47ac7ce 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ActivitySDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ActivitySDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ActivitySDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ApplicationUserSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ApplicationUserSDto.cs index 0d7de34..b5d8d6f 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ApplicationUserSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ApplicationUserSDto.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; namespace Brizco.Domain.Dtos.SmallDtos; diff --git a/Brizco.Domain/Dtos/SmallDtos/ComplexSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ComplexSDto.cs index 3b19098..2e2446d 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ComplexSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ComplexSDto.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; namespace Brizco.Domain.Dtos.SmallDtos; diff --git a/Brizco.Domain/Dtos/SmallDtos/ComplexUserRoleSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ComplexUserRoleSDto.cs index 400d1b4..3e64cb8 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ComplexUserRoleSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ComplexUserRoleSDto.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; namespace Brizco.Domain.Dtos.SmallDtos; diff --git a/Brizco.Domain/Dtos/SmallDtos/ComplexUserSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ComplexUserSDto.cs index 3b7ec5f..cd615fa 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ComplexUserSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ComplexUserSDto.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; namespace Brizco.Domain.Dtos.SmallDtos; diff --git a/Brizco.Domain/Dtos/SmallDtos/PositionSDto.cs b/Brizco.Domain/Dtos/SmallDtos/PositionSDto.cs index 70b343c..255f4d8 100644 --- a/Brizco.Domain/Dtos/SmallDtos/PositionSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/PositionSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Domain.Dtos.SmallDtos; public class PositionSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/RoutineSDto.cs b/Brizco.Domain/Dtos/SmallDtos/RoutineSDto.cs index 863d389..8d54782 100644 --- a/Brizco.Domain/Dtos/SmallDtos/RoutineSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/RoutineSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Routines; + +namespace Brizco.Domain.Dtos.SmallDtos; public class RoutineSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/SectionSDto.cs b/Brizco.Domain/Dtos/SmallDtos/SectionSDto.cs index da12239..1d1c746 100644 --- a/Brizco.Domain/Dtos/SmallDtos/SectionSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/SectionSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Domain.Dtos.SmallDtos; public class SectionSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftDaySDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftDaySDto.cs index ff2b1f3..f0c4668 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ShiftDaySDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ShiftDaySDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ShiftDaySDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftPlanSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftPlanSDto.cs index 56411c2..a146c6c 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ShiftPlanSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ShiftPlanSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ShiftPlanSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftPlanUserSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftPlanUserSDto.cs index 800bff1..bbbffb7 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ShiftPlanUserSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ShiftPlanUserSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ShiftPlanUserSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs index d68393c..6deda54 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ShiftRoutineSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftSDto.cs index d461f8b..a8a6469 100644 --- a/Brizco.Domain/Dtos/SmallDtos/ShiftSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/ShiftSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Dtos.SmallDtos; public class ShiftSDto : BaseDto { public string Title { get; set; } = string.Empty; diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs index 07d1dd5..fd3d5c7 100644 --- a/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Dtos.SmallDtos; public class TaskDaySDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskPositionSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskPositionSDto.cs index c3fa89e..a40f9d7 100644 --- a/Brizco.Domain/Dtos/SmallDtos/TaskPositionSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/TaskPositionSDto.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Tasks; namespace Brizco.Domain.Dtos.SmallDtos; diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs index 13c3156..0dbd8e8 100644 --- a/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Dtos.SmallDtos; public class TaskRoutineSDto : BaseDto { diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs index 57ad3a1..378ea47 100644 --- a/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs @@ -1,6 +1,8 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Task = Brizco.Domain.Entities.Tasks.Task; -public class TaskSDto : BaseDto +namespace Brizco.Domain.Dtos.SmallDtos; + +public class TaskSDto : BaseDto { public TaskType Type { get; set; } public string Title { get; set; } = string.Empty; diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskShiftSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskShiftSDto.cs index 3c74483..0a3c39b 100644 --- a/Brizco.Domain/Dtos/SmallDtos/TaskShiftSDto.cs +++ b/Brizco.Domain/Dtos/SmallDtos/TaskShiftSDto.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Dtos.SmallDtos; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Dtos.SmallDtos; public class TaskShiftSDto : BaseDto { diff --git a/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs b/Brizco.Domain/Entities/Complexes/Aggregate.Complex.cs similarity index 97% rename from Brizco.Domain/Entities/Complex/Aggregate.Complex.cs rename to Brizco.Domain/Entities/Complexes/Aggregate.Complex.cs index f7fcfe0..393dd98 100644 --- a/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs +++ b/Brizco.Domain/Entities/Complexes/Aggregate.Complex.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; public partial class Complex { diff --git a/Brizco.Domain/Entities/Complex/Complex.cs b/Brizco.Domain/Entities/Complexes/Complex.cs similarity index 67% rename from Brizco.Domain/Entities/Complex/Complex.cs rename to Brizco.Domain/Entities/Complexes/Complex.cs index 77d19a4..0690304 100644 --- a/Brizco.Domain/Entities/Complex/Complex.cs +++ b/Brizco.Domain/Entities/Complexes/Complex.cs @@ -1,6 +1,8 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Users; +using Task = Brizco.Domain.Entities.Tasks.Task; -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -23,9 +25,9 @@ public partial class Complex : ApiEntity public string Address { get; internal set; } = string.Empty; public string SupportPhone { get; internal set; } = string.Empty; - public List Roles { get; set; } = new(); - public List Tasks { get; set; } = new(); - public List Shifts { get; set; } = new(); - public List Users { get; set; } = new(); + public List Roles { get; internal set; } = new(); + public List Tasks { get; internal set; } = new(); + public List Shifts { get; internal set; } = new(); + public List Users { get; internal set; } = new(); } diff --git a/Brizco.Domain/Entities/Complex/ComplexUser.cs b/Brizco.Domain/Entities/Complexes/ComplexUser.cs similarity index 88% rename from Brizco.Domain/Entities/Complex/ComplexUser.cs rename to Brizco.Domain/Entities/Complexes/ComplexUser.cs index a7d3dd7..7c34617 100644 --- a/Brizco.Domain/Entities/Complex/ComplexUser.cs +++ b/Brizco.Domain/Entities/Complexes/ComplexUser.cs @@ -1,6 +1,6 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] public partial class ComplexUser : ApiEntity diff --git a/Brizco.Domain/Entities/Complex/ComplexUserRole.cs b/Brizco.Domain/Entities/Complexes/ComplexUserRole.cs similarity index 88% rename from Brizco.Domain/Entities/Complex/ComplexUserRole.cs rename to Brizco.Domain/Entities/Complexes/ComplexUserRole.cs index 7a7685b..4616a6a 100644 --- a/Brizco.Domain/Entities/Complex/ComplexUserRole.cs +++ b/Brizco.Domain/Entities/Complexes/ComplexUserRole.cs @@ -1,6 +1,6 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] public class ComplexUserRole : ApiEntity diff --git a/Brizco.Domain/Entities/Complex/Position.cs b/Brizco.Domain/Entities/Complexes/Position.cs similarity index 78% rename from Brizco.Domain/Entities/Complex/Position.cs rename to Brizco.Domain/Entities/Complexes/Position.cs index aa4cba4..bb2c451 100644 --- a/Brizco.Domain/Entities/Complex/Position.cs +++ b/Brizco.Domain/Entities/Complexes/Position.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -23,11 +23,11 @@ public partial class Position : ApiEntity - public Guid ComplexId { get; set; } - public Complex? Complex { get; set; } + public Guid ComplexId { get; internal set; } + public Complex? Complex { get; internal set; } - public Guid SectionId { get; set; } - public Section? Section { get; set; } + public Guid SectionId { get; internal set; } + public Section? Section { get; internal set; } public List Permissions { get; set; } = new(); } \ No newline at end of file diff --git a/Brizco.Domain/Entities/Complex/PositionPermission.cs b/Brizco.Domain/Entities/Complexes/PositionPermission.cs similarity index 82% rename from Brizco.Domain/Entities/Complex/PositionPermission.cs rename to Brizco.Domain/Entities/Complexes/PositionPermission.cs index 6966380..7f1ee29 100644 --- a/Brizco.Domain/Entities/Complex/PositionPermission.cs +++ b/Brizco.Domain/Entities/Complexes/PositionPermission.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -15,7 +15,7 @@ public partial class PositionPermission : ApiEntity PositionId = positionId; Permission = permission; } - public Guid PositionId { get; set; } - public Position? Position { get; set; } + public Guid PositionId { get; internal set; } + public Position? Position { get; internal set; } public string Permission { get; set; } = string.Empty; } \ No newline at end of file diff --git a/Brizco.Domain/Entities/Complex/Section.cs b/Brizco.Domain/Entities/Complexes/Section.cs similarity index 85% rename from Brizco.Domain/Entities/Complex/Section.cs rename to Brizco.Domain/Entities/Complexes/Section.cs index f9c2e40..70e708b 100644 --- a/Brizco.Domain/Entities/Complex/Section.cs +++ b/Brizco.Domain/Entities/Complexes/Section.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Complex; +namespace Brizco.Domain.Entities.Complexes; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -19,8 +19,8 @@ public partial class Section : ApiEntity public string Name { get; internal set; } = string.Empty; public string Description { get; internal set; } = string.Empty; - public Guid ComplexId { get; set; } - public Complex? Complex { get; set; } + public Guid ComplexId { get; internal set; } + public Complex? Complex { get; internal set; } public List Positions { get; internal set; } = new(); } \ No newline at end of file diff --git a/Brizco.Domain/Entities/Routine/Aggregate.Routine.cs b/Brizco.Domain/Entities/Routines/Aggregate.Routine.cs similarity index 80% rename from Brizco.Domain/Entities/Routine/Aggregate.Routine.cs rename to Brizco.Domain/Entities/Routines/Aggregate.Routine.cs index 06d24a6..e86298b 100644 --- a/Brizco.Domain/Entities/Routine/Aggregate.Routine.cs +++ b/Brizco.Domain/Entities/Routines/Aggregate.Routine.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Entities.Routine; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Domain.Entities.Routines; public partial class Routine { diff --git a/Brizco.Domain/Entities/Routine/Routine.cs b/Brizco.Domain/Entities/Routines/Routine.cs similarity index 83% rename from Brizco.Domain/Entities/Routine/Routine.cs rename to Brizco.Domain/Entities/Routines/Routine.cs index 6f31cb1..3ee8f54 100644 --- a/Brizco.Domain/Entities/Routine/Routine.cs +++ b/Brizco.Domain/Entities/Routines/Routine.cs @@ -1,4 +1,7 @@ -namespace Brizco.Domain.Entities.Routine; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; + +namespace Brizco.Domain.Entities.Routines; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] @@ -19,7 +22,7 @@ public partial class Routine : ApiEntity public string Description { get; internal set; } = string.Empty; public Guid ComplexId { get; internal set; } - public Complex.Complex? Complex { get; internal set; } + public Complex? Complex { get; internal set; } public List Tasks { get; internal set; } = new(); diff --git a/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs b/Brizco.Domain/Entities/Shifts/Aggregate.Shift.cs similarity index 95% rename from Brizco.Domain/Entities/Shift/Aggregate.Shift.cs rename to Brizco.Domain/Entities/Shifts/Aggregate.Shift.cs index b3a650b..e7f9322 100644 --- a/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs +++ b/Brizco.Domain/Entities/Shifts/Aggregate.Shift.cs @@ -1,6 +1,4 @@ -using System; - -namespace Brizco.Domain.Entities.Shift; +namespace Brizco.Domain.Entities.Shifts; public partial class Shift { public static Shift Create(string title, string description, TimeSpan startAt, TimeSpan endAt,Guid complexId) diff --git a/Brizco.Domain/Entities/Shift/Shift.cs b/Brizco.Domain/Entities/Shifts/Shift.cs similarity index 88% rename from Brizco.Domain/Entities/Shift/Shift.cs rename to Brizco.Domain/Entities/Shifts/Shift.cs index e419fc1..9c47726 100644 --- a/Brizco.Domain/Entities/Shift/Shift.cs +++ b/Brizco.Domain/Entities/Shifts/Shift.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Shift; +namespace Brizco.Domain.Entities.Shifts; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -22,8 +22,8 @@ public partial class Shift : ApiEntity public TimeSpan EndAt { get; internal set; } public string Description { get; internal set; } = string.Empty; - public Guid ComplexId { get; set; } - public Complex.Complex? Complex { get; set; } + public Guid ComplexId { get; internal set; } + public Complex? Complex { get; internal set; } public List Days { get; internal set; } = new(); public List Plans { get; internal set; } = new(); diff --git a/Brizco.Domain/Entities/Shift/ShiftDay.cs b/Brizco.Domain/Entities/Shifts/ShiftDay.cs similarity index 92% rename from Brizco.Domain/Entities/Shift/ShiftDay.cs rename to Brizco.Domain/Entities/Shifts/ShiftDay.cs index bb8c96c..ca8a474 100644 --- a/Brizco.Domain/Entities/Shift/ShiftDay.cs +++ b/Brizco.Domain/Entities/Shifts/ShiftDay.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Shift; +namespace Brizco.Domain.Entities.Shifts; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] diff --git a/Brizco.Domain/Entities/Shift/ShiftPlan.cs b/Brizco.Domain/Entities/Shifts/ShiftPlan.cs similarity index 85% rename from Brizco.Domain/Entities/Shift/ShiftPlan.cs rename to Brizco.Domain/Entities/Shifts/ShiftPlan.cs index 4b18e4d..50036fc 100644 --- a/Brizco.Domain/Entities/Shift/ShiftPlan.cs +++ b/Brizco.Domain/Entities/Shifts/ShiftPlan.cs @@ -1,6 +1,7 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Routines; +using Brizco.Domain.Entities.Users; -namespace Brizco.Domain.Entities.Shift; +namespace Brizco.Domain.Entities.Shifts; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)] @@ -31,10 +32,10 @@ public partial class ShiftPlan : ApiEntity public virtual Shift? Shift { get; internal set; } public Guid RoutineId { get; internal set; } - public virtual Routine.Routine? Routine { get; internal set; } + public virtual Routine? Routine { get; internal set; } public Guid ComplexId { get; internal set; } - public Complex.Complex? Complex { get; internal set; } + public Complex? Complex { get; internal set; } public Guid SupervisorId { get; internal set; } public ApplicationUser? Supervisor { get; internal set; } diff --git a/Brizco.Domain/Entities/Shift/ShiftPlanUser.cs b/Brizco.Domain/Entities/Shifts/ShiftPlanUser.cs similarity index 90% rename from Brizco.Domain/Entities/Shift/ShiftPlanUser.cs rename to Brizco.Domain/Entities/Shifts/ShiftPlanUser.cs index 8382f30..c9b30bb 100644 --- a/Brizco.Domain/Entities/Shift/ShiftPlanUser.cs +++ b/Brizco.Domain/Entities/Shifts/ShiftPlanUser.cs @@ -1,6 +1,6 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; -namespace Brizco.Domain.Entities.Shift; +namespace Brizco.Domain.Entities.Shifts; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] diff --git a/Brizco.Domain/Entities/Shift/ShiftRoutine.cs b/Brizco.Domain/Entities/Shifts/ShiftRoutine.cs similarity index 79% rename from Brizco.Domain/Entities/Shift/ShiftRoutine.cs rename to Brizco.Domain/Entities/Shifts/ShiftRoutine.cs index 67a8fba..14f7087 100644 --- a/Brizco.Domain/Entities/Shift/ShiftRoutine.cs +++ b/Brizco.Domain/Entities/Shifts/ShiftRoutine.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Routines; + +namespace Brizco.Domain.Entities.Shifts; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] @@ -14,7 +16,7 @@ public class ShiftRoutine : ApiEntity ShiftId = shiftId; } public Guid RoutineId { get; internal set; } - public Routine.Routine? Routine { get; internal set; } + public Routine? Routine { get; internal set; } public Guid ShiftId { get; internal set; } public Shift? Shift { get; internal set; } diff --git a/Brizco.Domain/Entities/Task/Activity.cs b/Brizco.Domain/Entities/Tasks/Activity.cs similarity index 93% rename from Brizco.Domain/Entities/Task/Activity.cs rename to Brizco.Domain/Entities/Tasks/Activity.cs index 463466e..6dd7539 100644 --- a/Brizco.Domain/Entities/Task/Activity.cs +++ b/Brizco.Domain/Entities/Tasks/Activity.cs @@ -1,6 +1,4 @@ -using Brizco.Domain.Entities.User; - -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; public partial class Activity : Task { diff --git a/Brizco.Domain/Entities/Task/Aggregate.Task.cs b/Brizco.Domain/Entities/Tasks/Aggregate.Task.cs similarity index 98% rename from Brizco.Domain/Entities/Task/Aggregate.Task.cs rename to Brizco.Domain/Entities/Tasks/Aggregate.Task.cs index 0f18bce..9fd60dc 100644 --- a/Brizco.Domain/Entities/Task/Aggregate.Task.cs +++ b/Brizco.Domain/Entities/Tasks/Aggregate.Task.cs @@ -1,7 +1,6 @@ using Brizco.Common.Models.Exception; -using Brizco.Domain.Entities.Routine; -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; public partial class Task diff --git a/Brizco.Domain/Entities/Task/Task.cs b/Brizco.Domain/Entities/Tasks/Task.cs similarity index 87% rename from Brizco.Domain/Entities/Task/Task.cs rename to Brizco.Domain/Entities/Tasks/Task.cs index 22da8df..b0d3186 100644 --- a/Brizco.Domain/Entities/Task/Task.cs +++ b/Brizco.Domain/Entities/Tasks/Task.cs @@ -1,6 +1,4 @@ -using Brizco.Domain.Entities.Shift; - -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget )] [AdaptTo("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)] @@ -41,11 +39,11 @@ public partial class Task : ApiEntity public bool IsDisposable { get; internal set; } public DateTime SetFor { get; internal set; } public bool HasDisposed { get; internal set; } - public TaskScheduleType ScheduleType { get; set; } + public TaskScheduleType ScheduleType { get; internal set; } - public Guid ComplexId { get; set; } - public Complex.Complex? Complex { get; set; } - public bool IsActivity { get; set; } + public Guid ComplexId { get; internal set; } + public Complex? Complex { get; internal set; } + public bool IsActivity { get; internal set; } public int Amount { get; internal set; } diff --git a/Brizco.Domain/Entities/Task/TaskDay.cs b/Brizco.Domain/Entities/Tasks/TaskDay.cs similarity index 92% rename from Brizco.Domain/Entities/Task/TaskDay.cs rename to Brizco.Domain/Entities/Tasks/TaskDay.cs index dda3a6a..bfe8004 100644 --- a/Brizco.Domain/Entities/Task/TaskDay.cs +++ b/Brizco.Domain/Entities/Tasks/TaskDay.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] diff --git a/Brizco.Domain/Entities/Task/TaskPosition.cs b/Brizco.Domain/Entities/Tasks/TaskPosition.cs similarity index 87% rename from Brizco.Domain/Entities/Task/TaskPosition.cs rename to Brizco.Domain/Entities/Tasks/TaskPosition.cs index 89f7043..f0c72c3 100644 --- a/Brizco.Domain/Entities/Task/TaskPosition.cs +++ b/Brizco.Domain/Entities/Tasks/TaskPosition.cs @@ -1,6 +1,4 @@ -using Brizco.Domain.Entities.Complex; - -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] diff --git a/Brizco.Domain/Entities/Task/TaskRoutine.cs b/Brizco.Domain/Entities/Tasks/TaskRoutine.cs similarity index 79% rename from Brizco.Domain/Entities/Task/TaskRoutine.cs rename to Brizco.Domain/Entities/Tasks/TaskRoutine.cs index 2149bb6..49c2d41 100644 --- a/Brizco.Domain/Entities/Task/TaskRoutine.cs +++ b/Brizco.Domain/Entities/Tasks/TaskRoutine.cs @@ -1,4 +1,6 @@ -namespace Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Routines; + +namespace Brizco.Domain.Entities.Tasks; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] @@ -20,5 +22,5 @@ public class TaskRoutine : ApiEntity public Task? Task { get; internal set; } public Guid RoutineId { get; internal set; } - public Routine.Routine? Routine { get; internal set; } + public Routine? Routine { get; internal set; } } \ No newline at end of file diff --git a/Brizco.Domain/Entities/Task/TaskShift.cs b/Brizco.Domain/Entities/Tasks/TaskShift.cs similarity index 83% rename from Brizco.Domain/Entities/Task/TaskShift.cs rename to Brizco.Domain/Entities/Tasks/TaskShift.cs index 7350def..c75aa72 100644 --- a/Brizco.Domain/Entities/Task/TaskShift.cs +++ b/Brizco.Domain/Entities/Tasks/TaskShift.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.Task; +namespace Brizco.Domain.Entities.Tasks; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] @@ -18,5 +18,5 @@ public class TaskShift : ApiEntity public virtual Task? Task { get; internal set; } public Guid ShiftId { get; internal set; } - public virtual Shift.Shift? Shift { get; internal set; } + public virtual Shift? Shift { get; internal set; } } \ No newline at end of file diff --git a/Brizco.Domain/Entities/User/ApplicationRole.cs b/Brizco.Domain/Entities/Users/ApplicationRole.cs similarity index 74% rename from Brizco.Domain/Entities/User/ApplicationRole.cs rename to Brizco.Domain/Entities/Users/ApplicationRole.cs index d794e9a..4f113a4 100644 --- a/Brizco.Domain/Entities/User/ApplicationRole.cs +++ b/Brizco.Domain/Entities/Users/ApplicationRole.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.User; +namespace Brizco.Domain.Entities.Users; public class ApplicationRole : IdentityRole { @@ -7,5 +7,5 @@ public class ApplicationRole : IdentityRole public string PersianName { get; set; } = string.Empty; public Guid? ComplexId { get; set; } - public Complex.Complex? Complex { get; set; } + public Complex? Complex { get; set; } } \ No newline at end of file diff --git a/Brizco.Domain/Entities/User/ApplicationUser.cs b/Brizco.Domain/Entities/Users/ApplicationUser.cs similarity index 93% rename from Brizco.Domain/Entities/User/ApplicationUser.cs rename to Brizco.Domain/Entities/Users/ApplicationUser.cs index 00d1dc1..e6ce368 100644 --- a/Brizco.Domain/Entities/User/ApplicationUser.cs +++ b/Brizco.Domain/Entities/Users/ApplicationUser.cs @@ -1,4 +1,4 @@ -namespace Brizco.Domain.Entities.User; +namespace Brizco.Domain.Entities.Users; [AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)] [GenerateMapper] diff --git a/Brizco.Domain/Mappers/ActivityMapper.g.cs b/Brizco.Domain/Mappers/ActivityMapper.g.cs index 3021ae8..823309d 100644 --- a/Brizco.Domain/Mappers/ActivityMapper.g.cs +++ b/Brizco.Domain/Mappers/ActivityMapper.g.cs @@ -2,9 +2,9 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.Task; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; +using Brizco.Domain.Entities.Users; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/ApplicationUserMapper.g.cs b/Brizco.Domain/Mappers/ApplicationUserMapper.g.cs index b80f0f7..4f74ac6 100644 --- a/Brizco.Domain/Mappers/ApplicationUserMapper.g.cs +++ b/Brizco.Domain/Mappers/ApplicationUserMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/ComplexMapper.g.cs b/Brizco.Domain/Mappers/ComplexMapper.g.cs index b9e78f6..c41bd46 100644 --- a/Brizco.Domain/Mappers/ComplexMapper.g.cs +++ b/Brizco.Domain/Mappers/ComplexMapper.g.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/ComplexUserMapper.g.cs b/Brizco.Domain/Mappers/ComplexUserMapper.g.cs index db3d2be..584ab3d 100644 --- a/Brizco.Domain/Mappers/ComplexUserMapper.g.cs +++ b/Brizco.Domain/Mappers/ComplexUserMapper.g.cs @@ -1,8 +1,8 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/ComplexUserRoleMapper.g.cs b/Brizco.Domain/Mappers/ComplexUserRoleMapper.g.cs index 66f021c..d81f350 100644 --- a/Brizco.Domain/Mappers/ComplexUserRoleMapper.g.cs +++ b/Brizco.Domain/Mappers/ComplexUserRoleMapper.g.cs @@ -1,8 +1,8 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/PositionMapper.g.cs b/Brizco.Domain/Mappers/PositionMapper.g.cs index b46c354..dd66dd5 100644 --- a/Brizco.Domain/Mappers/PositionMapper.g.cs +++ b/Brizco.Domain/Mappers/PositionMapper.g.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/RoutineMapper.g.cs b/Brizco.Domain/Mappers/RoutineMapper.g.cs index 3b1b749..7d493e4 100644 --- a/Brizco.Domain/Mappers/RoutineMapper.g.cs +++ b/Brizco.Domain/Mappers/RoutineMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Routine; +using Brizco.Domain.Entities.Routines; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/SectionMapper.g.cs b/Brizco.Domain/Mappers/SectionMapper.g.cs index 61dc964..ef880f2 100644 --- a/Brizco.Domain/Mappers/SectionMapper.g.cs +++ b/Brizco.Domain/Mappers/SectionMapper.g.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/ShiftDayMapper.g.cs b/Brizco.Domain/Mappers/ShiftDayMapper.g.cs index 57a0928..9a88a01 100644 --- a/Brizco.Domain/Mappers/ShiftDayMapper.g.cs +++ b/Brizco.Domain/Mappers/ShiftDayMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/ShiftMapper.g.cs b/Brizco.Domain/Mappers/ShiftMapper.g.cs index 52b2923..5ae2a32 100644 --- a/Brizco.Domain/Mappers/ShiftMapper.g.cs +++ b/Brizco.Domain/Mappers/ShiftMapper.g.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Shifts; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/ShiftPlanMapper.g.cs b/Brizco.Domain/Mappers/ShiftPlanMapper.g.cs index 1170d98..189c6f9 100644 --- a/Brizco.Domain/Mappers/ShiftPlanMapper.g.cs +++ b/Brizco.Domain/Mappers/ShiftPlanMapper.g.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Linq.Expressions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.Routine; -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Routines; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Users; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/ShiftPlanUserMapper.g.cs b/Brizco.Domain/Mappers/ShiftPlanUserMapper.g.cs index ad91c26..483ad6f 100644 --- a/Brizco.Domain/Mappers/ShiftPlanUserMapper.g.cs +++ b/Brizco.Domain/Mappers/ShiftPlanUserMapper.g.cs @@ -1,9 +1,9 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Users; using Mapster.Models; namespace Brizco.Domain.Mappers diff --git a/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs b/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs index 11d91f1..d56bf90 100644 --- a/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs +++ b/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/TaskDayMapper.g.cs b/Brizco.Domain/Mappers/TaskDayMapper.g.cs index 1744b23..21ec98d 100644 --- a/Brizco.Domain/Mappers/TaskDayMapper.g.cs +++ b/Brizco.Domain/Mappers/TaskDayMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Tasks; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/TaskMapper.g.cs b/Brizco.Domain/Mappers/TaskMapper.g.cs index e62f466..2f6020b 100644 --- a/Brizco.Domain/Mappers/TaskMapper.g.cs +++ b/Brizco.Domain/Mappers/TaskMapper.g.cs @@ -5,11 +5,11 @@ using System.Linq.Expressions; using Brizco.Common.Extensions; using Brizco.Domain.Dtos.LargeDtos; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; using Mapster.Models; -using Task = Brizco.Domain.Entities.Task.Task; +using Task = Brizco.Domain.Entities.Tasks.Task; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/TaskPositionMapper.g.cs b/Brizco.Domain/Mappers/TaskPositionMapper.g.cs index def20a6..d657ca0 100644 --- a/Brizco.Domain/Mappers/TaskPositionMapper.g.cs +++ b/Brizco.Domain/Mappers/TaskPositionMapper.g.cs @@ -1,10 +1,10 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Tasks; using Mapster.Models; -using Task = Brizco.Domain.Entities.Task.Task; +using Task = Brizco.Domain.Entities.Tasks.Task; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/TaskRoutineMapper.g.cs b/Brizco.Domain/Mappers/TaskRoutineMapper.g.cs index f73f33d..63278c3 100644 --- a/Brizco.Domain/Mappers/TaskRoutineMapper.g.cs +++ b/Brizco.Domain/Mappers/TaskRoutineMapper.g.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Tasks; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/Mappers/TaskShiftMapper.g.cs b/Brizco.Domain/Mappers/TaskShiftMapper.g.cs index c3d8642..372eaad 100644 --- a/Brizco.Domain/Mappers/TaskShiftMapper.g.cs +++ b/Brizco.Domain/Mappers/TaskShiftMapper.g.cs @@ -1,10 +1,10 @@ using System; using System.Linq.Expressions; using Brizco.Domain.Dtos.SmallDtos; -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; using Mapster.Models; -using Task = Brizco.Domain.Entities.Task.Task; +using Task = Brizco.Domain.Entities.Tasks.Task; namespace Brizco.Domain.Mappers { diff --git a/Brizco.Domain/MapsterRegister.cs b/Brizco.Domain/MapsterRegister.cs index 8af944b..587ec77 100644 --- a/Brizco.Domain/MapsterRegister.cs +++ b/Brizco.Domain/MapsterRegister.cs @@ -1,6 +1,9 @@ using Brizco.Domain.Dtos.LargeDtos; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Tasks; using MD.PersianDateTime.Standard; -using Task = Brizco.Domain.Entities.Task.Task; +using Task = Brizco.Domain.Entities.Tasks.Task; namespace Brizco.Domain; diff --git a/Brizco.Repository/Handlers/Activity/CreateActivityCommandHandler.cs b/Brizco.Repository/Handlers/Activity/CreateActivityCommandHandler.cs index 2810413..2b600e2 100644 --- a/Brizco.Repository/Handlers/Activity/CreateActivityCommandHandler.cs +++ b/Brizco.Repository/Handlers/Activity/CreateActivityCommandHandler.cs @@ -22,7 +22,7 @@ public class CreateActivityCommandHandler : IRequestHandler().Add(activity); + _repositoryWrapper.SetRepository().Add(activity); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return activity.AdaptToLDto(); diff --git a/Brizco.Repository/Handlers/Activity/DeleteActivityCommandHandler.cs b/Brizco.Repository/Handlers/Activity/DeleteActivityCommandHandler.cs index 0551448..62e7e10 100644 --- a/Brizco.Repository/Handlers/Activity/DeleteActivityCommandHandler.cs +++ b/Brizco.Repository/Handlers/Activity/DeleteActivityCommandHandler.cs @@ -13,12 +13,12 @@ public class DeleteActivityCommandHandler : IRequestHandler() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (task == null) throw new AppException("Task not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(task); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Activity/GetActivitiesQueryHandler.cs b/Brizco.Repository/Handlers/Activity/GetActivitiesQueryHandler.cs index 5c0a8a5..85d0b82 100644 --- a/Brizco.Repository/Handlers/Activity/GetActivitiesQueryHandler.cs +++ b/Brizco.Repository/Handlers/Activity/GetActivitiesQueryHandler.cs @@ -23,7 +23,7 @@ public class GetActivitiesQueryHandler : IRequestHandler activities = _repositoryWrapper.SetRepository().TableNoTracking + IQueryable activities = _repositoryWrapper.SetRepository().TableNoTracking .Where(a=>a.IsActivity && a.ComplexId == complexId); if (_currentUserService is { Permissions: not null, RoleName: not null }) { diff --git a/Brizco.Repository/Handlers/Activity/GetActivityQueryHandler.cs b/Brizco.Repository/Handlers/Activity/GetActivityQueryHandler.cs index b54efdc..ece9288 100644 --- a/Brizco.Repository/Handlers/Activity/GetActivityQueryHandler.cs +++ b/Brizco.Repository/Handlers/Activity/GetActivityQueryHandler.cs @@ -13,7 +13,7 @@ public class GetActivityQueryHandler : IRequestHandler Handle(GetActivityQuery request, CancellationToken cancellationToken) { - var task = await _repositoryWrapper.SetRepository() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(ActivityMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/Activity/GetShiftPlanActivitiesQueryHandler.cs b/Brizco.Repository/Handlers/Activity/GetShiftPlanActivitiesQueryHandler.cs index 55722e1..92f5443 100644 --- a/Brizco.Repository/Handlers/Activity/GetShiftPlanActivitiesQueryHandler.cs +++ b/Brizco.Repository/Handlers/Activity/GetShiftPlanActivitiesQueryHandler.cs @@ -10,7 +10,7 @@ public class GetShiftPlanActivitiesQueryHandler : IRequestHandler> Handle(GetShiftPlanActivitiesQuery request, CancellationToken cancellationToken) { - var activities = await _repositoryWrapper.SetRepository() + var activities = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(a => a.ShiftPlanId == request.ShiftPlanId) .Select(ActivityMapper.ProjectToSDto) diff --git a/Brizco.Repository/Handlers/Activity/UpdateActivityCommandHandler.cs b/Brizco.Repository/Handlers/Activity/UpdateActivityCommandHandler.cs index 4717958..5d3b586 100644 --- a/Brizco.Repository/Handlers/Activity/UpdateActivityCommandHandler.cs +++ b/Brizco.Repository/Handlers/Activity/UpdateActivityCommandHandler.cs @@ -13,7 +13,7 @@ public class UpdateActivityCommandHandler : IRequestHandler Handle(UpdateActivityCommand request, CancellationToken cancellationToken) { - var task = await _repositoryWrapper.SetRepository() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken); if (task == null) throw new AppException("Task not found", ApiResultStatusCode.NotFound); @@ -25,7 +25,7 @@ public class UpdateActivityCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newTask); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Complex/CreateComplexCommandHandler.cs b/Brizco.Repository/Handlers/Complex/CreateComplexCommandHandler.cs index 7158448..eec4f07 100644 --- a/Brizco.Repository/Handlers/Complex/CreateComplexCommandHandler.cs +++ b/Brizco.Repository/Handlers/Complex/CreateComplexCommandHandler.cs @@ -16,8 +16,8 @@ public class CreateComplexCommandHandler : IRequestHandler().Add(complex); + var complex = Domain.Entities.Complexes.Complex.Create(request.Name, request.Address, request.SupportPhone); + _repositoryWrapper.SetRepository().Add(complex); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return complex.AdaptToSDto(); diff --git a/Brizco.Repository/Handlers/Complex/CreateComplexUserCommandHandler.cs b/Brizco.Repository/Handlers/Complex/CreateComplexUserCommandHandler.cs index 2181e89..a0325f9 100644 --- a/Brizco.Repository/Handlers/Complex/CreateComplexUserCommandHandler.cs +++ b/Brizco.Repository/Handlers/Complex/CreateComplexUserCommandHandler.cs @@ -1,5 +1,5 @@ -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; using Microsoft.AspNetCore.Identity; namespace Brizco.Repository.Handlers.Complex; @@ -27,7 +27,7 @@ public class CreateComplexUserCommandHandler : IRequestHandler().TableNoTracking + var complex = await _repositoryWrapper.SetRepository().TableNoTracking .FirstOrDefaultAsync(c => c.Id == request.ComplexId, cancellationToken); if (complex == null) throw new AppException("Complex not found", ApiResultStatusCode.NotFound); diff --git a/Brizco.Repository/Handlers/Complex/DeleteComplexCommandHandler.cs b/Brizco.Repository/Handlers/Complex/DeleteComplexCommandHandler.cs index 7ec7f06..b871319 100644 --- a/Brizco.Repository/Handlers/Complex/DeleteComplexCommandHandler.cs +++ b/Brizco.Repository/Handlers/Complex/DeleteComplexCommandHandler.cs @@ -13,12 +13,12 @@ public class DeleteComplexCommandHandler : IRequestHandler() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (task == null) throw new AppException("Task not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(task); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Complex/DeleteComplexUserCommandHandler.cs b/Brizco.Repository/Handlers/Complex/DeleteComplexUserCommandHandler.cs index 126b67e..b688c7c 100644 --- a/Brizco.Repository/Handlers/Complex/DeleteComplexUserCommandHandler.cs +++ b/Brizco.Repository/Handlers/Complex/DeleteComplexUserCommandHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Complex; +using Brizco.Domain.Entities.Complexes; namespace Brizco.Repository.Handlers.Complex; diff --git a/Brizco.Repository/Handlers/Complex/GetComplexQueryHandler.cs b/Brizco.Repository/Handlers/Complex/GetComplexQueryHandler.cs index fe8376a..51bd4d2 100644 --- a/Brizco.Repository/Handlers/Complex/GetComplexQueryHandler.cs +++ b/Brizco.Repository/Handlers/Complex/GetComplexQueryHandler.cs @@ -11,7 +11,7 @@ public class GetComplexQueryHandler : IRequestHandler Handle(GetComplexQuery request, CancellationToken cancellationToken) { - var complex = await _repositoryWrapper.SetRepository() + var complex = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(ComplexMapper.ProjectToSDto) diff --git a/Brizco.Repository/Handlers/Complex/GetComplexUsersQueryHandler.cs b/Brizco.Repository/Handlers/Complex/GetComplexUsersQueryHandler.cs index 5963727..faa5337 100644 --- a/Brizco.Repository/Handlers/Complex/GetComplexUsersQueryHandler.cs +++ b/Brizco.Repository/Handlers/Complex/GetComplexUsersQueryHandler.cs @@ -1,5 +1,5 @@ -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; using Microsoft.IdentityModel.Tokens; namespace Brizco.Repository.Handlers.Complex; diff --git a/Brizco.Repository/Handlers/Complex/GetComplexesQueryHandler.cs b/Brizco.Repository/Handlers/Complex/GetComplexesQueryHandler.cs index 5ad15e5..7022a1b 100644 --- a/Brizco.Repository/Handlers/Complex/GetComplexesQueryHandler.cs +++ b/Brizco.Repository/Handlers/Complex/GetComplexesQueryHandler.cs @@ -10,7 +10,7 @@ public class GetComplexesQueryHandler : IRequestHandler> Handle(GetComplexesQuery request, CancellationToken cancellationToken) { - var tasks = await _repositoryWrapper.SetRepository().TableNoTracking + var tasks = await _repositoryWrapper.SetRepository().TableNoTracking .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) .Select(ComplexMapper.ProjectToSDto) diff --git a/Brizco.Repository/Handlers/Complex/UpdateComplexUserCommandHandler.cs b/Brizco.Repository/Handlers/Complex/UpdateComplexUserCommandHandler.cs index c1f433f..04bfef3 100644 --- a/Brizco.Repository/Handlers/Complex/UpdateComplexUserCommandHandler.cs +++ b/Brizco.Repository/Handlers/Complex/UpdateComplexUserCommandHandler.cs @@ -1,5 +1,5 @@ -using Brizco.Domain.Entities.Complex; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Complexes; +using Brizco.Domain.Entities.Users; using StackExchange.Redis; namespace Brizco.Repository.Handlers.Complex; diff --git a/Brizco.Repository/Handlers/Position/CreatePositionCommandHandler.cs b/Brizco.Repository/Handlers/Position/CreatePositionCommandHandler.cs index 98a473e..792af42 100644 --- a/Brizco.Repository/Handlers/Position/CreatePositionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Position/CreatePositionCommandHandler.cs @@ -21,7 +21,7 @@ public class CreatePositionCommandHandler : IRequestHandlerentity.AddPermission(f)); - _repositoryWrapper.SetRepository().Add(entity); + _repositoryWrapper.SetRepository().Add(entity); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return entity.AdaptToSDto(); diff --git a/Brizco.Repository/Handlers/Position/DeletePositionCommandHandler.cs b/Brizco.Repository/Handlers/Position/DeletePositionCommandHandler.cs index 40b198c..9996a47 100644 --- a/Brizco.Repository/Handlers/Position/DeletePositionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Position/DeletePositionCommandHandler.cs @@ -10,12 +10,12 @@ public class DeletePositionCommandHandler : IRequestHandler Handle(DeletePositionCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Postion not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(shift); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Position/GetPositionQueryHandler.cs b/Brizco.Repository/Handlers/Position/GetPositionQueryHandler.cs index 266037c..acd96e3 100644 --- a/Brizco.Repository/Handlers/Position/GetPositionQueryHandler.cs +++ b/Brizco.Repository/Handlers/Position/GetPositionQueryHandler.cs @@ -12,7 +12,7 @@ public class GetPositionQueryHandler : IRequestHandler Handle(GetPositionQuery request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(PositionMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/Position/GetPositionsQueryHandler.cs b/Brizco.Repository/Handlers/Position/GetPositionsQueryHandler.cs index 3b8debc..32d7cba 100644 --- a/Brizco.Repository/Handlers/Position/GetPositionsQueryHandler.cs +++ b/Brizco.Repository/Handlers/Position/GetPositionsQueryHandler.cs @@ -18,7 +18,7 @@ public class GetPositionsQueryHandler : IRequestHandler().TableNoTracking + var shifts = await _repositoryWrapper.SetRepository().TableNoTracking .Where(p=>p.ComplexId==complexId) .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) diff --git a/Brizco.Repository/Handlers/Position/UpdatePositionCommandHandler.cs b/Brizco.Repository/Handlers/Position/UpdatePositionCommandHandler.cs index b3b72f8..d6a17c4 100644 --- a/Brizco.Repository/Handlers/Position/UpdatePositionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Position/UpdatePositionCommandHandler.cs @@ -1,4 +1,6 @@ -namespace Brizco.Repository.Handlers.Position; +using Brizco.Domain.Entities.Complexes; + +namespace Brizco.Repository.Handlers.Position; public class UpdatePositionCommandHandler : IRequestHandler { @@ -13,7 +15,7 @@ public class UpdatePositionCommandHandler : IRequestHandler Handle(UpdatePositionCommand request, CancellationToken cancellationToken) { - var ent = await _repositoryWrapper.SetRepository() + var ent = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (ent == null) throw new AppException("Postion not found", ApiResultStatusCode.NotFound); @@ -23,7 +25,7 @@ public class UpdatePositionCommandHandler : IRequestHandler !permissionsDb.Select(d => d.Permission).Contains(p))) newPosition.AddPermission(permission); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Update(newPosition); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Routine/CreateRoutineCommandHandler.cs b/Brizco.Repository/Handlers/Routine/CreateRoutineCommandHandler.cs index 44f362f..0972998 100644 --- a/Brizco.Repository/Handlers/Routine/CreateRoutineCommandHandler.cs +++ b/Brizco.Repository/Handlers/Routine/CreateRoutineCommandHandler.cs @@ -21,10 +21,10 @@ public class CreateRoutineCommandHandler : IRequestHandler().Add(entity); + _repositoryWrapper.SetRepository().Add(entity); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return entity.AdaptToSDto(); diff --git a/Brizco.Repository/Handlers/Routine/DeleteRoutineCommandHandler.cs b/Brizco.Repository/Handlers/Routine/DeleteRoutineCommandHandler.cs index 3405ace..ce1c45f 100644 --- a/Brizco.Repository/Handlers/Routine/DeleteRoutineCommandHandler.cs +++ b/Brizco.Repository/Handlers/Routine/DeleteRoutineCommandHandler.cs @@ -10,12 +10,12 @@ public class DeleteRoutineCommandHandler : IRequestHandler Handle(DeleteRoutineCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Postion not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(shift); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Routine/GetRoutineQueryHandler.cs b/Brizco.Repository/Handlers/Routine/GetRoutineQueryHandler.cs index 2bc8b32..e77e5d2 100644 --- a/Brizco.Repository/Handlers/Routine/GetRoutineQueryHandler.cs +++ b/Brizco.Repository/Handlers/Routine/GetRoutineQueryHandler.cs @@ -10,7 +10,7 @@ public class GetRoutineQueryHandler : IRequestHandler Handle(GetRoutineQuery request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(RoutineMapper.ProjectToSDto) diff --git a/Brizco.Repository/Handlers/Routine/GetRoutineShiftsQueryHandler.cs b/Brizco.Repository/Handlers/Routine/GetRoutineShiftsQueryHandler.cs index 27b36ae..279dacf 100644 --- a/Brizco.Repository/Handlers/Routine/GetRoutineShiftsQueryHandler.cs +++ b/Brizco.Repository/Handlers/Routine/GetRoutineShiftsQueryHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; namespace Brizco.Repository.Handlers.Routine; @@ -21,7 +21,7 @@ public class GetRoutineShiftsQueryHandler : IRequestHandler() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == shiftRoutine.ShiftId) .Select(ShiftMapper.ProjectToSDto) @@ -48,7 +48,7 @@ public class GetRoutineShiftsQueryHandler : IRequestHandler() + var existedShiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == selectedDate.Date, cancellationToken); shift.IsCompleted = existedShiftPlan?.IsCompleted ?? false; diff --git a/Brizco.Repository/Handlers/Routine/GetRoutinesQueryHandler.cs b/Brizco.Repository/Handlers/Routine/GetRoutinesQueryHandler.cs index 4fc9407..9c7daf7 100644 --- a/Brizco.Repository/Handlers/Routine/GetRoutinesQueryHandler.cs +++ b/Brizco.Repository/Handlers/Routine/GetRoutinesQueryHandler.cs @@ -18,7 +18,7 @@ public class GetRoutinesQueryHandler : IRequestHandler().TableNoTracking + var entities = await _repositoryWrapper.SetRepository().TableNoTracking .Where(p=>p.ComplexId==complexId) .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) diff --git a/Brizco.Repository/Handlers/Routine/UpdateRoutineCommandHandler.cs b/Brizco.Repository/Handlers/Routine/UpdateRoutineCommandHandler.cs index 26dc776..6f9da84 100644 --- a/Brizco.Repository/Handlers/Routine/UpdateRoutineCommandHandler.cs +++ b/Brizco.Repository/Handlers/Routine/UpdateRoutineCommandHandler.cs @@ -13,7 +13,7 @@ public class UpdateRoutineCommandHandler : IRequestHandler Handle(UpdateRoutineCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Routine not found", ApiResultStatusCode.NotFound); @@ -23,13 +23,13 @@ public class UpdateRoutineCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newEntity); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Section/CreateSectionCommandHandler.cs b/Brizco.Repository/Handlers/Section/CreateSectionCommandHandler.cs index 7b236cd..b5b702a 100644 --- a/Brizco.Repository/Handlers/Section/CreateSectionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Section/CreateSectionCommandHandler.cs @@ -21,12 +21,12 @@ public class CreateSectionCommandHandler : IRequestHandler().Add(entity); + _repositoryWrapper.SetRepository().Add(entity); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return entity.AdaptToSDto(); diff --git a/Brizco.Repository/Handlers/Section/DeleteSectionCommandHandler.cs b/Brizco.Repository/Handlers/Section/DeleteSectionCommandHandler.cs index 2ce6218..ab68fb4 100644 --- a/Brizco.Repository/Handlers/Section/DeleteSectionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Section/DeleteSectionCommandHandler.cs @@ -10,20 +10,20 @@ public class DeleteSectionCommandHandler : IRequestHandler Handle(DeleteSectionCommand request, CancellationToken cancellationToken) { - var section = await _repositoryWrapper.SetRepository() + var section = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (section == null) throw new AppException("Section not found", ApiResultStatusCode.NotFound); - var positions = await _repositoryWrapper.SetRepository() + var positions = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(p => p.SectionId == section.Id) .CountAsync(cancellationToken); if (positions > 0) throw new AppException("این سکشن پوزیشن فعال دارد ، نخست پوزیشن های سکشن را حذف کرده یا منتقل کنید"); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(section); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Section/GetSectionQueryHandler.cs b/Brizco.Repository/Handlers/Section/GetSectionQueryHandler.cs index 899e746..55d1c24 100644 --- a/Brizco.Repository/Handlers/Section/GetSectionQueryHandler.cs +++ b/Brizco.Repository/Handlers/Section/GetSectionQueryHandler.cs @@ -12,7 +12,7 @@ public class GetSectionQueryHandler : IRequestHandler Handle(GetSectionQuery request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(SectionMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/Section/GetSectionsQueryHandler.cs b/Brizco.Repository/Handlers/Section/GetSectionsQueryHandler.cs index 7199f03..0c91ce6 100644 --- a/Brizco.Repository/Handlers/Section/GetSectionsQueryHandler.cs +++ b/Brizco.Repository/Handlers/Section/GetSectionsQueryHandler.cs @@ -17,7 +17,7 @@ public class GetSectionsQueryHandler : IRequestHandler().TableNoTracking + var shifts = await _repositoryWrapper.SetRepository().TableNoTracking .Where(s=>s.ComplexId==complexId) .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) diff --git a/Brizco.Repository/Handlers/Section/UpdateSectionCommandHandler.cs b/Brizco.Repository/Handlers/Section/UpdateSectionCommandHandler.cs index 7e6d05f..879db42 100644 --- a/Brizco.Repository/Handlers/Section/UpdateSectionCommandHandler.cs +++ b/Brizco.Repository/Handlers/Section/UpdateSectionCommandHandler.cs @@ -13,7 +13,7 @@ public class UpdateSectionCommandHandler : IRequestHandler Handle(UpdateSectionCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Section not found", ApiResultStatusCode.NotFound); @@ -23,13 +23,13 @@ public class UpdateSectionCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newSection); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Shift/CreateShiftCommandHandler.cs b/Brizco.Repository/Handlers/Shift/CreateShiftCommandHandler.cs index 7c3eb51..a1d0f69 100644 --- a/Brizco.Repository/Handlers/Shift/CreateShiftCommandHandler.cs +++ b/Brizco.Repository/Handlers/Shift/CreateShiftCommandHandler.cs @@ -21,7 +21,7 @@ public class CreateShiftCommandHandler : IRequestHandlershift.AddRoutine(r)); - _repositoryWrapper.SetRepository().Add(shift); + _repositoryWrapper.SetRepository().Add(shift); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return shift.AdaptToSDto(); diff --git a/Brizco.Repository/Handlers/Shift/DeleteShiftCommandHandler.cs b/Brizco.Repository/Handlers/Shift/DeleteShiftCommandHandler.cs index 749dfa9..ab039e2 100644 --- a/Brizco.Repository/Handlers/Shift/DeleteShiftCommandHandler.cs +++ b/Brizco.Repository/Handlers/Shift/DeleteShiftCommandHandler.cs @@ -10,12 +10,12 @@ public class DeletePositionCommandHandler : IRequestHandler Handle(DeleteShiftCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Routine not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(shift); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Shift/GetShiftQueryHandler.cs b/Brizco.Repository/Handlers/Shift/GetShiftQueryHandler.cs index e71f146..7fba182 100644 --- a/Brizco.Repository/Handlers/Shift/GetShiftQueryHandler.cs +++ b/Brizco.Repository/Handlers/Shift/GetShiftQueryHandler.cs @@ -1,5 +1,4 @@ using Brizco.Domain.Dtos.LargeDtos; -using Brizco.Domain.Entities.Shift; namespace Brizco.Repository.Handlers.Shift; @@ -13,7 +12,7 @@ public class GetShiftPlanQueryHandler : IRequestHandler Handle(GetShiftQuery request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(ShiftMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/Shift/GetShiftsQueryHandler.cs b/Brizco.Repository/Handlers/Shift/GetShiftsQueryHandler.cs index e48e50d..fe332b6 100644 --- a/Brizco.Repository/Handlers/Shift/GetShiftsQueryHandler.cs +++ b/Brizco.Repository/Handlers/Shift/GetShiftsQueryHandler.cs @@ -1,5 +1,5 @@ -using Brizco.Domain.Entities.Shift; -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Shifts; +using Brizco.Domain.Entities.Users; using Guid = System.Guid; namespace Brizco.Repository.Handlers.Shift; @@ -29,14 +29,14 @@ public class GetShiftPlansQueryHandler : IRequestHandler().Entities - join shift in _repositoryWrapper.SetRepository().Entities on shiftDay.ShiftId equals shift.Id + join shift in _repositoryWrapper.SetRepository().Entities on shiftDay.ShiftId equals shift.Id where shiftDay.DayOfWeek == selectedDate.DayOfWeek && shift.ComplexId == complexId select shift; shifts = await originalShifts.AsNoTracking().Select(ShiftMapper.ProjectToSDto).ToListAsync(cancellationToken); foreach (var shift in shifts) { - var existedShiftPlan = await _repositoryWrapper.SetRepository() + var existedShiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == selectedDate.Date, cancellationToken); if(existedShiftPlan == null) @@ -45,13 +45,13 @@ public class GetShiftPlansQueryHandler : IRequestHandler() + var activitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.SetFor.Date == selectedDate.Date && a.ShiftPlanId == existedShiftPlan.Id, cancellationToken); - var doneActivitiesCount = await _repositoryWrapper.SetRepository() + var doneActivitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.Status == ActivityStatus.Done && a.SetFor.Date == selectedDate.Date && a.ShiftPlanId == existedShiftPlan.Id, cancellationToken); - var undoneActivitiesCount = await _repositoryWrapper.SetRepository() + var undoneActivitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.Status == ActivityStatus.UnDone && a.SetFor.Date == selectedDate.Date && a.ShiftPlanId == existedShiftPlan.Id, cancellationToken); shift.UndoneActivitiesCount = undoneActivitiesCount; @@ -66,7 +66,7 @@ public class GetShiftPlansQueryHandler : IRequestHandler() + var existedSupervisorShiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == selectedDate.Date && s.SupervisorId == userId, cancellationToken); shift.IsCompleted = existedSupervisorShiftPlan?.IsCompleted ?? false; @@ -87,7 +87,7 @@ public class GetShiftPlansQueryHandler : IRequestHandler().TableNoTracking + shifts = await _repositoryWrapper.SetRepository().TableNoTracking .Where(s => s.ComplexId == complexId) .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) diff --git a/Brizco.Repository/Handlers/Shift/UpdateShiftCommandHandler.cs b/Brizco.Repository/Handlers/Shift/UpdateShiftCommandHandler.cs index baa23de..dea75fb 100644 --- a/Brizco.Repository/Handlers/Shift/UpdateShiftCommandHandler.cs +++ b/Brizco.Repository/Handlers/Shift/UpdateShiftCommandHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; namespace Brizco.Repository.Handlers.Shift; @@ -15,7 +15,7 @@ public class UpdatePositionCommandHandler : IRequestHandler Handle(UpdateShiftCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (shift == null) throw new AppException("Shift not found", ApiResultStatusCode.NotFound); @@ -25,7 +25,7 @@ public class UpdatePositionCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newShift); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/ShiftPlan/CreateShiftPlanCommandHandler.cs b/Brizco.Repository/Handlers/ShiftPlan/CreateShiftPlanCommandHandler.cs index f3456b0..a41e586 100644 --- a/Brizco.Repository/Handlers/ShiftPlan/CreateShiftPlanCommandHandler.cs +++ b/Brizco.Repository/Handlers/ShiftPlan/CreateShiftPlanCommandHandler.cs @@ -14,14 +14,14 @@ public class CreateShiftPlanCommandHandler : IRequestHandler Handle(CreateShiftPlanCommand request, CancellationToken cancellationToken) { - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.ShiftId, cancellationToken); if (shift == null) throw new AppException("Shift not found", ApiResultStatusCode.NotFound); var planFor = DateTimeExtensions.UnixTimeStampToDateTime(request.PlanDate); - var existedShiftPlan = await _repositoryWrapper.SetRepository() + var existedShiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.ShiftId == request.ShiftId && s.PlanFor.Date == planFor.Date, cancellationToken); @@ -42,7 +42,7 @@ public class CreateShiftPlanCommandHandler : IRequestHandler().Add(shiftPlan); + _repositoryWrapper.SetRepository().Add(shiftPlan); await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.CommitAsync(cancellationToken); return shiftPlan.AdaptToLDto(); diff --git a/Brizco.Repository/Handlers/ShiftPlan/DeleteShiftPlanCommandHandler.cs b/Brizco.Repository/Handlers/ShiftPlan/DeleteShiftPlanCommandHandler.cs index 22d73e8..16d8dfc 100644 --- a/Brizco.Repository/Handlers/ShiftPlan/DeleteShiftPlanCommandHandler.cs +++ b/Brizco.Repository/Handlers/ShiftPlan/DeleteShiftPlanCommandHandler.cs @@ -11,13 +11,13 @@ public class DeleteShiftPlanCommandHandler : IRequestHandler Handle(DeleteShiftPlanCommand request, CancellationToken cancellationToken) { - var shiftPlan = await _repositoryWrapper.SetRepository() + var shiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken); if (shiftPlan == null) throw new AppException("ShiftPlan not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(shiftPlan); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlanQueryHandler.cs b/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlanQueryHandler.cs index d75c277..4a3bfac 100644 --- a/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlanQueryHandler.cs +++ b/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlanQueryHandler.cs @@ -12,7 +12,7 @@ public class GetShiftPlanQueryHandler : IRequestHandler Handle(GetShiftPlanQuery request, CancellationToken cancellationToken) { - var shiftPlan = await _repositoryWrapper.SetRepository() + var shiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(ShiftPlanMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlansQueryHandler.cs b/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlansQueryHandler.cs index e8da8f2..9b7db0c 100644 --- a/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlansQueryHandler.cs +++ b/Brizco.Repository/Handlers/ShiftPlan/GetShiftPlansQueryHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Shift; +using Brizco.Domain.Entities.Shifts; using MD.PersianDateTime.Standard; namespace Brizco.Repository.Handlers.ShiftPlan; @@ -20,7 +20,7 @@ public class GetShiftPlansQueryHandler : IRequestHandler baseQuery = _repositoryWrapper.SetRepository() + IQueryable baseQuery = _repositoryWrapper.SetRepository() .TableNoTracking .OrderByDescending(s => s.CreatedAt) .Where(s => s.ComplexId == complexId); @@ -139,13 +139,13 @@ public class GetShiftPlansQueryHandler : IRequestHandler() + var activitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.SetFor.Date == shiftPlan.PlanFor.Date && a.ShiftPlanId == shiftPlan.Id, cancellationToken); - var doneActivitiesCount = await _repositoryWrapper.SetRepository() + var doneActivitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.Status == ActivityStatus.Done && a.SetFor.Date == shiftPlan.PlanFor.Date && a.ShiftPlanId == shiftPlan.Id, cancellationToken); - var undoneActivitiesCount = await _repositoryWrapper.SetRepository() + var undoneActivitiesCount = await _repositoryWrapper.SetRepository() .TableNoTracking .CountAsync(a => a.Status == ActivityStatus.UnDone && a.SetFor.Date == shiftPlan.PlanFor.Date && a.ShiftPlanId == shiftPlan.Id, cancellationToken); shiftPlan.UndoneActivitiesCount = undoneActivitiesCount; diff --git a/Brizco.Repository/Handlers/ShiftPlan/UpdateShiftPlanCommandHandler.cs b/Brizco.Repository/Handlers/ShiftPlan/UpdateShiftPlanCommandHandler.cs index 0f2b63a..902848f 100644 --- a/Brizco.Repository/Handlers/ShiftPlan/UpdateShiftPlanCommandHandler.cs +++ b/Brizco.Repository/Handlers/ShiftPlan/UpdateShiftPlanCommandHandler.cs @@ -1,4 +1,6 @@ -namespace Brizco.Repository.Handlers.ShiftPlan; +using Brizco.Domain.Entities.Shifts; + +namespace Brizco.Repository.Handlers.ShiftPlan; public class UpdateShiftPlanCommandHandler : IRequestHandler { @@ -11,13 +13,13 @@ public class UpdateShiftPlanCommandHandler : IRequestHandler Handle(UpdateShiftPlanCommand request, CancellationToken cancellationToken) { - var shiftPlan = await _repositoryWrapper.SetRepository() + var shiftPlan = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken); if (shiftPlan == null) throw new AppException("ShiftPlan not found", ApiResultStatusCode.NotFound); - var shift = await _repositoryWrapper.SetRepository() + var shift = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.ShiftId, cancellationToken); if (shift == null) @@ -28,7 +30,7 @@ public class UpdateShiftPlanCommandHandler : IRequestHandler() + var shiftPlanUsers = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.ShiftPlanId == newPlan.Id) .ToListAsync(cancellationToken); @@ -39,7 +41,7 @@ public class UpdateShiftPlanCommandHandler : IRequestHandler(shiftPlanUser.PositionId, shiftPlanUser.UserId)); else { - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(shiftPlanUser); await _repositoryWrapper.SaveChangesAsync(cancellationToken); } @@ -48,7 +50,7 @@ public class UpdateShiftPlanCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newPlan); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Task/CreateTaskCommandHandler.cs b/Brizco.Repository/Handlers/Task/CreateTaskCommandHandler.cs index 6212821..83e104f 100644 --- a/Brizco.Repository/Handlers/Task/CreateTaskCommandHandler.cs +++ b/Brizco.Repository/Handlers/Task/CreateTaskCommandHandler.cs @@ -18,7 +18,7 @@ public class CreateActivityCommandHandler : IRequestHandlertask.SetDay(d)); - _repositoryWrapper.SetRepository().Add(task); + _repositoryWrapper.SetRepository().Add(task); await _repositoryWrapper.SaveChangesAsync(cancellationToken); return task.AdaptToLDto(); } diff --git a/Brizco.Repository/Handlers/Task/DeleteTaskCommandHandler.cs b/Brizco.Repository/Handlers/Task/DeleteTaskCommandHandler.cs index 2911a30..78c9f48 100644 --- a/Brizco.Repository/Handlers/Task/DeleteTaskCommandHandler.cs +++ b/Brizco.Repository/Handlers/Task/DeleteTaskCommandHandler.cs @@ -10,12 +10,12 @@ public class DeleteActivityCommandHandler : IRequestHandler Handle(DeleteTaskCommand request, CancellationToken cancellationToken) { - var task = await _repositoryWrapper.SetRepository() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking .FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken); if (task == null) throw new AppException("Task not found", ApiResultStatusCode.NotFound); - _repositoryWrapper.SetRepository() + _repositoryWrapper.SetRepository() .Delete(task); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Handlers/Task/GetTaskQueryHandler.cs b/Brizco.Repository/Handlers/Task/GetTaskQueryHandler.cs index 5df39b0..c87599d 100644 --- a/Brizco.Repository/Handlers/Task/GetTaskQueryHandler.cs +++ b/Brizco.Repository/Handlers/Task/GetTaskQueryHandler.cs @@ -13,7 +13,7 @@ public class GetActivityQueryHandler : IRequestHandler public async Task Handle(GetTaskQuery request, CancellationToken cancellationToken) { - var task = await _repositoryWrapper.SetRepository() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking .Where(s => s.Id == request.Id) .Select(TaskMapper.ProjectToLDto) diff --git a/Brizco.Repository/Handlers/Task/GetTasksQueryHandler.cs b/Brizco.Repository/Handlers/Task/GetTasksQueryHandler.cs index 8916d21..2373e3e 100644 --- a/Brizco.Repository/Handlers/Task/GetTasksQueryHandler.cs +++ b/Brizco.Repository/Handlers/Task/GetTasksQueryHandler.cs @@ -17,7 +17,7 @@ public class GetActivitiesQueryHandler : IRequestHandler().TableNoTracking + var tasks = await _repositoryWrapper.SetRepository().TableNoTracking .Where(t=>t.ComplexId==complexId && t.IsActivity == false) .OrderByDescending(s => s.CreatedAt) .Skip(request.Page * 15).Take(15) diff --git a/Brizco.Repository/Handlers/Task/UpdateTaskCommandHandler.cs b/Brizco.Repository/Handlers/Task/UpdateTaskCommandHandler.cs index 83194b4..f5e9a12 100644 --- a/Brizco.Repository/Handlers/Task/UpdateTaskCommandHandler.cs +++ b/Brizco.Repository/Handlers/Task/UpdateTaskCommandHandler.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.Task; +using Brizco.Domain.Entities.Tasks; namespace Brizco.Repository.Handlers.Task; @@ -15,7 +15,7 @@ public class UpdateActivityCommandHandler : IRequestHandler Handle(UpdateTaskCommand request, CancellationToken cancellationToken) { - var task = await _repositoryWrapper.SetRepository() + var task = await _repositoryWrapper.SetRepository() .TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken); if (task == null) throw new AppException("Task not found", ApiResultStatusCode.NotFound); @@ -25,7 +25,7 @@ public class UpdateActivityCommandHandler : IRequestHandler() + _repositoryWrapper.SetRepository() .Update(newTask); await _repositoryWrapper.SaveChangesAsync(cancellationToken); diff --git a/Brizco.Repository/Models/ApplicationContext.cs b/Brizco.Repository/Models/ApplicationContext.cs index d832776..2a3c999 100644 --- a/Brizco.Repository/Models/ApplicationContext.cs +++ b/Brizco.Repository/Models/ApplicationContext.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; using Brizco.Repository.Extensions; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; diff --git a/Brizco.Repository/Services/DbInitializerService.cs b/Brizco.Repository/Services/DbInitializerService.cs index 1a9877d..f5a757c 100644 --- a/Brizco.Repository/Services/DbInitializerService.cs +++ b/Brizco.Repository/Services/DbInitializerService.cs @@ -1,4 +1,4 @@ -using Brizco.Domain.Entities.User; +using Brizco.Domain.Entities.Users; using Task = System.Threading.Tasks.Task; namespace Brizco.Repository.Services;