Classification tables Mapping
This commit is contained in:
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace _0_Framework.Application.Enums;
|
||||
|
||||
public enum TypeOfCoefficient
|
||||
{
|
||||
/// <summary>
|
||||
/// ضریب ریالی طرح
|
||||
/// </summary>
|
||||
RialCoefficient,
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی اداره کار
|
||||
/// </summary>
|
||||
JobOrganization,
|
||||
}
|
||||
@@ -63,6 +63,7 @@ public class ClassificationEmployee : EntityBase
|
||||
/// </summary>
|
||||
public DateTime? EndGroupDate { get; private set; }
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش پرسنل طرح
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _0_Framework.Domain;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
@@ -31,4 +32,12 @@ public class ClassificationGroup : EntityBase
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long ClassificationSchemeId { get; private set; }
|
||||
|
||||
public ClassificationScheme ClassificationScheme { get; set; }
|
||||
|
||||
|
||||
public List<ClassificationGroupJob> ClassificationGroupJobs { get; set; }
|
||||
public List<ClassificationGroupSalary> ClassificationGroupSalaries { get; set; }
|
||||
|
||||
public List<ClassificationEmployee> ClassificationEmployees { get; set; }
|
||||
}
|
||||
@@ -29,6 +29,11 @@ public class ClassificationGroupJob : EntityBaseWithoutCreationDate
|
||||
/// نام شغل
|
||||
/// </summary>
|
||||
public string JobName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد شغل
|
||||
/// </summary>
|
||||
public string JobCode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
@@ -41,4 +46,7 @@ public class ClassificationGroupJob : EntityBaseWithoutCreationDate
|
||||
public string GroupNo { get; private set; }
|
||||
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -56,6 +56,9 @@ public class ClassificationGroupSalary : EntityBase
|
||||
/// </summary>
|
||||
public int Year { get; private set; }
|
||||
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش دستمزد گروه
|
||||
/// </summary>
|
||||
|
||||
@@ -45,6 +45,9 @@ public class ClassificationRialCoefficient : EntityBaseWithoutCreationDate
|
||||
/// </summary>
|
||||
public int Year { get; private set; }
|
||||
|
||||
|
||||
public ClassificationScheme ClassificationScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش ضریب ریالی
|
||||
/// </summary>
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application.Enums;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public class ClassificationScheme : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
///ایجاد طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
/// <param name="includingDateGr"></param>
|
||||
/// <param name="executionDateGr"></param>
|
||||
/// <param name="designerFullName"></param>
|
||||
/// <param name="designerPhone"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
public ClassificationScheme(DateTime includingDateGr, DateTime executionDateGr, string designerFullName, string designerPhone, long workshopId, string typeOfCoefficient)
|
||||
/// <summary>
|
||||
/// ایجاد طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
/// <param name="includingDateGr"></param>
|
||||
/// <param name="executionDateGr"></param>
|
||||
/// <param name="designerFullName"></param>
|
||||
/// <param name="designerPhone"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="typeOfCoefficient"></param>
|
||||
public ClassificationScheme(DateTime includingDateGr, DateTime executionDateGr, string designerFullName, string designerPhone, long workshopId, TypeOfCoefficient typeOfCoefficient)
|
||||
{
|
||||
IncludingDateGr = includingDateGr;
|
||||
ExecutionDateGr = executionDateGr;
|
||||
@@ -58,7 +61,12 @@ public class ClassificationScheme : EntityBase
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public string TypeOfCoefficient { get; private set; }
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; private set; }
|
||||
|
||||
|
||||
public List<ClassificationGroup> ClassificationGroups { get; set; }
|
||||
|
||||
public List<ClassificationRialCoefficient> ClassificationRialCoefficients { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
|
||||
@@ -6,6 +6,7 @@ using Company.Domain.Board;
|
||||
using Company.Domain.BoardType;
|
||||
using Company.Domain.ChapterAgg;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Company.Domain.ClassifiedSalaryAgg;
|
||||
using Company.Domain.ClientEmployeeWorkshopAgg;
|
||||
using Company.Domain.Contact2Agg;
|
||||
@@ -211,6 +212,42 @@ public class CompanyContext : DbContext
|
||||
|
||||
public DbSet<PlanPercentage> PlanPercentages { get; set; }
|
||||
|
||||
#region ClassificationScheme
|
||||
|
||||
/// <summary>
|
||||
/// جدول طرح طبقه بندی
|
||||
/// </summary>
|
||||
public DbSet<ClassificationScheme> ClassificationSchemes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول گروه های طرح
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroup> ClassificationGroups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول ضرایب ریالی
|
||||
/// </summary>
|
||||
public DbSet<ClassificationRialCoefficient> ClassificationRialCoefficients { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جدول شغل های گروه
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroupJob> ClassificationGroupJobs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول مزد شغل گروه ها
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroupSalary> ClassificationGroupSalaries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول پرسنل طرح
|
||||
/// </summary>
|
||||
public DbSet<ClassificationEmployee> ClassificationEmployees { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region TemporaryClientRegisteration
|
||||
|
||||
public DbSet<ContractingPartyTemp> ContractingPartyTemps { get; set; }
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationEmployeeMapping : IEntityTypeConfiguration<ClassificationEmployee>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationEmployee> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationEmployee");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.StartGroupDate).IsRequired(false);
|
||||
builder.Property(x => x.EndGroupDate).IsRequired(false);
|
||||
|
||||
|
||||
builder.HasOne(x => x.ClassificationGroup)
|
||||
.WithMany(x => x.ClassificationEmployees)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupJobMapping : IEntityTypeConfiguration<ClassificationGroupJob>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroupJob> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationGroupJobs");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.JobName).HasMaxLength(255);
|
||||
builder.Property(x => x.JobCode).HasMaxLength(100);
|
||||
builder.Property(x => x.GroupNo).HasMaxLength(2);
|
||||
|
||||
builder.HasOne(x => x.ClassificationGroup)
|
||||
.WithMany(x => x.ClassificationGroupJobs)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupMapping : IEntityTypeConfiguration<ClassificationGroup>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroup> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationGroups");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.GroupNo).HasMaxLength(2);
|
||||
|
||||
builder.HasOne(x => x.ClassificationScheme)
|
||||
.WithMany(x => x.ClassificationGroups)
|
||||
.HasForeignKey(x => x.ClassificationSchemeId);
|
||||
|
||||
|
||||
builder.HasMany(x => x.ClassificationGroupJobs)
|
||||
.WithOne(x => x.ClassificationGroup)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
|
||||
|
||||
builder.HasMany(x => x.ClassificationEmployees)
|
||||
.WithOne(x => x.ClassificationGroup)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
|
||||
|
||||
builder.HasMany(x => x.ClassificationGroupSalaries)
|
||||
.WithOne(x => x.ClassificationGroup)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupSalaryMapping : IEntityTypeConfiguration<ClassificationGroupSalary>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroupSalary> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationGroupSalaries");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.GroupNo).HasMaxLength(2);
|
||||
|
||||
builder.HasOne(x => x.ClassificationGroup)
|
||||
.WithMany(x => x.ClassificationGroupSalaries)
|
||||
.HasForeignKey(x => x.ClassificationGroupId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationRialCoefficientMapping : IEntityTypeConfiguration<ClassificationRialCoefficient>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationRialCoefficient> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationRialCoefficients");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.HasOne(x => x.ClassificationScheme)
|
||||
.WithMany(x => x.ClassificationRialCoefficients)
|
||||
.HasForeignKey(x => x.ClassificationSchemeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using _0_Framework.Application.Enums;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationSchemeMapping : IEntityTypeConfiguration<ClassificationScheme>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationScheme> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationSchemes");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
|
||||
builder.Property(x => x.IncludingDateGr);
|
||||
builder.Property(x => x.ExecutionDateGr);
|
||||
builder.Property(x => x.EndSchemeDateGr).IsRequired(false);
|
||||
builder.Property(x => x.DesignerFullName).HasMaxLength(50);
|
||||
builder.Property(x => x.DesignerPhone).HasMaxLength(20);
|
||||
builder.Property(x => x.WorkshopId);
|
||||
builder.Property(x => x.WorkshopId);
|
||||
builder.Property(x => x.TypeOfCoefficient).HasConversion(
|
||||
v => v.ToString(),
|
||||
v => (TypeOfCoefficient)Enum.Parse(typeof(TypeOfCoefficient), v)).HasMaxLength(30);
|
||||
|
||||
|
||||
builder.HasMany(x => x.ClassificationGroups)
|
||||
.WithOne(x => x.ClassificationScheme)
|
||||
.HasForeignKey(x => x.ClassificationSchemeId);
|
||||
|
||||
builder.HasMany(x => x.ClassificationRialCoefficients)
|
||||
.WithOne(x => x.ClassificationScheme)
|
||||
.HasForeignKey(x => x.ClassificationSchemeId);
|
||||
|
||||
}
|
||||
}
|
||||
10496
CompanyManagment.EFCore/Migrations/20250918013449_ClassificationScheme.Designer.cs
generated
Normal file
10496
CompanyManagment.EFCore/Migrations/20250918013449_ClassificationScheme.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,201 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ClassificationScheme : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationSchemes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
IncludingDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ExecutionDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndSchemeDateGr = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DesignerFullName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
DesignerPhone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
TypeOfCoefficient = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationSchemes", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroups",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroups", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroups_ClassificationSchemes_ClassificationSchemeId",
|
||||
column: x => x.ClassificationSchemeId,
|
||||
principalTable: "ClassificationSchemes",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationRialCoefficients",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
RialCoefficient = table.Column<double>(type: "float", nullable: false),
|
||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Year = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationRialCoefficients", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationRialCoefficients_ClassificationSchemes_ClassificationSchemeId",
|
||||
column: x => x.ClassificationSchemeId,
|
||||
principalTable: "ClassificationSchemes",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationEmployee",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationGroupJobId = table.Column<long>(type: "bigint", nullable: false),
|
||||
StartGroupDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EndGroupDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationEmployee", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationEmployee_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroupJobs",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
JobId = table.Column<long>(type: "bigint", nullable: false),
|
||||
JobName = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
|
||||
JobCode = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroupJobs", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroupJobs_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroupSalaries",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
||||
GroupSalary = table.Column<double>(type: "float", nullable: false),
|
||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Year = table.Column<int>(type: "int", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroupSalaries", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroupSalaries_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationEmployee_ClassificationGroupId",
|
||||
table: "ClassificationEmployee",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroupJobs_ClassificationGroupId",
|
||||
table: "ClassificationGroupJobs",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroups_ClassificationSchemeId",
|
||||
table: "ClassificationGroups",
|
||||
column: "ClassificationSchemeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroupSalaries_ClassificationGroupId",
|
||||
table: "ClassificationGroupSalaries",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationRialCoefficients_ClassificationSchemeId",
|
||||
table: "ClassificationRialCoefficients",
|
||||
column: "ClassificationSchemeId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationEmployee");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroupJobs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroupSalaries");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationRialCoefficients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroups");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationSchemes");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -443,6 +443,214 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.ToTable("Checkouts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationEmployee", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ClassificationGroupJobId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime?>("EndGroupDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("StartGroupDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationEmployee", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationSchemeId");
|
||||
|
||||
b.ToTable("ClassificationGroups", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupJob", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<string>("JobCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<long>("JobId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("JobName")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("nvarchar(255)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationGroupJobs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupSalary", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<double>("GroupSalary")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationGroupSalaries", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationRialCoefficient", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("RialCoefficient")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationSchemeId");
|
||||
|
||||
b.ToTable("ClassificationRialCoefficients", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DesignerFullName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DesignerPhone")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<DateTime?>("EndSchemeDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ExecutionDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("IncludingDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TypeOfCoefficient")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("ClassificationSchemes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassifiedSalaryAgg.ClassifiedSalary", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
@@ -6647,6 +6855,61 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("Workshop");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationEmployee", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationEmployees")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", "ClassificationScheme")
|
||||
.WithMany("ClassificationGroups")
|
||||
.HasForeignKey("ClassificationSchemeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationScheme");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupJob", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationGroupJobs")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupSalary", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationGroupSalaries")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationRialCoefficient", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", "ClassificationScheme")
|
||||
.WithMany("ClassificationRialCoefficients")
|
||||
.HasForeignKey("ClassificationSchemeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationScheme");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClientEmployeeWorkshopAgg.ClientEmployeeWorkshop", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
|
||||
@@ -9910,6 +10173,22 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("PetitionsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.Navigation("ClassificationEmployees");
|
||||
|
||||
b.Navigation("ClassificationGroupJobs");
|
||||
|
||||
b.Navigation("ClassificationGroupSalaries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", b =>
|
||||
{
|
||||
b.Navigation("ClassificationGroups");
|
||||
|
||||
b.Navigation("ClassificationRialCoefficients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b =>
|
||||
{
|
||||
b.Navigation("ContractingPartyBankAccounts");
|
||||
|
||||
Reference in New Issue
Block a user