2 Commits 049dc6c65f ... 0b86b67502

Author SHA1 Message Date
  zinab_elgendy 0b86b67502 Contract_FixedPay 2 weeks ago
  zinab_elgendy 9e45f4facc FixedPay fields 2 weeks ago

+ 9 - 0
MTWorkHR.Application/Dtos/Contract/ContractDto.cs

@@ -61,6 +61,15 @@ namespace MTWorkHR.Application.Models
         public string? Currency { get; set; }
         public decimal? Salary{ get; set; }
         public BillingCycle BillingCycle { get; set; }// 2 fortnightly, 4 Monthly
+        //------------------------Fixed Pay----------------
+        public DateTime? FirstPatchDateFrom { get; set; } 
+        public DateTime? FirstPatchDateTo { get; set; } //
+        public decimal? FirstPatchAmount { get; set; }
+
+        public DateTime? LastPatchDateFrom { get; set; } //
+        public DateTime? LastPatchDateTo { get; set; } // 
+        public decimal? LastPatchAmount { get; set; }
+
 
 
         //---------Allowances----------------------

+ 9 - 0
MTWorkHR.Core/Entities/Contract/Contract.cs

@@ -66,6 +66,15 @@ namespace MTWorkHR.Core.Entities
         public List<ContractTask>? ContractTasks { get; set; }
         public List<ProjectStage>? ProjectStages { get; set; }
 
+        //-------------------------------
+        public DateTime? FirstPatchDateFrom { get; set; }
+        public DateTime? FirstPatchDateTo { get; set; } //
+        public decimal? FirstPatchAmount { get; set; }
+
+        public DateTime? LastPatchDateFrom { get; set; } //
+        public DateTime? LastPatchDateTo { get; set; } // 
+        public decimal? LastPatchAmount { get; set; }
+
 
         //  public decimal? GrossAnnualBaseSalary { get; set; }
 

File diff suppressed because it is too large
+ 5719 - 0
MTWorkHR.Infrastructure/Migrations/20241210094124_alteContractfixedPay.Designer.cs


+ 79 - 0
MTWorkHR.Infrastructure/Migrations/20241210094124_alteContractfixedPay.cs

@@ -0,0 +1,79 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace MTWorkHR.Infrastructure.Migrations
+{
+    /// <inheritdoc />
+    public partial class alteContractfixedPay : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<decimal>(
+                name: "FirstPatchAmount",
+                table: "Contracts",
+                type: "decimal(18,2)",
+                nullable: true);
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "FirstPatchDateFrom",
+                table: "Contracts",
+                type: "datetime2",
+                nullable: true);
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "FirstPatchDateTo",
+                table: "Contracts",
+                type: "datetime2",
+                nullable: true);
+
+            migrationBuilder.AddColumn<decimal>(
+                name: "LastPatchAmount",
+                table: "Contracts",
+                type: "decimal(18,2)",
+                nullable: true);
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "LastPatchDateFrom",
+                table: "Contracts",
+                type: "datetime2",
+                nullable: true);
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "LastPatchDateTo",
+                table: "Contracts",
+                type: "datetime2",
+                nullable: true);
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "FirstPatchAmount",
+                table: "Contracts");
+
+            migrationBuilder.DropColumn(
+                name: "FirstPatchDateFrom",
+                table: "Contracts");
+
+            migrationBuilder.DropColumn(
+                name: "FirstPatchDateTo",
+                table: "Contracts");
+
+            migrationBuilder.DropColumn(
+                name: "LastPatchAmount",
+                table: "Contracts");
+
+            migrationBuilder.DropColumn(
+                name: "LastPatchDateFrom",
+                table: "Contracts");
+
+            migrationBuilder.DropColumn(
+                name: "LastPatchDateTo",
+                table: "Contracts");
+        }
+    }
+}

+ 18 - 0
MTWorkHR.Infrastructure/Migrations/HRDataContextModelSnapshot.cs

@@ -594,6 +594,15 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.Property<DateTime?>("EndDate")
                         .HasColumnType("datetime2");
 
+                    b.Property<decimal?>("FirstPatchAmount")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<DateTime?>("FirstPatchDateFrom")
+                        .HasColumnType("datetime2");
+
+                    b.Property<DateTime?>("FirstPatchDateTo")
+                        .HasColumnType("datetime2");
+
                     b.Property<bool>("IncludesAllAllowances")
                         .HasColumnType("bit");
 
@@ -614,6 +623,15 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.Property<string>("JobTitleName")
                         .HasColumnType("nvarchar(max)");
 
+                    b.Property<decimal?>("LastPatchAmount")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<DateTime?>("LastPatchDateFrom")
+                        .HasColumnType("datetime2");
+
+                    b.Property<DateTime?>("LastPatchDateTo")
+                        .HasColumnType("datetime2");
+
                     b.Property<int>("NoticePeriodBeforeTermination")
                         .HasColumnType("int");