add migration

This commit is contained in:
2025-06-02 22:48:59 +03:30
parent 16d45c6dc4
commit f35aca8e44
4 changed files with 9781 additions and 2 deletions

View File

@@ -1730,7 +1730,7 @@ public class InsuranceListApplication : IInsuranceListApplication
{
var inJob = _insuranceJobItemRepository
.GetInsuranceJobItemByInsuranceJobId((long)workshop.InsuranceJobId);
.GetInsuranceJobItemByInsuranceJobId((long)workshop.InsuranceJobId,year, month);
if (workshop.Population == "MoreThan500")
{
var max = inJob.MaxBy(x => x.PercentageMoreThan);
@@ -2301,7 +2301,7 @@ public class InsuranceListApplication : IInsuranceListApplication
if (string.IsNullOrWhiteSpace(approval.Description))
return op.Failed("لطفا توضیحات را وارد کنید");
if (approval.Description.Length < 15)
if (approval.Description.Length < 15 && approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.VerbalApproval)
return op.Failed("توضیحات باید حداقل 15 کاراکتر باشد");
}
var approvalEntity = new InsuranceListEmployerApproval(approval.ApprovalStatus, approval.Description);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class insuranceoperationlist : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Debt_IsDone",
table: "InsuranceLists",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "EmployerApproval_IsDone",
table: "InsuranceLists",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Inspection_IsDone",
table: "InsuranceLists",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Debt_IsDone",
table: "InsuranceLists");
migrationBuilder.DropColumn(
name: "EmployerApproval_IsDone",
table: "InsuranceLists");
migrationBuilder.DropColumn(
name: "Inspection_IsDone",
table: "InsuranceLists");
}
}
}

View File

@@ -3361,6 +3361,9 @@ namespace CompanyManagment.EFCore.Migrations
b1.Property<DateTime>("DebtDate")
.HasColumnType("datetime2");
b1.Property<bool>("IsDone")
.HasColumnType("bit");
b1.Property<long>("MediaId")
.HasColumnType("bigint");
@@ -3378,6 +3381,9 @@ namespace CompanyManagment.EFCore.Migrations
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b1.Property<bool>("IsDone")
.HasColumnType("bit");
b1.Property<string>("Status")
.IsRequired()
.HasMaxLength(50)
@@ -3388,6 +3394,9 @@ namespace CompanyManagment.EFCore.Migrations
{
b1.IsRequired();
b1.Property<bool>("IsDone")
.HasColumnType("bit");
b1.Property<DateTime>("LastInspectionDateTime")
.HasColumnType("datetime2");