|
@@ -1,19 +1,22 @@
|
|
|
// <auto-generated />
|
|
|
using System;
|
|
|
-using MTWorkHR.Identity.DBContext;
|
|
|
+using MTWorkHR.Infrastructure.DBContext;
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
+using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
-namespace MTWorkHR.Identity.Migrations
|
|
|
+namespace MTWorkHR.Infrastructure.Migrations
|
|
|
{
|
|
|
- [DbContext(typeof(HRIdentityDBContext))]
|
|
|
- partial class HRIdentityDBContextModelSnapshot : ModelSnapshot
|
|
|
+ [DbContext(typeof(HRDataContext))]
|
|
|
+ [Migration("20240303141711_updateHistory")]
|
|
|
+ partial class updateHistory
|
|
|
{
|
|
|
- protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
+ /// <inheritdoc />
|
|
|
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
|
{
|
|
|
#pragma warning disable 612, 618
|
|
|
modelBuilder
|
|
@@ -37,6 +40,64 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
b.ToTable("ApplicationRoleApplicationUser");
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.AuthLog", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Channel")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorCode")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorDescription")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("InnerException")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Input")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Method")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("QueryString")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServerIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServiceResponseTimeInSeconds")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("UserIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("userAgent")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("AuthLogs");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Base.AttachmentType", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
@@ -46,9 +107,562 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
|
|
- b.Property<bool>("IsRequired")
|
|
|
+ b.Property<bool>("IsRequired")
|
|
|
+ .HasColumnType("bit");
|
|
|
+
|
|
|
+ b.Property<string>("NameAr")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<string>("NameEn")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("AttachmentTypes");
|
|
|
+
|
|
|
+ b.HasData(
|
|
|
+ new
|
|
|
+ {
|
|
|
+ Id = 1L,
|
|
|
+ IsRequired = false,
|
|
|
+ NameAr = "السيرة الذاتية",
|
|
|
+ NameEn = "CV"
|
|
|
+ },
|
|
|
+ new
|
|
|
+ {
|
|
|
+ Id = 2L,
|
|
|
+ IsRequired = false,
|
|
|
+ NameAr = "الهوية",
|
|
|
+ NameEn = "Identification"
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("CRNumber")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("CompanyName")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(3);
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(1);
|
|
|
+
|
|
|
+ b.Property<bool>("IsDeleted")
|
|
|
+ .HasColumnType("bit");
|
|
|
+
|
|
|
+ b.Property<int>("TaxNumber")
|
|
|
+ .HasColumnType("int");
|
|
|
+
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(4);
|
|
|
+
|
|
|
+ b.Property<string>("UpdateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(2);
|
|
|
+
|
|
|
+ b.Property<long>("UserId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("Companies");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Channel")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorCode")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorDescription")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("InnerException")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Input")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Method")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("QueryString")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServerIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServiceResponseTimeInSeconds")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("UserIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("userAgent")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("FileLogs");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("CategoryName")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(150)
|
|
|
+ .HasColumnType("nvarchar(150)");
|
|
|
+
|
|
|
+ b.Property<string>("Desc")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<string>("Name")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<bool>("Show")
|
|
|
+ .HasColumnType("bit");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("Permissions");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("NameAr")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<string>("NameEn")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("Projects");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Channel")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorCode")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorDescription")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("InnerException")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Input")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Method")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("QueryString")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServerIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServiceResponseTimeInSeconds")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("UserIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("userAgent")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("RoleLogs");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Channel")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorCode")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorDescription")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("InnerException")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Input")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Method")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("QueryString")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServerIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServiceResponseTimeInSeconds")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("UserIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("userAgent")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("SettingLogs");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Channel")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorCode")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ErrorDescription")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("InnerException")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Input")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("Method")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("QueryString")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServerIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ServiceResponseTimeInSeconds")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("UserIP")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("userAgent")
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.ToTable("UserLogs");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<long>("AssignedUserId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(3);
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(1);
|
|
|
+
|
|
|
+ b.Property<string>("DeleteUserId")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(8);
|
|
|
+
|
|
|
+ b.Property<string>("Description")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("DueDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
+ b.Property<bool>("IsDeleted")
|
|
|
+ .HasColumnType("bit")
|
|
|
+ .HasColumnOrder(7);
|
|
|
+
|
|
|
+ b.Property<int>("Priority")
|
|
|
+ .HasColumnType("int");
|
|
|
+
|
|
|
+ b.Property<long>("ProjectId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<long>("StatusId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<string>("Title")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(4);
|
|
|
+
|
|
|
+ b.Property<string>("UpdateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(2);
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.HasIndex("ProjectId");
|
|
|
+
|
|
|
+ b.HasIndex("StatusId");
|
|
|
+
|
|
|
+ b.ToTable("UserTasks");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<long>("AttachmentTypeId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(3);
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(1);
|
|
|
+
|
|
|
+ b.Property<string>("FileName")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<string>("OriginalName")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<long>("TaskId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(4);
|
|
|
+
|
|
|
+ b.Property<string>("UpdateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(2);
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.HasIndex("AttachmentTypeId");
|
|
|
+
|
|
|
+ b.HasIndex("TaskId");
|
|
|
+
|
|
|
+ b.ToTable("UserTaskAttachments");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<long>("AssignedToUserId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<string>("Comment")
|
|
|
+ .IsRequired()
|
|
|
+ .HasMaxLength(500)
|
|
|
+ .HasColumnType("nvarchar(500)");
|
|
|
+
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(3);
|
|
|
+
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(1);
|
|
|
+
|
|
|
+ b.Property<long>("CurrentStatusId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<bool>("IsDeleted")
|
|
|
.HasColumnType("bit");
|
|
|
|
|
|
+ b.Property<long>("TaskId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
+ .HasColumnType("datetime2")
|
|
|
+ .HasColumnOrder(4);
|
|
|
+
|
|
|
+ b.Property<string>("UpdateUser")
|
|
|
+ .HasMaxLength(450)
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
+ .HasColumnOrder(2);
|
|
|
+
|
|
|
+ b.Property<long?>("UserTaskId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
+ b.HasKey("Id");
|
|
|
+
|
|
|
+ b.HasIndex("CurrentStatusId");
|
|
|
+
|
|
|
+ b.HasIndex("UserTaskId");
|
|
|
+
|
|
|
+ b.ToTable("UserTaskHistories");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
b.Property<string>("NameAr")
|
|
|
.IsRequired()
|
|
|
.HasMaxLength(250)
|
|
@@ -61,26 +675,10 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("AttachmentTypes");
|
|
|
-
|
|
|
- b.HasData(
|
|
|
- new
|
|
|
- {
|
|
|
- Id = 1L,
|
|
|
- IsRequired = false,
|
|
|
- NameAr = "السيرة الذاتية",
|
|
|
- NameEn = "CV"
|
|
|
- },
|
|
|
- new
|
|
|
- {
|
|
|
- Id = 2L,
|
|
|
- IsRequired = false,
|
|
|
- NameAr = "الهوية",
|
|
|
- NameEn = "Identification"
|
|
|
- });
|
|
|
+ b.ToTable("UserTaskStatuses");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.ApplicationRole", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
|
|
|
{
|
|
|
b.Property<string>("Id")
|
|
|
.HasColumnType("nvarchar(450)");
|
|
@@ -148,7 +746,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.ApplicationUser", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
|
|
|
{
|
|
|
b.Property<string>("Id")
|
|
|
.HasColumnType("nvarchar(450)");
|
|
@@ -320,39 +918,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.Permission", b =>
|
|
|
- {
|
|
|
- b.Property<long>("Id")
|
|
|
- .ValueGeneratedOnAdd()
|
|
|
- .HasColumnType("bigint")
|
|
|
- .HasColumnOrder(0);
|
|
|
-
|
|
|
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
-
|
|
|
- b.Property<string>("CategoryName")
|
|
|
- .IsRequired()
|
|
|
- .HasMaxLength(150)
|
|
|
- .HasColumnType("nvarchar(150)");
|
|
|
-
|
|
|
- b.Property<string>("Desc")
|
|
|
- .IsRequired()
|
|
|
- .HasMaxLength(250)
|
|
|
- .HasColumnType("nvarchar(250)");
|
|
|
-
|
|
|
- b.Property<string>("Name")
|
|
|
- .IsRequired()
|
|
|
- .HasMaxLength(250)
|
|
|
- .HasColumnType("nvarchar(250)");
|
|
|
-
|
|
|
- b.Property<bool>("Show")
|
|
|
- .HasColumnType("bit");
|
|
|
-
|
|
|
- b.HasKey("Id");
|
|
|
-
|
|
|
- b.ToTable("Permissions");
|
|
|
- });
|
|
|
-
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.RolePermission", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
|
.ValueGeneratedOnAdd()
|
|
@@ -381,7 +947,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
b.ToTable("RolePermissions");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.UserAddress", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
|
.ValueGeneratedOnAdd()
|
|
@@ -435,7 +1001,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
b.ToTable("UserAddress");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.UserAttachment", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
|
.ValueGeneratedOnAdd()
|
|
@@ -608,37 +1174,90 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationRole", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UserRolesId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UsersId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.ApplicationUser", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
|
|
|
+ .WithMany()
|
|
|
+ .HasForeignKey("ProjectId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
|
|
|
+ .WithMany()
|
|
|
+ .HasForeignKey("StatusId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.Navigation("Project");
|
|
|
+
|
|
|
+ b.Navigation("TaskStatus");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
|
|
|
+ .WithMany()
|
|
|
+ .HasForeignKey("AttachmentTypeId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
|
|
|
+ .WithMany("TaskAttachments")
|
|
|
+ .HasForeignKey("TaskId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.Navigation("AttachmentType");
|
|
|
+
|
|
|
+ b.Navigation("UserTask");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
|
|
|
+ .WithMany()
|
|
|
+ .HasForeignKey("CurrentStatusId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.UserTask", null)
|
|
|
+ .WithMany("UserTaskHistories")
|
|
|
+ .HasForeignKey("UserTaskId");
|
|
|
+
|
|
|
+ b.Navigation("TaskStatus");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", "Manager")
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "Manager")
|
|
|
.WithMany()
|
|
|
.HasForeignKey("ManagerId");
|
|
|
|
|
|
b.Navigation("Manager");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.RolePermission", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.Permission", "Permission")
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.Permission", "Permission")
|
|
|
.WithMany()
|
|
|
.HasForeignKey("PermissionId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationRole", "Role")
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", "Role")
|
|
|
.WithMany("RolePermissions")
|
|
|
.HasForeignKey("RoleId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -649,18 +1268,18 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
b.Navigation("Role");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.UserAddress", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", "User")
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
|
|
|
.WithOne("UserAddress")
|
|
|
- .HasForeignKey("MTWorkHR.Identity.Entities.UserAddress", "UserId")
|
|
|
+ .HasForeignKey("MTWorkHR.Infrastructure.Entities.UserAddress", "UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
b.Navigation("User");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.UserAttachment", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
|
|
|
{
|
|
|
b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
|
|
|
.WithMany()
|
|
@@ -668,7 +1287,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", "User")
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
|
|
|
.WithMany("UserAttachments")
|
|
|
.HasForeignKey("UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -681,7 +1300,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationRole", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("RoleId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -690,7 +1309,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -699,7 +1318,7 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -708,13 +1327,13 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationRole", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("RoleId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
@@ -723,19 +1342,26 @@ namespace MTWorkHR.Identity.Migrations
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Identity.Entities.ApplicationUser", null)
|
|
|
+ b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
|
|
|
.WithMany()
|
|
|
.HasForeignKey("UserId")
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.ApplicationRole", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("TaskAttachments");
|
|
|
+
|
|
|
+ b.Navigation("UserTaskHistories");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
|
|
|
{
|
|
|
b.Navigation("RolePermissions");
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Identity.Entities.ApplicationUser", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
|
|
|
{
|
|
|
b.Navigation("UserAddress")
|
|
|
.IsRequired();
|