Add discount amount and percentage fields to InstitutionContract entity and database schema
This commit is contained in:
@@ -19,7 +19,8 @@ public class InstitutionContract : EntityBase
|
||||
string contractEndFa, double contractAmount, double dailyCompenseation, double obligation,
|
||||
double totalAmount, int extensionNo, string workshopManualCount, string employeeManualCount, string description,
|
||||
string officialCompany, string typeOfcontract, string hasValueAddedTax, double valueAddedTax,
|
||||
List<InstitutionContractWorkshopInitial> workshopDetails, long lawId,int discountPercentage, double discountAmount)
|
||||
List<InstitutionContractWorkshopInitial> workshopDetails, long lawId,
|
||||
int discountPercentage, double discountAmount)
|
||||
{
|
||||
ContractNo = contractNo;
|
||||
RepresentativeId = representativeId;
|
||||
@@ -57,8 +58,12 @@ public class InstitutionContract : EntityBase
|
||||
WorkshopGroup = new InstitutionContractWorkshopGroup(id, workshopDetails);
|
||||
PublicId = Guid.NewGuid();
|
||||
LawId = lawId;
|
||||
DiscountPercentage = discountPercentage;
|
||||
DiscountAmount = discountAmount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public long LawId { get; private set; }
|
||||
|
||||
public string ContractNo { get; private set; }
|
||||
@@ -128,6 +133,10 @@ public class InstitutionContract : EntityBase
|
||||
public DateTime VerifyCodeCreation { get; private set; }
|
||||
public string VerifierFullName { get; private set; }
|
||||
public string VerifierPhoneNumber { get; private set; }
|
||||
|
||||
public double DiscountAmount { get; private set; }
|
||||
|
||||
public int DiscountPercentage { get; private set; }
|
||||
|
||||
[NotMapped] public bool VerifyCodeExpired => VerifyCodeCreation.Add(ExpireTime) <= DateTime.Now;
|
||||
|
||||
|
||||
11347
CompanyManagment.EFCore/Migrations/20251129103132_add discount to institutioncontract.Designer.cs
generated
Normal file
11347
CompanyManagment.EFCore/Migrations/20251129103132_add discount to institutioncontract.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class adddiscounttoinstitutioncontract : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "DiscountAmount",
|
||||
table: "InstitutionContracts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DiscountPercentage",
|
||||
table: "InstitutionContracts",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DiscountAmount",
|
||||
table: "InstitutionContracts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DiscountPercentage",
|
||||
table: "InstitutionContracts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3265,6 +3265,12 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(10000)
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("DiscountAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("DiscountPercentage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("EmployeeManualCount")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
Reference in New Issue
Block a user