Compare commits
2 Commits
3034cb6d65
...
e918e8d3f7
Author | SHA1 | Date |
---|---|---|
|
e918e8d3f7 | |
|
637070557b |
|
@ -13,45 +13,45 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Asp.Versioning.Http" Version="8.1.0" />
|
||||
<PackageReference Include="Ben.BlockingDetector" Version="0.0.4" />
|
||||
<PackageReference Include="Carter" Version="8.0.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.9.1" />
|
||||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.1" />
|
||||
<PackageReference Include="MediatR.Extensions.Autofac.DependencyInjection" Version="12.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
|
||||
<PackageReference Include="Carter" Version="8.2.1" />
|
||||
<PackageReference Include="FluentValidation" Version="11.9.2" />
|
||||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
|
||||
<PackageReference Include="MediatR.Extensions.Autofac.DependencyInjection" Version="12.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Autofac" Version="8.0.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
|
||||
<PackageReference Include="Elmah.Io.AspNetCore.Serilog" Version="5.0.17" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
|
||||
<PackageReference Include="Elmah.Io.AspNetCore.Serilog" Version="5.1.23" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
|
||||
<PackageReference Include="Sentry.Serilog" Version="4.4.0" />
|
||||
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||
<PackageReference Include="Sentry.Serilog" Version="4.8.1" />
|
||||
<PackageReference Include="Serilog" Version="4.0.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.PostgreSQL" Version="2.3.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.ElmahIo" Version="5.0.38" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.ElmahIo" Version="5.1.43" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="10.2.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="10.2.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="10.2.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.6.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.4" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.6" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Using Include="Autofac" />
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--<PropertyGroup>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<PackageReference Include="AspNetCoreRateLimit.Redis" Version="2.0.0" />
|
||||
<PackageReference Include="Autofac.Extras.Quartz" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
<PackageReference Include="NPOI" Version="2.7.0" />
|
||||
<PackageReference Include="Quartz" Version="3.8.1" />
|
||||
<PackageReference Include="NPOI" Version="2.7.1" />
|
||||
<PackageReference Include="Quartz" Version="3.10.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Core.CoreServices.Abstracts;
|
||||
using Brizco.Domain.Entities.Users;
|
||||
|
||||
namespace Brizco.Core.CoreServices.Abstracts;
|
||||
|
||||
public interface IJwtService : IScopedDependency
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<Domain.Entities.Shift.ShiftPlan>()
|
||||
var existedShiftPlan = await _repositoryWrapper.SetRepository<ShiftPlan>()
|
||||
.TableNoTracking
|
||||
.FirstOrDefaultAsync(s => s.ShiftId == shift.Id && s.PlanFor.Date == day.Date, cancellationToken);
|
||||
shift.CurrentShiftPlanId = existedShiftPlan?.Id ?? default;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<TaskReportCommand , byte
|
|||
}
|
||||
public async Task<byte[]> Handle(TaskReportCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
var tasks = await _repositoryWrapper.SetRepository<Brizco.Domain.Entities.Task.Task>()
|
||||
var tasks = await _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Task>()
|
||||
.TableNoTracking
|
||||
.Select(TaskMapper.ProjectToLDto)
|
||||
.ToListAsync(cancellationToken);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Core.EntityServices.Abstracts;
|
||||
using Brizco.Domain.Entities.Users;
|
||||
|
||||
namespace Brizco.Core.EntityServices.Abstracts;
|
||||
|
||||
public interface IUserService : IScopedDependency
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Core.EntityServices;
|
||||
using Brizco.Domain.Entities.Users;
|
||||
|
||||
namespace Brizco.Core.EntityServices;
|
||||
|
||||
public class ComplexService : IComplexService
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Shift;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Core.EntityServices;
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Quartz;
|
||||
|
||||
namespace Brizco.Core.QuartzServices;
|
||||
|
||||
public class JobScheduler
|
||||
{
|
||||
private readonly IScheduler _scheduler;
|
||||
private readonly ILogger<JobScheduler> _logger;
|
||||
|
||||
public JobScheduler(IScheduler scheduler, ILogger<JobScheduler> logger)
|
||||
{
|
||||
_scheduler = scheduler;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_scheduler.Start();
|
||||
|
||||
//IJobDetail job = JobBuilder.Create<NotificationScheduledJob>()
|
||||
// .WithIdentity("NotificationJob", "notification")
|
||||
// .Build();
|
||||
//ITrigger trigger = TriggerBuilder.Create()
|
||||
// .WithIdentity("NotificationJobTrigger", "notification")
|
||||
// .WithSimpleSchedule(x=>x.WithIntervalInHours(12))
|
||||
// .StartNow()
|
||||
// .Build();
|
||||
//var offset = _scheduler.ScheduleJob(job, trigger);
|
||||
|
||||
|
||||
//_logger.LogInformation($"======== NOTIFICATION Schedulers Set For {offset.Result.ToString()} IN {DateTime.Now.ToString()} ===========");
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using Brizco.Domain.Entities.Shifts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Quartz;
|
||||
|
||||
namespace Brizco.Core.QuartzServices;
|
||||
|
||||
public class NotificationScheduledJob : IJob
|
||||
{
|
||||
private readonly ILogger<NotificationScheduledJob> _logger;
|
||||
private readonly IScheduler _scheduler;
|
||||
private readonly IRepositoryWrapper _repositoryWrapper;
|
||||
|
||||
public NotificationScheduledJob(ILogger<NotificationScheduledJob> logger,IScheduler scheduler,IRepositoryWrapper repositoryWrapper)
|
||||
{
|
||||
_logger = logger;
|
||||
_scheduler = scheduler;
|
||||
_repositoryWrapper = repositoryWrapper;
|
||||
}
|
||||
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var currentShiftPlans = await _repositoryWrapper.SetRepository<ShiftPlan>()
|
||||
.TableNoTracking
|
||||
.Where(s => s.PlanFor.Date >= DateTime.Today.Date)
|
||||
.ToListAsync();
|
||||
|
||||
IJobDetail job = JobBuilder.Create<NotificationScheduledJob>()
|
||||
.WithIdentity("NotificationJob", "notification")
|
||||
.Build();
|
||||
ITrigger trigger = TriggerBuilder.Create()
|
||||
.WithIdentity("NotificationJobTrigger", "notification")
|
||||
.StartNow()
|
||||
.Build();
|
||||
var offset = _scheduler.ScheduleJob(job, trigger);
|
||||
|
||||
_logger.LogInformation($"Notification Job Done At : {DateTime.Now}");
|
||||
}
|
||||
}
|
|
@ -10,8 +10,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||
<PackageReference Include="Mapster.Core" Version="1.2.1" />
|
||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.4" />
|
||||
<PackageReference Include="MediatR" Version="12.3.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.6" />
|
||||
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -56,9 +56,12 @@
|
|||
<Using Include="Brizco.Domain.Dtos.ResponseDto" />
|
||||
<Using Include="Brizco.Domain.Dtos.SmallDtos" />
|
||||
<Using Include="Brizco.Domain.Entities.Complex" />
|
||||
<Using Include="Brizco.Domain.Entities.Complexes" />
|
||||
<Using Include="Brizco.Domain.Entities.Routine" />
|
||||
<Using Include="Brizco.Domain.Entities.Shift" />
|
||||
<Using Include="Brizco.Domain.Entities.Shifts" />
|
||||
<Using Include="Brizco.Domain.Entities.Task" />
|
||||
<Using Include="Brizco.Domain.Entities.Users" />
|
||||
<Using Include="Brizco.Domain.Enums" />
|
||||
<Using Include="Mapster" />
|
||||
<Using Include="Microsoft.AspNetCore.Identity" />
|
||||
|
|
|
@ -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<DayOfWeek> DayOfWeeks, List<Guid> Routines)
|
||||
: IRequest<ShiftSDto>;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class ActivityLDto : BaseDto<ActivityLDto , Activity>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class ComplexLDto : BaseDto<ComplexLDto,Complex>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class PositionLDto : BaseDto<PositionLDto, Position>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class SectionLDto : BaseDto<SectionLDto, Section>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class ShiftLDto : BaseDto<ShiftLDto,Shift>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class ShiftPlanLDto : BaseDto<ShiftPlanLDto , ShiftPlan>
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
using Task = Brizco.Domain.Entities.Tasks.Task;
|
||||
|
||||
public class TaskLDto : BaseDto<TaskLDto, Entities.Task.Task>
|
||||
namespace Brizco.Domain.Dtos.LargeDtos;
|
||||
|
||||
public class TaskLDto : BaseDto<TaskLDto, Task>
|
||||
{
|
||||
public TaskType Type { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
@ -17,10 +19,7 @@ public class TaskLDto : BaseDto<TaskLDto, Entities.Task.Task>
|
|||
|
||||
|
||||
public List<TaskShiftSDto> Shifts { get; set; } = new();
|
||||
|
||||
public List<TaskPositionSDto> Positions { get; set; } = new();
|
||||
|
||||
public List<TaskDaySDto> Days { get; internal set; } = new();
|
||||
|
||||
public List<TaskRoutineSDto> Routines { get; internal set; } = new();
|
||||
public List<TaskDaySDto> Days { get; set; } = new();
|
||||
public List<TaskRoutineSDto> Routines { get; set; } = new();
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class ActivitySDto : BaseDto<ActivitySDto , Activity>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.User;
|
||||
using Brizco.Domain.Entities.Users;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Complex;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Complex;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Complex;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class PositionSDto : BaseDto<PositionSDto, Position>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Routines;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class RoutineSDto : BaseDto<RoutineSDto,Routine>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class SectionSDto : BaseDto<SectionSDto, Section>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class ShiftDaySDto : BaseDto<ShiftDaySDto,ShiftDay>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class ShiftPlanSDto : BaseDto<ShiftPlanSDto,ShiftPlan>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class ShiftPlanUserSDto : BaseDto<ShiftPlanUserSDto,ShiftPlanUser>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class ShiftRoutineSDto : BaseDto<ShiftRoutineSDto, ShiftRoutine>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
public class ShiftSDto : BaseDto<ShiftSDto,Shift>
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class TaskDaySDto : BaseDto<TaskDaySDto, TaskDay>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Task;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class TaskRoutineSDto : BaseDto<TaskRoutineSDto,TaskRoutine>
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Task = Brizco.Domain.Entities.Tasks.Task;
|
||||
|
||||
public class TaskSDto : BaseDto<TaskSDto,Entities.Task.Task>
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class TaskSDto : BaseDto<TaskSDto,Task>
|
||||
{
|
||||
public TaskType Type { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
using Brizco.Domain.Entities.Tasks;
|
||||
|
||||
namespace Brizco.Domain.Dtos.SmallDtos;
|
||||
|
||||
public class TaskShiftSDto : BaseDto<TaskShiftSDto,TaskShift>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace Brizco.Domain.Entities.Complex;
|
||||
namespace Brizco.Domain.Entities.Complexes;
|
||||
|
||||
public partial class Complex
|
||||
{
|
|
@ -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<ApplicationRole> Roles { get; set; } = new();
|
||||
public List<Task.Task> Tasks { get; set; } = new();
|
||||
public List<Shift.Shift> Shifts { get; set; } = new();
|
||||
public List<ComplexUser> Users { get; set; } = new();
|
||||
public List<ApplicationRole> Roles { get; internal set; } = new();
|
||||
public List<Task> Tasks { get; internal set; } = new();
|
||||
public List<Shift> Shifts { get; internal set; } = new();
|
||||
public List<ComplexUser> Users { get; internal set; } = new();
|
||||
}
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -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<PositionPermission> Permissions { get; set; } = new();
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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<Position> Positions { get; internal set; } = new();
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
namespace Brizco.Domain.Entities.Routine;
|
||||
using Brizco.Domain.Entities.Shifts;
|
||||
|
||||
namespace Brizco.Domain.Entities.Routines;
|
||||
|
||||
public partial class Routine
|
||||
{
|
|
@ -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<TaskRoutine> Tasks { get; internal set; } = new();
|
|
@ -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)
|
|
@ -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<ShiftDay> Days { get; internal set; } = new();
|
||||
public List<ShiftPlan> Plans { get; internal set; } = new();
|
|
@ -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]
|
|
@ -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; }
|
|
@ -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]
|
|
@ -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; }
|
|
@ -1,6 +1,4 @@
|
|||
using Brizco.Domain.Entities.User;
|
||||
|
||||
namespace Brizco.Domain.Entities.Task;
|
||||
namespace Brizco.Domain.Entities.Tasks;
|
||||
|
||||
public partial class Activity : Task
|
||||
{
|
|
@ -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
|
|
@ -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; }
|
|
@ -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]
|
|
@ -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]
|
|
@ -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; }
|
||||
}
|
|
@ -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; }
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace Brizco.Domain.Entities.User;
|
||||
namespace Brizco.Domain.Entities.Users;
|
||||
|
||||
public class ApplicationRole : IdentityRole<Guid>
|
||||
{
|
||||
|
@ -7,5 +7,5 @@ public class ApplicationRole : IdentityRole<Guid>
|
|||
public string PersianName { get; set; } = string.Empty;
|
||||
|
||||
public Guid? ComplexId { get; set; }
|
||||
public Complex.Complex? Complex { get; set; }
|
||||
public Complex? Complex { get; set; }
|
||||
}
|
|
@ -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]
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Refit" Version="7.0.0" />
|
||||
<PackageReference Include="Marten" Version="7.8.0" />
|
||||
<PackageReference Include="Refit" Version="7.1.2" />
|
||||
<PackageReference Include="Marten" Version="7.23.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -7,22 +7,22 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.9.1" />
|
||||
<PackageReference Include="MediatR" Version="12.3.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.9.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pluralize.NET" Version="1.0.2" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.6" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.8.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="10.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class CreateActivityCommandHandler : IRequestHandler<CreateActivityComman
|
|||
try
|
||||
{
|
||||
await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var activity = Domain.Entities.Task.Activity
|
||||
var activity = Domain.Entities.Tasks.Activity
|
||||
.Create(
|
||||
ActivityStatus.Created,
|
||||
DateTime.MinValue,
|
||||
|
@ -41,7 +41,7 @@ public class CreateActivityCommandHandler : IRequestHandler<CreateActivityComman
|
|||
|
||||
activity.SetShiftPlan(request.ShiftPlanId);
|
||||
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>().Add(activity);
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>().Add(activity);
|
||||
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
|
||||
await _repositoryWrapper.CommitAsync(cancellationToken);
|
||||
return activity.AdaptToLDto();
|
||||
|
|
|
@ -13,12 +13,12 @@ public class DeleteActivityCommandHandler : IRequestHandler<DeleteActivityComman
|
|||
try
|
||||
{
|
||||
await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.TableNoTracking
|
||||
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
|
||||
if (task == null)
|
||||
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.Delete(task);
|
||||
|
||||
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
|
||||
|
|
|
@ -23,7 +23,7 @@ public class GetActivitiesQueryHandler : IRequestHandler<GetActivitiesQuery, Lis
|
|||
throw new AppException("UserId is wrong", ApiResultStatusCode.NotFound);
|
||||
|
||||
|
||||
IQueryable<Domain.Entities.Task.Activity> activities = _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>().TableNoTracking
|
||||
IQueryable<Domain.Entities.Tasks.Activity> activities = _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>().TableNoTracking
|
||||
.Where(a=>a.IsActivity && a.ComplexId == complexId);
|
||||
if (_currentUserService is { Permissions: not null, RoleName: not null })
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ public class GetActivityQueryHandler : IRequestHandler<GetActivityQuery, Activit
|
|||
|
||||
public async Task<ActivityLDto> Handle(GetActivityQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.TableNoTracking
|
||||
.Where(s => s.Id == request.Id)
|
||||
.Select(ActivityMapper.ProjectToLDto)
|
||||
|
|
|
@ -10,7 +10,7 @@ public class GetShiftPlanActivitiesQueryHandler : IRequestHandler<GetShiftPlanAc
|
|||
|
||||
public async Task<List<ActivitySDto>> Handle(GetShiftPlanActivitiesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var activities = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
var activities = await _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.TableNoTracking
|
||||
.Where(a => a.ShiftPlanId == request.ShiftPlanId)
|
||||
.Select(ActivityMapper.ProjectToSDto)
|
||||
|
|
|
@ -13,7 +13,7 @@ public class UpdateActivityCommandHandler : IRequestHandler<UpdateActivityComman
|
|||
|
||||
public async Task<bool> Handle(UpdateActivityCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.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<UpdateActivityComman
|
|||
try
|
||||
{
|
||||
await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var newTask = Domain.Entities.Task.Activity.Create(
|
||||
var newTask = Domain.Entities.Tasks.Activity.Create(
|
||||
request.Status,
|
||||
request.DoneAt,
|
||||
request.PerformanceDescription,
|
||||
|
@ -45,7 +45,7 @@ public class UpdateActivityCommandHandler : IRequestHandler<UpdateActivityComman
|
|||
newTask.SetUser(request.UserId);
|
||||
newTask.SetShiftPlan(request.ShiftPlanId);
|
||||
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Tasks.Activity>()
|
||||
.Update(newTask);
|
||||
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
|
||||
await _repositoryWrapper.CommitAsync(cancellationToken);
|
||||
|
|
|
@ -16,8 +16,8 @@ public class CreateComplexCommandHandler : IRequestHandler<CreateComplexCommand,
|
|||
try
|
||||
{
|
||||
await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var complex = Domain.Entities.Complex.Complex.Create(request.Name, request.Address, request.SupportPhone);
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>().Add(complex);
|
||||
var complex = Domain.Entities.Complexes.Complex.Create(request.Name, request.Address, request.SupportPhone);
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Complexes.Complex>().Add(complex);
|
||||
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
|
||||
await _repositoryWrapper.CommitAsync(cancellationToken);
|
||||
return complex.AdaptToSDto();
|
||||
|
|
|
@ -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<CreateComplexUser
|
|||
try
|
||||
{
|
||||
//await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var complex = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>().TableNoTracking
|
||||
var complex = await _repositoryWrapper.SetRepository<Domain.Entities.Complexes.Complex>().TableNoTracking
|
||||
.FirstOrDefaultAsync(c => c.Id == request.ComplexId, cancellationToken);
|
||||
if (complex == null)
|
||||
throw new AppException("Complex not found", ApiResultStatusCode.NotFound);
|
||||
|
|
|
@ -13,12 +13,12 @@ public class DeleteComplexCommandHandler : IRequestHandler<DeleteComplexCommand,
|
|||
try
|
||||
{
|
||||
await _repositoryWrapper.BeginTransaction(cancellationToken);
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>()
|
||||
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Complexes.Complex>()
|
||||
.TableNoTracking
|
||||
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
|
||||
if (task == null)
|
||||
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>()
|
||||
_repositoryWrapper.SetRepository<Domain.Entities.Complexes.Complex>()
|
||||
.Delete(task);
|
||||
|
||||
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Brizco.Domain.Entities.Complex;
|
||||
using Brizco.Domain.Entities.Complexes;
|
||||
|
||||
namespace Brizco.Repository.Handlers.Complex;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ public class GetComplexQueryHandler : IRequestHandler<GetComplexQuery, ComplexSD
|
|||
|
||||
public async Task<ComplexSDto> Handle(GetComplexQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var complex = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>()
|
||||
var complex = await _repositoryWrapper.SetRepository<Domain.Entities.Complexes.Complex>()
|
||||
.TableNoTracking
|
||||
.Where(s => s.Id == request.Id)
|
||||
.Select(ComplexMapper.ProjectToSDto)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue