diff --git a/.version b/.version
index 9d3e2f6..57d102a 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-0.1.1.0
\ No newline at end of file
+0.1.2.0
\ No newline at end of file
diff --git a/Brizco.Api/Brizco.Api.csproj b/Brizco.Api/Brizco.Api.csproj
index 70bd10b..ecbbf87 100644
--- a/Brizco.Api/Brizco.Api.csproj
+++ b/Brizco.Api/Brizco.Api.csproj
@@ -6,8 +6,8 @@
enable
Linux
..\docker-compose.dcproj
- 0.1.1.0
- 0.1.1.0
+ 0.1.2.0
+ 0.1.2.0
diff --git a/Brizco.Core/EntityServices/UserService.cs b/Brizco.Core/EntityServices/UserService.cs
index fdbe4df..1013d90 100644
--- a/Brizco.Core/EntityServices/UserService.cs
+++ b/Brizco.Core/EntityServices/UserService.cs
@@ -114,12 +114,6 @@ public class UserService : IUserService
if (role != null)
dto.RoleIds.Add(role.Id);
}
-
- var positionUser = await _repositoryWrapper.SetRepository()
- .TableNoTracking
- .FirstOrDefaultAsync(f => f.ApplicationUserId == userId);
- if (positionUser != null)
- dto.PositionId = positionUser.PositionId;
return dto;
}
@@ -168,7 +162,6 @@ public class UserService : IUserService
throw new AppException(string.Join('|', result.Errors.Select(e => e.Description)));
}
- await _sender.Send(new CreatePositionUserCommand(request.PositionId, user.Id), cancellationToken);
await _sender.Send(new CreateComplexUserCommand(complexId, user.Id, request.RoleIds), cancellationToken);
return user;
}
@@ -207,8 +200,7 @@ public class UserService : IUserService
if (!addPassResult.Succeeded)
throw new AppException(string.Join('|', addPassResult.Errors.Select(e => e.Description)));
}
-
- await _sender.Send(new UpdatePositionUserCommand(request.PositionId, user.Id), cancellationToken);
+
await _sender.Send(new UpdateComplexUserCommand(user.Id, complexId, request.RoleIds), cancellationToken);
return true;
}
diff --git a/Brizco.Domain/CommandQueries/Commands/ActivityCommands.cs b/Brizco.Domain/CommandQueries/Commands/ActivityCommands.cs
index d05cb4f..0a6711c 100644
--- a/Brizco.Domain/CommandQueries/Commands/ActivityCommands.cs
+++ b/Brizco.Domain/CommandQueries/Commands/ActivityCommands.cs
@@ -12,6 +12,8 @@ public sealed record CreateActivityCommand(
bool HasDisposed,
int Amount,
PurchaseAmountType AmountType,
+ TaskScheduleType ScheduleType,
+ List Routines,
List Shifts,
List Positions) : IRequest;
@@ -27,6 +29,8 @@ public sealed record UpdateActivityCommand(Guid Id,
bool HasDisposed,
int Amount,
PurchaseAmountType AmountType,
+ TaskScheduleType ScheduleType,
+ List Routines,
List Shifts,
List Positions) : IRequest;
diff --git a/Brizco.Domain/CommandQueries/Commands/PositionCommands.cs b/Brizco.Domain/CommandQueries/Commands/PositionCommands.cs
index 1b1c933..27c763e 100644
--- a/Brizco.Domain/CommandQueries/Commands/PositionCommands.cs
+++ b/Brizco.Domain/CommandQueries/Commands/PositionCommands.cs
@@ -9,8 +9,11 @@ public sealed record UpdatePositionCommand(Guid Id, string Title, string Descrip
public sealed record DeletePositionCommand(Guid Id)
: IRequest;
-public sealed record CreatePositionUserCommand(Guid PositionId,Guid UserId)
+public sealed record CreatePositionUserCommand(Guid PositionId,Guid UserId, Guid ShiftPlanId)
: IRequest;
-public sealed record UpdatePositionUserCommand(Guid PositionId, Guid UserId)
+public sealed record UpdatePositionUserCommand(Guid PositionId, Guid UserId, Guid ShiftPlanId)
+ : IRequest;
+
+public sealed record DeletePositionUserCommand(Guid PositionId, Guid UserId, Guid ShiftPlanId)
: IRequest;
\ No newline at end of file
diff --git a/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs b/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs
index fc5a610..fe10666 100644
--- a/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs
+++ b/Brizco.Domain/CommandQueries/Commands/ShiftCommands.cs
@@ -2,10 +2,10 @@
namespace Brizco.Domain.CommandQueries.Commands;
-public sealed record CreateShiftCommand(string Title, TimeSpan StartAt, TimeSpan EndAt, string Description, List DayOfWeeks)
+public sealed record CreateShiftCommand(string Title, TimeSpan StartAt, TimeSpan EndAt, string Description, List DayOfWeeks, List Routines)
: IRequest;
-public sealed record UpdateShiftCommand(Guid Id,string Title, TimeSpan StartAt, TimeSpan EndAt, string Description, List DayOfWeeks)
+public sealed record UpdateShiftCommand(Guid Id,string Title, TimeSpan StartAt, TimeSpan EndAt, string Description, List DayOfWeeks, List Routines)
: IRequest;
public sealed record DeleteShiftCommand(Guid Id)
diff --git a/Brizco.Domain/CommandQueries/Commands/TaskCommands.cs b/Brizco.Domain/CommandQueries/Commands/TaskCommands.cs
index ac63dfb..ca7baa9 100644
--- a/Brizco.Domain/CommandQueries/Commands/TaskCommands.cs
+++ b/Brizco.Domain/CommandQueries/Commands/TaskCommands.cs
@@ -4,10 +4,12 @@ public sealed record CreateTaskCommand(TaskType Type,
string Title,
string Description,
bool IsDisposable,
-DateTime SetFor,
+long SetFor,
bool HasDisposed,
int Amount,
PurchaseAmountType AmountType,
+TaskScheduleType ScheduleType,
+List Routines,
List Shifts,
List Positions,
List Days) : IRequest;
@@ -17,10 +19,12 @@ public sealed record UpdateTaskCommand(Guid Id,
string Title,
string Description,
bool IsDisposable,
- DateTime SetFor,
+ long SetFor,
bool HasDisposed,
int Amount,
PurchaseAmountType AmountType,
+ TaskScheduleType ScheduleType,
+ List Routines,
List Shifts,
List Positions,
List Days) : IRequest;
diff --git a/Brizco.Domain/CommandQueries/Queries/ShiftQueries.cs b/Brizco.Domain/CommandQueries/Queries/ShiftQueries.cs
index 4c4abde..c33f490 100644
--- a/Brizco.Domain/CommandQueries/Queries/ShiftQueries.cs
+++ b/Brizco.Domain/CommandQueries/Queries/ShiftQueries.cs
@@ -1,7 +1,7 @@
namespace Brizco.Domain.CommandQueries.Queries;
-public sealed record GetShiftsQuery(int page = 0) :
+public sealed record GetShiftsQuery(int Page = 0) :
IRequest>;
-public sealed record GetShiftQuery(Guid id) :
- IRequest;
\ No newline at end of file
+public sealed record GetShiftQuery(Guid Id) :
+ IRequest;
\ No newline at end of file
diff --git a/Brizco.Domain/Dtos/LargDtos/ShiftLDto.cs b/Brizco.Domain/Dtos/LargDtos/ShiftLDto.cs
index dfca844..09b3fe4 100644
--- a/Brizco.Domain/Dtos/LargDtos/ShiftLDto.cs
+++ b/Brizco.Domain/Dtos/LargDtos/ShiftLDto.cs
@@ -7,5 +7,6 @@ public class ShiftLDto : BaseDto
public TimeSpan StartAt { get; set; }
public TimeSpan EndAt { get; set; }
public Guid ComplexId { get; set; }
- public List Days { get; 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/LargDtos/TaskLDto.cs b/Brizco.Domain/Dtos/LargDtos/TaskLDto.cs
index b70c5a1..537579a 100644
--- a/Brizco.Domain/Dtos/LargDtos/TaskLDto.cs
+++ b/Brizco.Domain/Dtos/LargDtos/TaskLDto.cs
@@ -10,6 +10,7 @@ public class TaskLDto : BaseDto
public bool IsDisposable { get; set; }
public DateTime SetFor { get; set; }
public bool HasDisposed { get; set; }
+ public TaskScheduleType ScheduleType { get; set; }
public int Amount { get; set; }
@@ -20,4 +21,8 @@ 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();
}
\ No newline at end of file
diff --git a/Brizco.Domain/Dtos/RequestDtos/UserActionRequestDto.cs b/Brizco.Domain/Dtos/RequestDtos/UserActionRequestDto.cs
index 4a21d12..dabb287 100644
--- a/Brizco.Domain/Dtos/RequestDtos/UserActionRequestDto.cs
+++ b/Brizco.Domain/Dtos/RequestDtos/UserActionRequestDto.cs
@@ -11,7 +11,6 @@ public class UserActionRequestDto
public string NationalId { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public List RoleIds { get; set; } = new();
- public Guid PositionId { get; set; }
public string SelectedRoleName { get; set; } = string.Empty;
diff --git a/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs b/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs
new file mode 100644
index 0000000..d68393c
--- /dev/null
+++ b/Brizco.Domain/Dtos/SmallDtos/ShiftRoutineSDto.cs
@@ -0,0 +1,7 @@
+namespace Brizco.Domain.Dtos.SmallDtos;
+
+public class ShiftRoutineSDto : BaseDto
+{
+ public Guid RoutineId { get; set; }
+ public Guid ShiftId { get; set; }
+}
\ No newline at end of file
diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs
new file mode 100644
index 0000000..07d1dd5
--- /dev/null
+++ b/Brizco.Domain/Dtos/SmallDtos/TaskDaySDto.cs
@@ -0,0 +1,8 @@
+namespace Brizco.Domain.Dtos.SmallDtos;
+
+public class TaskDaySDto : BaseDto
+{
+ public DayOfWeek DayOfWeek { get; internal set; }
+
+ public Guid TaskId { get; internal set; }
+}
\ No newline at end of file
diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs
new file mode 100644
index 0000000..13c3156
--- /dev/null
+++ b/Brizco.Domain/Dtos/SmallDtos/TaskRoutineSDto.cs
@@ -0,0 +1,7 @@
+namespace Brizco.Domain.Dtos.SmallDtos;
+
+public class TaskRoutineSDto : BaseDto
+{
+ public Guid TaskId { get; set; }
+ public Guid RoutineId { get; set; }
+}
\ No newline at end of file
diff --git a/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs b/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs
index fe95cfa..c0bf67e 100644
--- a/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs
+++ b/Brizco.Domain/Dtos/SmallDtos/TaskSDto.cs
@@ -9,6 +9,7 @@ public class TaskSDto : BaseDto
public DateTime SetFor { get; set; }
public bool HasDisposed { get; set; }
public Guid ComplexId { get; set; }
+ public TaskScheduleType ScheduleType { get; set; }
public int Amount { get; set; }
diff --git a/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs b/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs
index 6e051d9..7d512ba 100644
--- a/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs
+++ b/Brizco.Domain/Entities/Complex/Aggregate.Complex.cs
@@ -51,9 +51,9 @@ public partial class Position
return new Position(name, description, complexId, sectionId);
}
- public PositionUser AddUser(Guid userId)
+ public PositionUser AddUser(Guid userId , Guid shiftPlanId)
{
- var positionUser = PositionUser.Create(this.Id, userId);
+ var positionUser = PositionUser.Create(this.Id, userId, shiftPlanId);
this.Users.Add(positionUser);
return positionUser;
}
@@ -61,8 +61,8 @@ public partial class Position
public partial class PositionUser
{
- public static PositionUser Create(Guid positionId, Guid userId)
+ public static PositionUser Create(Guid positionId, Guid userId, Guid shiftPlanId)
{
- return new PositionUser(positionId, userId);
+ return new PositionUser(positionId, userId, shiftPlanId);
}
}
diff --git a/Brizco.Domain/Entities/Complex/PositionUser.cs b/Brizco.Domain/Entities/Complex/PositionUser.cs
index 190701f..0ff135f 100644
--- a/Brizco.Domain/Entities/Complex/PositionUser.cs
+++ b/Brizco.Domain/Entities/Complex/PositionUser.cs
@@ -9,9 +9,10 @@ public partial class PositionUser : ApiEntity
{
}
- public PositionUser(Guid positionId,Guid applicationUserId)
+ public PositionUser(Guid positionId,Guid applicationUserId ,Guid shiftPlanId)
{
ApplicationUserId = applicationUserId;
+ ShiftPlanId = shiftPlanId;
PositionId = positionId;
}
@@ -20,4 +21,7 @@ public partial class PositionUser : ApiEntity
public Guid PositionId { get; set; }
public Position? Position { get; set; }
+
+ public Guid ShiftPlanId { get; set; }
+ public ShiftPlan? ShiftPlan { get; set; }
}
\ No newline at end of file
diff --git a/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs b/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs
index 8a8379b..c3997a5 100644
--- a/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs
+++ b/Brizco.Domain/Entities/Shift/Aggregate.Shift.cs
@@ -20,6 +20,13 @@ public partial class Shift
Plans.Add(plan);
return plan;
}
+
+ public ShiftRoutine AddRoutine(Guid routineId)
+ {
+ var routine = new ShiftRoutine(routineId, this.Id);
+ Routines.Add(routine);
+ return routine;
+ }
}
public partial class ShiftPlan
diff --git a/Brizco.Domain/Entities/Shift/ShiftRoutine.cs b/Brizco.Domain/Entities/Shift/ShiftRoutine.cs
index 0ed79b0..67a8fba 100644
--- a/Brizco.Domain/Entities/Shift/ShiftRoutine.cs
+++ b/Brizco.Domain/Entities/Shift/ShiftRoutine.cs
@@ -13,9 +13,9 @@ public class ShiftRoutine : ApiEntity
RoutineId = routineId;
ShiftId = shiftId;
}
- public Guid RoutineId { get; set; }
- public Routine.Routine? Routine { get; set; }
+ public Guid RoutineId { get; internal set; }
+ public Routine.Routine? Routine { get; internal set; }
- public Guid ShiftId { get; set; }
- public Shift? Shift { get; set; }
+ public Guid ShiftId { get; internal set; }
+ public Shift? Shift { get; internal set; }
}
\ No newline at end of file
diff --git a/Brizco.Domain/Entities/Task/Activity.cs b/Brizco.Domain/Entities/Task/Activity.cs
index 3b1067c..056d5ba 100644
--- a/Brizco.Domain/Entities/Task/Activity.cs
+++ b/Brizco.Domain/Entities/Task/Activity.cs
@@ -1,4 +1,4 @@
-using System;
+using Brizco.Domain.Entities.User;
namespace Brizco.Domain.Entities.Task;
@@ -22,15 +22,19 @@ public partial class Activity : Task
PurchaseAmountType amountType,
string title,
string description,
- Guid complexId) : base(
- type, isDisposable, setFor, hasDisposed, amount, amountType, title, description, complexId)
+ Guid complexId,
+ TaskScheduleType scheduleType) : base(
+ type, isDisposable, setFor, hasDisposed, amount, amountType, title, description, complexId, scheduleType)
{
Status = status;
DoneAt = doneAt;
PerformanceDescription = performanceDescription;
}
+
public ActivityStatus Status { get; internal set; }
public DateTime DoneAt { get; internal set; }
public bool IsDone { get; internal set; }
public string PerformanceDescription { get; internal set; } = string.Empty;
+ public Guid UserId { get; internal set; }
+ public ApplicationUser? User { get; internal set; }
}
\ No newline at end of file
diff --git a/Brizco.Domain/Entities/Task/Aggregate.Task.cs b/Brizco.Domain/Entities/Task/Aggregate.Task.cs
index db1c6bc..3493928 100644
--- a/Brizco.Domain/Entities/Task/Aggregate.Task.cs
+++ b/Brizco.Domain/Entities/Task/Aggregate.Task.cs
@@ -1,4 +1,5 @@
-using Brizco.Domain.Entities.Routine;
+using Brizco.Common.Models.Exception;
+using Brizco.Domain.Entities.Routine;
namespace Brizco.Domain.Entities.Task;
@@ -15,8 +16,13 @@ public partial class Task
bool hasDisposed,
int amount,
PurchaseAmountType amountType,
- Guid complexId)
+ Guid complexId,
+ TaskScheduleType scheduleType)
{
+ if (scheduleType == TaskScheduleType.Custom && setFor == DateTime.MinValue)
+ throw new AppException("اگر تکرار وظیفه یک روز خاص باشد باید ان روز را انتخاب کنید");
+ if (scheduleType == TaskScheduleType.Custom)
+ isDisposable = true;
return new Task(
type,
isDisposable,
@@ -26,7 +32,8 @@ public partial class Task
amountType,
title,
description,
- complexId);
+ complexId,
+ scheduleType);
}
@@ -58,13 +65,13 @@ public partial class Task
{
foreach (var positionId in positionIds)
{
- var position = new TaskPosition(Id, positionId);
+ var position = new TaskPosition(positionId,Id);
Positions.Add(position);
}
}
public TaskPosition AddPosition(Guid positionId)
{
- var position = new TaskPosition(Id, positionId);
+ var position = new TaskPosition(positionId,Id);
Positions.Add(position);
return position;
}
@@ -75,13 +82,13 @@ public partial class Task
{
foreach (var routineId in routineIds)
{
- var routine = new TaskRoutine(Id, routineId);
+ var routine = new TaskRoutine(routineId,Id);
Routines.Add(routine);
}
}
public TaskRoutine AddRoutine(Guid routineId)
{
- var routine = new TaskRoutine(Id, routineId);
+ var routine = new TaskRoutine(routineId,Id);
Routines.Add(routine);
return routine;
}
@@ -102,7 +109,8 @@ public partial class Activity
bool hasDisposed,
int amount,
PurchaseAmountType amountType,
- Guid complexId)
+ Guid complexId,
+ TaskScheduleType scheduleType)
{
return new Activity(
status,
@@ -116,7 +124,8 @@ public partial class Activity
amountType,
title,
description,
- complexId);
+ complexId,
+ scheduleType);
}
public void DoneActivity()
diff --git a/Brizco.Domain/Entities/Task/Task.cs b/Brizco.Domain/Entities/Task/Task.cs
index f501a29..4b2faba 100644
--- a/Brizco.Domain/Entities/Task/Task.cs
+++ b/Brizco.Domain/Entities/Task/Task.cs
@@ -19,7 +19,8 @@ public partial class Task : ApiEntity
PurchaseAmountType amountType,
string title,
string description,
- Guid complexId)
+ Guid complexId,
+ TaskScheduleType scheduleType)
{
Type = type;
IsDisposable = isDisposable;
@@ -30,6 +31,7 @@ public partial class Task : ApiEntity
Title = title;
Description = description;
ComplexId = complexId;
+ ScheduleType = scheduleType;
}
public TaskType Type { get; internal set; }
@@ -38,6 +40,7 @@ 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 Guid ComplexId { get; set; }
public Complex.Complex? Complex { get; set; }
@@ -47,12 +50,12 @@ public partial class Task : ApiEntity
public PurchaseAmountType AmountType { get; internal set; }
-
public List Shifts { get; internal set; } = new();
public List Days { get; internal set; } = new();
+ public List Routines { get; internal set; } = new();
+
public List Positions { get; internal set; } = new();
- public List Routines { get; internal set; } = new();
}
diff --git a/Brizco.Domain/Entities/Task/TaskDay.cs b/Brizco.Domain/Entities/Task/TaskDay.cs
index 49b335b..dda3a6a 100644
--- a/Brizco.Domain/Entities/Task/TaskDay.cs
+++ b/Brizco.Domain/Entities/Task/TaskDay.cs
@@ -1,5 +1,7 @@
namespace Brizco.Domain.Entities.Task;
+[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
+[GenerateMapper]
public class TaskDay : ApiEntity
{
public TaskDay()
diff --git a/Brizco.Domain/Enums/TaskScheduleType.cs b/Brizco.Domain/Enums/TaskScheduleType.cs
new file mode 100644
index 0000000..e3c6745
--- /dev/null
+++ b/Brizco.Domain/Enums/TaskScheduleType.cs
@@ -0,0 +1,11 @@
+namespace Brizco.Domain.Enums;
+
+public enum TaskScheduleType
+{
+ [Display(Name = "روزانه")]
+ Daily,
+ [Display(Name = "هفتگی")]
+ Weekly,
+ [Display(Name = "روز مشخص")]
+ Custom
+}
\ No newline at end of file
diff --git a/Brizco.Domain/Mappers/ShiftMapper.g.cs b/Brizco.Domain/Mappers/ShiftMapper.g.cs
index 682d9ec..f9e8923 100644
--- a/Brizco.Domain/Mappers/ShiftMapper.g.cs
+++ b/Brizco.Domain/Mappers/ShiftMapper.g.cs
@@ -106,88 +106,97 @@ namespace Brizco.Domain.Mappers
EndAt = p18.EndAt,
Description = p18.Description,
ComplexId = p18.ComplexId,
+ Complex = new Complex() {Id = p18.ComplexId},
Days = funcMain7(p18.Days),
+ Routines = funcMain8(p18.Routines),
Id = p18.Id
};
}
- public static Shift AdaptTo(this ShiftLDto p20, Shift p21)
+ public static Shift AdaptTo(this ShiftLDto p21, Shift p22)
{
- if (p20 == null)
+ if (p21 == null)
{
return null;
}
- Shift result = p21 ?? new Shift();
+ Shift result = p22 ?? new Shift();
- result.Title = p20.Title;
- result.StartAt = p20.StartAt;
- result.EndAt = p20.EndAt;
- result.Description = p20.Description;
- result.ComplexId = p20.ComplexId;
- result.Days = funcMain8(p20.Days, result.Days);
- result.Id = p20.Id;
+ result.Title = p21.Title;
+ result.StartAt = p21.StartAt;
+ result.EndAt = p21.EndAt;
+ result.Description = p21.Description;
+ result.ComplexId = p21.ComplexId;
+ result.Complex = funcMain9(new Never(), result.Complex, p21);
+ result.Days = funcMain10(p21.Days, result.Days);
+ result.Routines = funcMain11(p21.Routines, result.Routines);
+ result.Id = p21.Id;
return result;
}
- public static Expression> ProjectLDtoToShift => p24 => new Shift()
+ public static Expression> ProjectLDtoToShift => p29 => new Shift()
{
- Title = p24.Title,
- StartAt = p24.StartAt,
- EndAt = p24.EndAt,
- Description = p24.Description,
- ComplexId = p24.ComplexId,
- Days = p24.Days.Select(p25 => new ShiftDay()
+ Title = p29.Title,
+ StartAt = p29.StartAt,
+ EndAt = p29.EndAt,
+ Description = p29.Description,
+ ComplexId = p29.ComplexId,
+ Complex = new Complex() {Id = p29.ComplexId},
+ Days = p29.Days.Select(p30 => new ShiftDay() {}).ToList(),
+ Routines = p29.Routines.Select(p31 => new ShiftRoutine()
{
- DayOfWeek = p25.DayOfWeek,
- ShiftId = p25.ShiftId,
- Id = p25.Id
- }).ToList(),
- Id = p24.Id
+ RoutineId = p31.RoutineId,
+ ShiftId = p31.ShiftId,
+ Id = p31.Id
+ }).ToList(),
+ Id = p29.Id
};
- public static ShiftLDto AdaptToLDto(this Shift p26)
+ public static ShiftLDto AdaptToLDto(this Shift p32)
{
- return p26 == null ? null : new ShiftLDto()
+ return p32 == null ? null : new ShiftLDto()
{
- Title = p26.Title,
- Description = p26.Description,
- StartAt = p26.StartAt,
- EndAt = p26.EndAt,
- ComplexId = p26.ComplexId,
- Days = funcMain9(p26.Days),
- Id = p26.Id
+ Title = p32.Title,
+ Description = p32.Description,
+ StartAt = p32.StartAt,
+ EndAt = p32.EndAt,
+ ComplexId = p32.ComplexId,
+ Days = funcMain12(p32.Days.Select(funcMain13).ToList()),
+ Routines = funcMain14(p32.Routines),
+ Id = p32.Id
};
}
- public static ShiftLDto AdaptTo(this Shift p28, ShiftLDto p29)
+ public static ShiftLDto AdaptTo(this Shift p35, ShiftLDto p36)
{
- if (p28 == null)
+ if (p35 == null)
{
return null;
}
- ShiftLDto result = p29 ?? new ShiftLDto();
+ ShiftLDto result = p36 ?? new ShiftLDto();
- result.Title = p28.Title;
- result.Description = p28.Description;
- result.StartAt = p28.StartAt;
- result.EndAt = p28.EndAt;
- result.ComplexId = p28.ComplexId;
- result.Days = funcMain10(p28.Days, result.Days);
- result.Id = p28.Id;
+ result.Title = p35.Title;
+ result.Description = p35.Description;
+ result.StartAt = p35.StartAt;
+ result.EndAt = p35.EndAt;
+ result.ComplexId = p35.ComplexId;
+ result.Days = funcMain15(p35.Days.Select(funcMain13).ToList(), result.Days);
+ result.Routines = funcMain16(p35.Routines, result.Routines);
+ result.Id = p35.Id;
return result;
}
- public static Expression> ProjectToLDto => p32 => new ShiftLDto()
+ public static Expression> ProjectToLDto => p41 => new ShiftLDto()
{
- Title = p32.Title,
- Description = p32.Description,
- StartAt = p32.StartAt,
- EndAt = p32.EndAt,
- ComplexId = p32.ComplexId,
- Days = p32.Days.Select(p33 => new ShiftDaySDto()
+ Title = p41.Title,
+ Description = p41.Description,
+ StartAt = p41.StartAt,
+ EndAt = p41.EndAt,
+ ComplexId = p41.ComplexId,
+ Days = p41.Days.Select(d => d.DayOfWeek).ToList(),
+ Routines = p41.Routines.Select(p42 => new ShiftRoutineSDto()
{
- DayOfWeek = p33.DayOfWeek,
- ShiftId = p33.ShiftId,
- Id = p33.Id
- }).ToList(),
- Id = p32.Id
+ RoutineId = p42.RoutineId,
+ ShiftId = p42.ShiftId,
+ Id = p42.Id
+ }).ToList(),
+ Id = p41.Id
};
private static List funcMain1(List p2)
@@ -288,7 +297,7 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain7(List p19)
+ private static List funcMain7(List p19)
{
if (p19 == null)
{
@@ -301,36 +310,31 @@ namespace Brizco.Domain.Mappers
while (i < len)
{
- ShiftDaySDto item = p19[i];
- result.Add(item == null ? null : new ShiftDay()
- {
- DayOfWeek = item.DayOfWeek,
- ShiftId = item.ShiftId,
- Id = item.Id
- });
+ DayOfWeek item = p19[i];
+ result.Add(new ShiftDay() {});
i++;
}
return result;
}
- private static List funcMain8(List p22, List p23)
+ private static List funcMain8(List p20)
{
- if (p22 == null)
+ if (p20 == null)
{
return null;
}
- List result = new List(p22.Count);
+ List result = new List(p20.Count);
int i = 0;
- int len = p22.Count;
+ int len = p20.Count;
while (i < len)
{
- ShiftDaySDto item = p22[i];
- result.Add(item == null ? null : new ShiftDay()
+ ShiftRoutineSDto item = p20[i];
+ result.Add(item == null ? null : new ShiftRoutine()
{
- DayOfWeek = item.DayOfWeek,
+ RoutineId = item.RoutineId,
ShiftId = item.ShiftId,
Id = item.Id
});
@@ -340,23 +344,53 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain9(List p27)
+ private static Complex funcMain9(Never p23, Complex p24, ShiftLDto p21)
+ {
+ Complex result = p24 ?? new Complex();
+
+ result.Id = p21.ComplexId;
+ return result;
+
+ }
+
+ private static List funcMain10(List p25, List p26)
+ {
+ if (p25 == null)
+ {
+ return null;
+ }
+ List result = new List(p25.Count);
+
+ int i = 0;
+ int len = p25.Count;
+
+ while (i < len)
+ {
+ DayOfWeek item = p25[i];
+ result.Add(new ShiftDay() {});
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain11(List p27, List p28)
{
if (p27 == null)
{
return null;
}
- List result = new List(p27.Count);
+ List result = new List(p27.Count);
int i = 0;
int len = p27.Count;
while (i < len)
{
- ShiftDay item = p27[i];
- result.Add(item == null ? null : new ShiftDaySDto()
+ ShiftRoutineSDto item = p27[i];
+ result.Add(item == null ? null : new ShiftRoutine()
{
- DayOfWeek = item.DayOfWeek,
+ RoutineId = item.RoutineId,
ShiftId = item.ShiftId,
Id = item.Id
});
@@ -366,23 +400,96 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain10(List p30, List p31)
+ private static List funcMain12(List p33)
{
- if (p30 == null)
+ if (p33 == null)
{
return null;
}
- List result = new List(p30.Count);
+ List result = new List(p33.Count);
int i = 0;
- int len = p30.Count;
+ int len = p33.Count;
while (i < len)
{
- ShiftDay item = p30[i];
- result.Add(item == null ? null : new ShiftDaySDto()
+ DayOfWeek item = p33[i];
+ result.Add(item);
+ i++;
+ }
+ return result;
+
+ }
+
+ private static DayOfWeek funcMain13(ShiftDay d)
+ {
+ return d.DayOfWeek;
+ }
+
+ private static List funcMain14(List p34)
+ {
+ if (p34 == null)
+ {
+ return null;
+ }
+ List result = new List(p34.Count);
+
+ int i = 0;
+ int len = p34.Count;
+
+ while (i < len)
+ {
+ ShiftRoutine item = p34[i];
+ result.Add(item == null ? null : new ShiftRoutineSDto()
{
- DayOfWeek = item.DayOfWeek,
+ RoutineId = item.RoutineId,
+ ShiftId = item.ShiftId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain15(List p37, List p38)
+ {
+ if (p37 == null)
+ {
+ return null;
+ }
+ List result = new List(p37.Count);
+
+ int i = 0;
+ int len = p37.Count;
+
+ while (i < len)
+ {
+ DayOfWeek item = p37[i];
+ result.Add(item);
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain16(List p39, List p40)
+ {
+ if (p39 == null)
+ {
+ return null;
+ }
+ List result = new List(p39.Count);
+
+ int i = 0;
+ int len = p39.Count;
+
+ while (i < len)
+ {
+ ShiftRoutine item = p39[i];
+ result.Add(item == null ? null : new ShiftRoutineSDto()
+ {
+ RoutineId = item.RoutineId,
ShiftId = item.ShiftId,
Id = item.Id
});
diff --git a/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs b/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs
index 913f999..11d91f1 100644
--- a/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs
+++ b/Brizco.Domain/Mappers/ShiftRoutineMapper.g.cs
@@ -1,6 +1,69 @@
+using System;
+using System.Linq.Expressions;
+using Brizco.Domain.Dtos.SmallDtos;
+using Brizco.Domain.Entities.Shift;
+
namespace Brizco.Domain.Mappers
{
public static partial class ShiftRoutineMapper
{
+ public static ShiftRoutine AdaptToShiftRoutine(this ShiftRoutineSDto p1)
+ {
+ return p1 == null ? null : new ShiftRoutine()
+ {
+ RoutineId = p1.RoutineId,
+ ShiftId = p1.ShiftId,
+ Id = p1.Id
+ };
+ }
+ public static ShiftRoutine AdaptTo(this ShiftRoutineSDto p2, ShiftRoutine p3)
+ {
+ if (p2 == null)
+ {
+ return null;
+ }
+ ShiftRoutine result = p3 ?? new ShiftRoutine();
+
+ result.RoutineId = p2.RoutineId;
+ result.ShiftId = p2.ShiftId;
+ result.Id = p2.Id;
+ return result;
+
+ }
+ public static Expression> ProjectToShiftRoutine => p4 => new ShiftRoutine()
+ {
+ RoutineId = p4.RoutineId,
+ ShiftId = p4.ShiftId,
+ Id = p4.Id
+ };
+ public static ShiftRoutineSDto AdaptToSDto(this ShiftRoutine p5)
+ {
+ return p5 == null ? null : new ShiftRoutineSDto()
+ {
+ RoutineId = p5.RoutineId,
+ ShiftId = p5.ShiftId,
+ Id = p5.Id
+ };
+ }
+ public static ShiftRoutineSDto AdaptTo(this ShiftRoutine p6, ShiftRoutineSDto p7)
+ {
+ if (p6 == null)
+ {
+ return null;
+ }
+ ShiftRoutineSDto result = p7 ?? new ShiftRoutineSDto();
+
+ result.RoutineId = p6.RoutineId;
+ result.ShiftId = p6.ShiftId;
+ result.Id = p6.Id;
+ return result;
+
+ }
+ public static Expression> ProjectToSDto => p8 => new ShiftRoutineSDto()
+ {
+ RoutineId = p8.RoutineId,
+ ShiftId = p8.ShiftId,
+ Id = p8.Id
+ };
}
}
\ No newline at end of file
diff --git a/Brizco.Domain/Mappers/TaskDayMapper.g.cs b/Brizco.Domain/Mappers/TaskDayMapper.g.cs
new file mode 100644
index 0000000..1744b23
--- /dev/null
+++ b/Brizco.Domain/Mappers/TaskDayMapper.g.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Linq.Expressions;
+using Brizco.Domain.Dtos.SmallDtos;
+using Brizco.Domain.Entities.Task;
+
+namespace Brizco.Domain.Mappers
+{
+ public static partial class TaskDayMapper
+ {
+ public static TaskDay AdaptToTaskDay(this TaskDaySDto p1)
+ {
+ return p1 == null ? null : new TaskDay()
+ {
+ DayOfWeek = p1.DayOfWeek,
+ TaskId = p1.TaskId,
+ Id = p1.Id
+ };
+ }
+ public static TaskDay AdaptTo(this TaskDaySDto p2, TaskDay p3)
+ {
+ if (p2 == null)
+ {
+ return null;
+ }
+ TaskDay result = p3 ?? new TaskDay();
+
+ result.DayOfWeek = p2.DayOfWeek;
+ result.TaskId = p2.TaskId;
+ result.Id = p2.Id;
+ return result;
+
+ }
+ public static Expression> ProjectToTaskDay => p4 => new TaskDay()
+ {
+ DayOfWeek = p4.DayOfWeek,
+ TaskId = p4.TaskId,
+ Id = p4.Id
+ };
+ public static TaskDaySDto AdaptToSDto(this TaskDay p5)
+ {
+ return p5 == null ? null : new TaskDaySDto()
+ {
+ DayOfWeek = p5.DayOfWeek,
+ TaskId = p5.TaskId,
+ Id = p5.Id
+ };
+ }
+ public static TaskDaySDto AdaptTo(this TaskDay p6, TaskDaySDto p7)
+ {
+ if (p6 == null)
+ {
+ return null;
+ }
+ TaskDaySDto result = p7 ?? new TaskDaySDto();
+
+ result.DayOfWeek = p6.DayOfWeek;
+ result.TaskId = p6.TaskId;
+ result.Id = p6.Id;
+ return result;
+
+ }
+ public static Expression> ProjectToSDto => p8 => new TaskDaySDto()
+ {
+ DayOfWeek = p8.DayOfWeek,
+ TaskId = p8.TaskId,
+ Id = p8.Id
+ };
+ }
+}
\ No newline at end of file
diff --git a/Brizco.Domain/Mappers/TaskMapper.g.cs b/Brizco.Domain/Mappers/TaskMapper.g.cs
index fb56d77..b89d5d2 100644
--- a/Brizco.Domain/Mappers/TaskMapper.g.cs
+++ b/Brizco.Domain/Mappers/TaskMapper.g.cs
@@ -21,6 +21,7 @@ namespace Brizco.Domain.Mappers
IsDisposable = p1.IsDisposable,
SetFor = p1.SetFor,
HasDisposed = p1.HasDisposed,
+ ScheduleType = p1.ScheduleType,
ComplexId = p1.ComplexId,
Amount = p1.Amount,
AmountType = p1.AmountType,
@@ -41,6 +42,7 @@ namespace Brizco.Domain.Mappers
result.IsDisposable = p2.IsDisposable;
result.SetFor = p2.SetFor;
result.HasDisposed = p2.HasDisposed;
+ result.ScheduleType = p2.ScheduleType;
result.ComplexId = p2.ComplexId;
result.Amount = p2.Amount;
result.AmountType = p2.AmountType;
@@ -56,6 +58,7 @@ namespace Brizco.Domain.Mappers
IsDisposable = p4.IsDisposable,
SetFor = p4.SetFor,
HasDisposed = p4.HasDisposed,
+ ScheduleType = p4.ScheduleType,
ComplexId = p4.ComplexId,
Amount = p4.Amount,
AmountType = p4.AmountType,
@@ -72,6 +75,7 @@ namespace Brizco.Domain.Mappers
SetFor = p5.SetFor,
HasDisposed = p5.HasDisposed,
ComplexId = p5.ComplexId,
+ ScheduleType = p5.ScheduleType,
Amount = p5.Amount,
AmountType = p5.AmountType,
Id = p5.Id
@@ -92,6 +96,7 @@ namespace Brizco.Domain.Mappers
result.SetFor = p6.SetFor;
result.HasDisposed = p6.HasDisposed;
result.ComplexId = p6.ComplexId;
+ result.ScheduleType = p6.ScheduleType;
result.Amount = p6.Amount;
result.AmountType = p6.AmountType;
result.Id = p6.Id;
@@ -107,6 +112,7 @@ namespace Brizco.Domain.Mappers
SetFor = p8.SetFor,
HasDisposed = p8.HasDisposed,
ComplexId = p8.ComplexId,
+ ScheduleType = p8.ScheduleType,
Amount = p8.Amount,
AmountType = p8.AmountType,
Id = p8.Id
@@ -121,119 +127,157 @@ namespace Brizco.Domain.Mappers
IsDisposable = p9.IsDisposable,
SetFor = p9.SetFor,
HasDisposed = p9.HasDisposed,
+ ScheduleType = p9.ScheduleType,
Amount = p9.Amount,
AmountType = p9.AmountType,
Shifts = funcMain1(p9.Shifts),
- Positions = funcMain2(p9.Positions),
+ Days = funcMain2(p9.Days),
+ Routines = funcMain3(p9.Routines),
+ Positions = funcMain4(p9.Positions),
Id = p9.Id
};
}
- public static Task AdaptTo(this TaskLDto p12, Task p13)
+ public static Task AdaptTo(this TaskLDto p14, Task p15)
{
- if (p12 == null)
+ if (p14 == null)
{
return null;
}
- Task result = p13 ?? new Task();
+ Task result = p15 ?? new Task();
- result.Type = p12.Type;
- result.Title = p12.Title;
- result.Description = p12.Description;
- result.IsDisposable = p12.IsDisposable;
- result.SetFor = p12.SetFor;
- result.HasDisposed = p12.HasDisposed;
- result.Amount = p12.Amount;
- result.AmountType = p12.AmountType;
- result.Shifts = funcMain3(p12.Shifts, result.Shifts);
- result.Positions = funcMain4(p12.Positions, result.Positions);
- result.Id = p12.Id;
+ result.Type = p14.Type;
+ result.Title = p14.Title;
+ result.Description = p14.Description;
+ result.IsDisposable = p14.IsDisposable;
+ result.SetFor = p14.SetFor;
+ result.HasDisposed = p14.HasDisposed;
+ result.ScheduleType = p14.ScheduleType;
+ result.Amount = p14.Amount;
+ result.AmountType = p14.AmountType;
+ result.Shifts = funcMain5(p14.Shifts, result.Shifts);
+ result.Days = funcMain6(p14.Days, result.Days);
+ result.Routines = funcMain7(p14.Routines, result.Routines);
+ result.Positions = funcMain8(p14.Positions, result.Positions);
+ result.Id = p14.Id;
return result;
}
- public static Expression> ProjectLDtoToTask => p18 => new Task()
+ public static Expression> ProjectLDtoToTask => p24 => new Task()
{
- Type = p18.Type,
- Title = p18.Title,
- Description = p18.Description,
- IsDisposable = p18.IsDisposable,
- SetFor = p18.SetFor,
- HasDisposed = p18.HasDisposed,
- Amount = p18.Amount,
- AmountType = p18.AmountType,
- Shifts = p18.Shifts.Select(p19 => new TaskShift()
+ Type = p24.Type,
+ Title = p24.Title,
+ Description = p24.Description,
+ IsDisposable = p24.IsDisposable,
+ SetFor = p24.SetFor,
+ HasDisposed = p24.HasDisposed,
+ ScheduleType = p24.ScheduleType,
+ Amount = p24.Amount,
+ AmountType = p24.AmountType,
+ Shifts = p24.Shifts.Select(p25 => new TaskShift()
{
- TaskId = p19.TaskId,
- ShiftId = p19.ShiftId
+ TaskId = p25.TaskId,
+ ShiftId = p25.ShiftId
}).ToList(),
- Positions = p18.Positions.Select(p20 => new TaskPosition()
+ Days = p24.Days.Select(p26 => new TaskDay()
{
- PositionId = p20.PositionId,
- TaskId = p20.TaskId,
- Id = p20.Id
+ DayOfWeek = p26.DayOfWeek,
+ TaskId = p26.TaskId,
+ Id = p26.Id
+ }).ToList(),
+ Routines = p24.Routines.Select(p27 => new TaskRoutine()
+ {
+ TaskId = p27.TaskId,
+ RoutineId = p27.RoutineId,
+ Id = p27.Id
+ }).ToList(),
+ Positions = p24.Positions.Select(p28 => new TaskPosition()
+ {
+ PositionId = p28.PositionId,
+ TaskId = p28.TaskId,
+ Id = p28.Id
}).ToList(),
- Id = p18.Id
+ Id = p24.Id
};
- public static TaskLDto AdaptToLDto(this Task p21)
+ public static TaskLDto AdaptToLDto(this Task p29)
{
- return p21 == null ? null : new TaskLDto()
+ return p29 == null ? null : new TaskLDto()
{
- Type = p21.Type,
- Title = p21.Title,
- Description = p21.Description,
- IsDisposable = p21.IsDisposable,
- SetFor = p21.SetFor,
- HasDisposed = p21.HasDisposed,
- Amount = p21.Amount,
- AmountType = p21.AmountType,
- Shifts = funcMain5(p21.Shifts),
- Positions = funcMain6(p21.Positions),
- Id = p21.Id
+ Type = p29.Type,
+ Title = p29.Title,
+ Description = p29.Description,
+ IsDisposable = p29.IsDisposable,
+ SetFor = p29.SetFor,
+ HasDisposed = p29.HasDisposed,
+ ScheduleType = p29.ScheduleType,
+ Amount = p29.Amount,
+ AmountType = p29.AmountType,
+ Shifts = funcMain9(p29.Shifts),
+ Positions = funcMain10(p29.Positions),
+ Days = funcMain11(p29.Days),
+ Routines = funcMain12(p29.Routines),
+ Id = p29.Id
};
}
- public static TaskLDto AdaptTo(this Task p24, TaskLDto p25)
+ public static TaskLDto AdaptTo(this Task p34, TaskLDto p35)
{
- if (p24 == null)
+ if (p34 == null)
{
return null;
}
- TaskLDto result = p25 ?? new TaskLDto();
+ TaskLDto result = p35 ?? new TaskLDto();
- result.Type = p24.Type;
- result.Title = p24.Title;
- result.Description = p24.Description;
- result.IsDisposable = p24.IsDisposable;
- result.SetFor = p24.SetFor;
- result.HasDisposed = p24.HasDisposed;
- result.Amount = p24.Amount;
- result.AmountType = p24.AmountType;
- result.Shifts = funcMain7(p24.Shifts, result.Shifts);
- result.Positions = funcMain8(p24.Positions, result.Positions);
- result.Id = p24.Id;
+ result.Type = p34.Type;
+ result.Title = p34.Title;
+ result.Description = p34.Description;
+ result.IsDisposable = p34.IsDisposable;
+ result.SetFor = p34.SetFor;
+ result.HasDisposed = p34.HasDisposed;
+ result.ScheduleType = p34.ScheduleType;
+ result.Amount = p34.Amount;
+ result.AmountType = p34.AmountType;
+ result.Shifts = funcMain13(p34.Shifts, result.Shifts);
+ result.Positions = funcMain14(p34.Positions, result.Positions);
+ result.Days = funcMain15(p34.Days, result.Days);
+ result.Routines = funcMain16(p34.Routines, result.Routines);
+ result.Id = p34.Id;
return result;
}
- public static Expression> ProjectToLDto => p30 => new TaskLDto()
+ public static Expression> ProjectToLDto => p44 => new TaskLDto()
{
- Type = p30.Type,
- Title = p30.Title,
- Description = p30.Description,
- IsDisposable = p30.IsDisposable,
- SetFor = p30.SetFor,
- HasDisposed = p30.HasDisposed,
- Amount = p30.Amount,
- AmountType = p30.AmountType,
- Shifts = p30.Shifts.Select(p31 => new TaskShiftSDto()
+ Type = p44.Type,
+ Title = p44.Title,
+ Description = p44.Description,
+ IsDisposable = p44.IsDisposable,
+ SetFor = p44.SetFor,
+ HasDisposed = p44.HasDisposed,
+ ScheduleType = p44.ScheduleType,
+ Amount = p44.Amount,
+ AmountType = p44.AmountType,
+ Shifts = p44.Shifts.Select(p45 => new TaskShiftSDto()
{
- ShiftId = p31.ShiftId,
- TaskId = p31.TaskId
+ ShiftId = p45.ShiftId,
+ TaskId = p45.TaskId
}).ToList(),
- Positions = p30.Positions.Select(p32 => new TaskPositionSDto()
+ Positions = p44.Positions.Select(p46 => new TaskPositionSDto()
{
- PositionId = p32.PositionId,
- TaskId = p32.TaskId,
- Id = p32.Id
+ PositionId = p46.PositionId,
+ TaskId = p46.TaskId,
+ Id = p46.Id
}).ToList(),
- Id = p30.Id
+ Days = p44.Days.Select(p47 => new TaskDaySDto()
+ {
+ DayOfWeek = p47.DayOfWeek,
+ TaskId = p47.TaskId,
+ Id = p47.Id
+ }).ToList(),
+ Routines = p44.Routines.Select(p48 => new TaskRoutineSDto()
+ {
+ TaskId = p48.TaskId,
+ RoutineId = p48.RoutineId,
+ Id = p48.Id
+ }).ToList(),
+ Id = p44.Id
};
private static List funcMain1(List p10)
@@ -261,20 +305,72 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain2(List p11)
+ private static List funcMain2(List p11)
{
if (p11 == null)
{
return null;
}
- List result = new List(p11.Count);
+ List result = new List(p11.Count);
int i = 0;
int len = p11.Count;
while (i < len)
{
- TaskPositionSDto item = p11[i];
+ TaskDaySDto item = p11[i];
+ result.Add(item == null ? null : new TaskDay()
+ {
+ DayOfWeek = item.DayOfWeek,
+ TaskId = item.TaskId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain3(List p12)
+ {
+ if (p12 == null)
+ {
+ return null;
+ }
+ List result = new List(p12.Count);
+
+ int i = 0;
+ int len = p12.Count;
+
+ while (i < len)
+ {
+ TaskRoutineSDto item = p12[i];
+ result.Add(item == null ? null : new TaskRoutine()
+ {
+ TaskId = item.TaskId,
+ RoutineId = item.RoutineId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain4(List p13)
+ {
+ if (p13 == null)
+ {
+ return null;
+ }
+ List result = new List(p13.Count);
+
+ int i = 0;
+ int len = p13.Count;
+
+ while (i < len)
+ {
+ TaskPositionSDto item = p13[i];
result.Add(item == null ? null : new TaskPosition()
{
PositionId = item.PositionId,
@@ -287,20 +383,20 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain3(List p14, List p15)
+ private static List funcMain5(List p16, List p17)
{
- if (p14 == null)
+ if (p16 == null)
{
return null;
}
- List result = new List(p14.Count);
+ List result = new List(p16.Count);
int i = 0;
- int len = p14.Count;
+ int len = p16.Count;
while (i < len)
{
- TaskShiftSDto item = p14[i];
+ TaskShiftSDto item = p16[i];
result.Add(item == null ? null : new TaskShift()
{
TaskId = item.TaskId,
@@ -312,20 +408,72 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain4(List p16, List p17)
+ private static List funcMain6(List p18, List p19)
{
- if (p16 == null)
+ if (p18 == null)
{
return null;
}
- List result = new List(p16.Count);
+ List result = new List(p18.Count);
int i = 0;
- int len = p16.Count;
+ int len = p18.Count;
while (i < len)
{
- TaskPositionSDto item = p16[i];
+ TaskDaySDto item = p18[i];
+ result.Add(item == null ? null : new TaskDay()
+ {
+ DayOfWeek = item.DayOfWeek,
+ TaskId = item.TaskId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain7(List p20, List p21)
+ {
+ if (p20 == null)
+ {
+ return null;
+ }
+ List result = new List(p20.Count);
+
+ int i = 0;
+ int len = p20.Count;
+
+ while (i < len)
+ {
+ TaskRoutineSDto item = p20[i];
+ result.Add(item == null ? null : new TaskRoutine()
+ {
+ TaskId = item.TaskId,
+ RoutineId = item.RoutineId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain8(List p22, List p23)
+ {
+ if (p22 == null)
+ {
+ return null;
+ }
+ List result = new List(p22.Count);
+
+ int i = 0;
+ int len = p22.Count;
+
+ while (i < len)
+ {
+ TaskPositionSDto item = p22[i];
result.Add(item == null ? null : new TaskPosition()
{
PositionId = item.PositionId,
@@ -338,20 +486,20 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain5(List p22)
+ private static List funcMain9(List p30)
{
- if (p22 == null)
+ if (p30 == null)
{
return null;
}
- List result = new List(p22.Count);
+ List result = new List(p30.Count);
int i = 0;
- int len = p22.Count;
+ int len = p30.Count;
while (i < len)
{
- TaskShift item = p22[i];
+ TaskShift item = p30[i];
result.Add(item == null ? null : new TaskShiftSDto()
{
ShiftId = item.ShiftId,
@@ -363,20 +511,20 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain6(List p23)
+ private static List funcMain10(List p31)
{
- if (p23 == null)
+ if (p31 == null)
{
return null;
}
- List result = new List(p23.Count);
+ List result = new List(p31.Count);
int i = 0;
- int len = p23.Count;
+ int len = p31.Count;
while (i < len)
{
- TaskPosition item = p23[i];
+ TaskPosition item = p31[i];
result.Add(item == null ? null : new TaskPositionSDto()
{
PositionId = item.PositionId,
@@ -389,20 +537,72 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain7(List p26, List p27)
+ private static List funcMain11(List p32)
{
- if (p26 == null)
+ if (p32 == null)
{
return null;
}
- List result = new List(p26.Count);
+ List result = new List(p32.Count);
int i = 0;
- int len = p26.Count;
+ int len = p32.Count;
while (i < len)
{
- TaskShift item = p26[i];
+ TaskDay item = p32[i];
+ result.Add(item == null ? null : new TaskDaySDto()
+ {
+ DayOfWeek = item.DayOfWeek,
+ TaskId = item.TaskId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain12(List p33)
+ {
+ if (p33 == null)
+ {
+ return null;
+ }
+ List result = new List(p33.Count);
+
+ int i = 0;
+ int len = p33.Count;
+
+ while (i < len)
+ {
+ TaskRoutine item = p33[i];
+ result.Add(item == null ? null : new TaskRoutineSDto()
+ {
+ TaskId = item.TaskId,
+ RoutineId = item.RoutineId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain13(List p36, List p37)
+ {
+ if (p36 == null)
+ {
+ return null;
+ }
+ List result = new List(p36.Count);
+
+ int i = 0;
+ int len = p36.Count;
+
+ while (i < len)
+ {
+ TaskShift item = p36[i];
result.Add(item == null ? null : new TaskShiftSDto()
{
ShiftId = item.ShiftId,
@@ -414,20 +614,20 @@ namespace Brizco.Domain.Mappers
}
- private static List funcMain8(List p28, List p29)
+ private static List funcMain14(List p38, List p39)
{
- if (p28 == null)
+ if (p38 == null)
{
return null;
}
- List result = new List(p28.Count);
+ List result = new List(p38.Count);
int i = 0;
- int len = p28.Count;
+ int len = p38.Count;
while (i < len)
{
- TaskPosition item = p28[i];
+ TaskPosition item = p38[i];
result.Add(item == null ? null : new TaskPositionSDto()
{
PositionId = item.PositionId,
@@ -439,5 +639,57 @@ namespace Brizco.Domain.Mappers
return result;
}
+
+ private static List funcMain15(List p40, List p41)
+ {
+ if (p40 == null)
+ {
+ return null;
+ }
+ List result = new List(p40.Count);
+
+ int i = 0;
+ int len = p40.Count;
+
+ while (i < len)
+ {
+ TaskDay item = p40[i];
+ result.Add(item == null ? null : new TaskDaySDto()
+ {
+ DayOfWeek = item.DayOfWeek,
+ TaskId = item.TaskId,
+ Id = item.Id
+ });
+ i++;
+ }
+ return result;
+
+ }
+
+ private static List funcMain16(List p42, List