add offdays for cws
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
using Microsoft.EntityFrameworkCore.Design.Internal;
|
||||
@@ -13,7 +15,7 @@ public class BaseCustomizeEntity : EntityBase
|
||||
public BaseCustomizeEntity(FridayPay fridayPay, OverTimePay overTimePay,
|
||||
BaseYearsPay baseYearsPay, BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||
FridayWork fridayWork, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays)
|
||||
FridayWork fridayWork, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays,List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
|
||||
FridayPay = fridayPay;
|
||||
@@ -33,6 +35,7 @@ public class BaseCustomizeEntity : EntityBase
|
||||
HolidayWork = holidayWork;
|
||||
BreakTime = breakTime;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
WeeklyOffDays = weeklyOffDays.Select(x=> new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -117,4 +120,18 @@ public class BaseCustomizeEntity : EntityBase
|
||||
|
||||
|
||||
public BreakTime BreakTime { get; protected set; }
|
||||
|
||||
public List<WeeklyOffDay> WeeklyOffDays { get; set; }
|
||||
}
|
||||
|
||||
public class WeeklyOffDay
|
||||
{
|
||||
public WeeklyOffDay(DayOfWeek dayOfWeek)
|
||||
{
|
||||
DayOfWeek = dayOfWeek;
|
||||
}
|
||||
|
||||
public long Id { get; set; }
|
||||
public DayOfWeek DayOfWeek { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
@@ -28,11 +28,12 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
long workshopId, double salary, long customizeWorkshopGroupSettingId,
|
||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> customizeWorkshopEmployeeSettingsShifts,
|
||||
FridayWork fridayWork,
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts
|
||||
, List<WeeklyOffDay> weeklyOffDays) :
|
||||
base(fridayPay, overTimePay,
|
||||
baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays,weeklyOffDays)
|
||||
{
|
||||
CustomizeWorkshopGroupSettingId = customizeWorkshopGroupSettingId;
|
||||
IsSettingChanged = false;
|
||||
|
||||
@@ -28,10 +28,11 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork,
|
||||
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
||||
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays,
|
||||
ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays) :
|
||||
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays,weeklyOffDays)
|
||||
{
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
@@ -298,13 +299,14 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
IrregularShift irregularShift = new(IrregularShift.StartTime, IrregularShift.EndTime,
|
||||
IrregularShift.WorkshopIrregularShifts);
|
||||
BreakTime breakTime = new(BreakTime.HasBreakTimeValue, BreakTime.BreakTimeValue);
|
||||
List<WeeklyOffDay> weeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||
|
||||
var rotatingShift = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList();
|
||||
|
||||
var customizeWorkshopEmployeeSettings = new CustomizeWorkshopEmployeeSettings(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, employeeId, workshopId, Salary, id, shifts, FridayWork, HolidayWork, irregularShift,
|
||||
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift);
|
||||
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift, weeklyOffDays);
|
||||
|
||||
CustomizeWorkshopEmployeeSettingsCollection.Add(customizeWorkshopEmployeeSettings);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
|
||||
public CustomizeWorkshopSettings(long workshopId,
|
||||
ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts, int leavePermittedDays,
|
||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork, List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
FridayPay = new FridayPay(FridayPayType.None, 0);
|
||||
OverTimePay = new OverTimePay(OverTimePayType.None, 0);
|
||||
@@ -42,7 +42,7 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
HolidayWork = holidayWork;
|
||||
BonusesPaysInEndOfMonth = BonusesPaysInEndOfYear.EndOfYear;
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
|
||||
WeeklyOffDays = weeklyOffDays;
|
||||
if (workshopShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using System;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
@@ -30,6 +31,8 @@ public class CreateCustomizeWorkshopSettings
|
||||
/// </summary>
|
||||
public HolidayWork HolidayWork { get; set; }
|
||||
|
||||
public List<DayOfWeek> OffDays { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
@@ -153,8 +154,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
|
||||
}
|
||||
|
||||
var offDays = command.OffDays.Select(x => new WeeklyOffDay(x)).ToList();
|
||||
|
||||
var record = new CustomizeWorkshopSettings(workshopId, shiftCollection, command.LeavePermittedDays,
|
||||
command.WorkshopShiftStatus, command.FridayWork, command.HolidayWork);
|
||||
command.WorkshopShiftStatus, command.FridayWork, command.HolidayWork, offDays);
|
||||
using (var transaction = new TransactionScope())
|
||||
{
|
||||
|
||||
@@ -344,7 +347,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
workshopSettings.BaseYearsPay, workshopSettings.BonusesPay, workshopSettings.NightWorkPay, workshopSettings.MarriedAllowance,
|
||||
workshopSettings.ShiftPay, workshopSettings.FamilyAllowance, workshopSettings.LeavePay, workshopSettings.InsuranceDeduction, workshopSettings.FineAbsenceDeduction,
|
||||
workshopSettings.LateToWork, workshopSettings.EarlyExit, command.FridayWork,
|
||||
command.HolidayWork, breakTime, command.WorkshopShiftStatus, command.IrregularShift, command.LeavePermittedDays, customizeRotatingShifts);
|
||||
command.HolidayWork, breakTime, command.WorkshopShiftStatus, command.IrregularShift, command.LeavePermittedDays, customizeRotatingShifts,workshopSettings.WeeklyOffDays);
|
||||
|
||||
_customizeWorkshopGroupSettingsRepository.Create(entity);
|
||||
|
||||
@@ -553,7 +556,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
customizeWorkshopGroupSettings.BaseYearsPay, customizeWorkshopGroupSettings.BonusesPay, customizeWorkshopGroupSettings.NightWorkPay, customizeWorkshopGroupSettings.MarriedAllowance,
|
||||
customizeWorkshopGroupSettings.ShiftPay, customizeWorkshopGroupSettings.FamilyAllowance, customizeWorkshopGroupSettings.LeavePay, customizeWorkshopGroupSettings.InsuranceDeduction, customizeWorkshopGroupSettings.FineAbsenceDeduction,
|
||||
customizeWorkshopGroupSettings.LateToWork, customizeWorkshopGroupSettings.EarlyExit, command.EmployeeIds.First(), command.WorkshopId, customizeWorkshopGroupSettings.Salary, command.GroupId,
|
||||
shiftCollection, command.FridayWork, command.HolidayWork, command.IrregularShift, command.WorkshopShiftStatus, breakTime, command.LeavePermittedDays, rotatingShift);
|
||||
shiftCollection, command.FridayWork, command.HolidayWork, command.IrregularShift, command.WorkshopShiftStatus, breakTime, command.LeavePermittedDays, rotatingShift,customizeWorkshopGroupSettings.WeeklyOffDays);
|
||||
|
||||
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
||||
|
||||
@@ -1194,7 +1197,8 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
groupData.WorkshopShiftStatus,
|
||||
new(groupData.BreakTime.HasBreakTimeValue, groupData.BreakTime.BreakTimeValue),
|
||||
command.LeavePermittedDays,
|
||||
groupData.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList()
|
||||
groupData.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList(),
|
||||
groupData.WeeklyOffDays
|
||||
);
|
||||
|
||||
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
||||
|
||||
@@ -228,7 +228,14 @@ public class CustomizeWorkshopEmployeeSettingsMapping : IEntityTypeConfiguration
|
||||
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||
{
|
||||
offDay.HasKey(x => x.Id);
|
||||
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,14 @@ public class CustomizeWorkshopGroupSettingsMapping : IEntityTypeConfiguration<Cu
|
||||
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||
{
|
||||
offDay.HasKey(x => x.Id);
|
||||
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
|
||||
|
||||
builder.HasOne(x => x.CustomizeWorkshopSettings).WithMany(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
|
||||
@@ -221,6 +221,12 @@ public class CustomizeWorkshopSettingsMapping:IEntityTypeConfiguration<Customize
|
||||
|
||||
|
||||
});
|
||||
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||
{
|
||||
offDay.HasKey(x => x.Id);
|
||||
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||
});
|
||||
|
||||
|
||||
builder.HasMany(x => x.CustomizeWorkshopGroupSettingsCollection).WithOne(x => x.CustomizeWorkshopSettings)
|
||||
|
||||
9744
CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.Designer.cs
generated
Normal file
9744
CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addoffDaystocws : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "EndDate",
|
||||
table: "InsuranceJobItems",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "StartDate",
|
||||
table: "InsuranceJobItems",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CheckoutLoanInstallment",
|
||||
columns: table => new
|
||||
{
|
||||
Checkoutid = table.Column<long>(type: "bigint", nullable: false),
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
AmountForMonth = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
|
||||
Month = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
||||
Year = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true),
|
||||
LoanRemaining = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
|
||||
IsActive = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
|
||||
LoanAmount = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
|
||||
EntityId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CheckoutLoanInstallment", x => new { x.Checkoutid, x.Id });
|
||||
table.ForeignKey(
|
||||
name: "FK_CheckoutLoanInstallment_Checkouts_Checkoutid",
|
||||
column: x => x.Checkoutid,
|
||||
principalTable: "Checkouts",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CheckoutSalaryAid",
|
||||
columns: table => new
|
||||
{
|
||||
Checkoutid = table.Column<long>(type: "bigint", nullable: false),
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Amount = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: true),
|
||||
SalaryAidDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
SalaryAidDateTimeFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true),
|
||||
CalculationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CalculationDateTimeFa = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: true),
|
||||
EntityId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CheckoutSalaryAid", x => new { x.Checkoutid, x.Id });
|
||||
table.ForeignKey(
|
||||
name: "FK_CheckoutSalaryAid_Checkouts_Checkoutid",
|
||||
column: x => x.Checkoutid,
|
||||
principalTable: "Checkouts",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_CustomizeWorkshopEmployeeSettings_ParentId",
|
||||
column: x => x.ParentId,
|
||||
principalTable: "CustomizeWorkshopEmployeeSettings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CustomizeWorkshopGroupSettings_WeeklyOffDays",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CustomizeWorkshopGroupSettings_WeeklyOffDays", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CustomizeWorkshopGroupSettings_WeeklyOffDays_CustomizeWorkshopGroupSettings_ParentId",
|
||||
column: x => x.ParentId,
|
||||
principalTable: "CustomizeWorkshopGroupSettings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CustomizeWorkshopSettings_WeeklyOffDays",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CustomizeWorkshopSettings_WeeklyOffDays", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CustomizeWorkshopSettings_WeeklyOffDays_CustomizeWorkshopSettings_ParentId",
|
||||
column: x => x.ParentId,
|
||||
principalTable: "CustomizeWorkshopSettings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_ParentId",
|
||||
table: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays",
|
||||
column: "ParentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CustomizeWorkshopGroupSettings_WeeklyOffDays_ParentId",
|
||||
table: "CustomizeWorkshopGroupSettings_WeeklyOffDays",
|
||||
column: "ParentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CustomizeWorkshopSettings_WeeklyOffDays_ParentId",
|
||||
table: "CustomizeWorkshopSettings_WeeklyOffDays",
|
||||
column: "ParentId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CheckoutLoanInstallment");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CheckoutSalaryAid");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CustomizeWorkshopGroupSettings_WeeklyOffDays");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CustomizeWorkshopSettings_WeeklyOffDays");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EndDate",
|
||||
table: "InsuranceJobItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "StartDate",
|
||||
table: "InsuranceJobItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7433,6 +7433,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasForeignKey("CustomizeWorkshopEmployeeSettingsid");
|
||||
});
|
||||
|
||||
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||
{
|
||||
b1.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||
|
||||
b1.Property<string>("DayOfWeek")
|
||||
.IsRequired()
|
||||
.HasMaxLength(15)
|
||||
.HasColumnType("nvarchar(15)");
|
||||
|
||||
b1.Property<long>("ParentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.HasKey("Id");
|
||||
|
||||
b1.HasIndex("ParentId");
|
||||
|
||||
b1.ToTable("CustomizeWorkshopEmployeeSettings_WeeklyOffDays");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ParentId");
|
||||
});
|
||||
|
||||
b.Navigation("BaseYearsPay");
|
||||
|
||||
b.Navigation("BonusesPay");
|
||||
@@ -7468,6 +7494,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("OverTimePay");
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b =>
|
||||
@@ -7991,6 +8019,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasForeignKey("CustomizeWorkshopGroupSettingsid");
|
||||
});
|
||||
|
||||
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||
{
|
||||
b1.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||
|
||||
b1.Property<string>("DayOfWeek")
|
||||
.IsRequired()
|
||||
.HasMaxLength(15)
|
||||
.HasColumnType("nvarchar(15)");
|
||||
|
||||
b1.Property<long>("ParentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.HasKey("Id");
|
||||
|
||||
b1.HasIndex("ParentId");
|
||||
|
||||
b1.ToTable("CustomizeWorkshopGroupSettings_WeeklyOffDays");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ParentId");
|
||||
});
|
||||
|
||||
b.Navigation("BaseYearsPay");
|
||||
|
||||
b.Navigation("BonusesPay");
|
||||
@@ -8026,6 +8080,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("OverTimePay");
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b =>
|
||||
@@ -8476,6 +8532,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasForeignKey("CustomizeWorkshopSettingsid");
|
||||
});
|
||||
|
||||
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||
{
|
||||
b1.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||
|
||||
b1.Property<string>("DayOfWeek")
|
||||
.IsRequired()
|
||||
.HasMaxLength(15)
|
||||
.HasColumnType("nvarchar(15)");
|
||||
|
||||
b1.Property<long>("ParentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.HasKey("Id");
|
||||
|
||||
b1.HasIndex("ParentId");
|
||||
|
||||
b1.ToTable("CustomizeWorkshopSettings_WeeklyOffDays");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ParentId");
|
||||
});
|
||||
|
||||
b.Navigation("BaseYearsPay");
|
||||
|
||||
b.Navigation("BonusesPay");
|
||||
@@ -8504,6 +8586,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
|
||||
b.Navigation("Workshop");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user