|
@@ -311,9 +311,83 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
IsRequired = false,
|
|
IsRequired = false,
|
|
NameAr = "الصورة",
|
|
NameAr = "الصورة",
|
|
NameEn = "Image"
|
|
NameEn = "Image"
|
|
|
|
+ },
|
|
|
|
+ new
|
|
|
|
+ {
|
|
|
|
+ Id = 10L,
|
|
|
|
+ IsRequired = false,
|
|
|
|
+ NameAr = "تكلفة التذكرة",
|
|
|
|
+ NameEn = "Ticket Cost"
|
|
|
|
+ },
|
|
|
|
+ new
|
|
|
|
+ {
|
|
|
|
+ Id = 11L,
|
|
|
|
+ IsRequired = false,
|
|
|
|
+ NameAr = "تكلفة المواصلات",
|
|
|
|
+ NameEn = "Transportation Cost"
|
|
|
|
+ },
|
|
|
|
+ new
|
|
|
|
+ {
|
|
|
|
+ Id = 12L,
|
|
|
|
+ IsRequired = false,
|
|
|
|
+ NameAr = "تكلفة الاقامة",
|
|
|
|
+ NameEn = "Accommodation Cost"
|
|
|
|
+ },
|
|
|
|
+ new
|
|
|
|
+ {
|
|
|
|
+ Id = 13L,
|
|
|
|
+ IsRequired = false,
|
|
|
|
+ NameAr = "اخرى",
|
|
|
|
+ NameEn = "Other"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
|
+ {
|
|
|
|
+ b.Property<long>("Id")
|
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
|
+ .HasColumnType("bigint")
|
|
|
|
+ .HasColumnOrder(0);
|
|
|
|
+
|
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("AccommodationAttachmentId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<decimal?>("AccommodationCost")
|
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("OtherAttachmentId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<decimal?>("OtherCost")
|
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("TicketAttachmentId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<decimal?>("TicketCost")
|
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("TransportationAttachmentId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<decimal?>("TransportationCost")
|
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
+
|
|
|
|
+ b.HasKey("Id");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("AccommodationAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("OtherAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("TicketAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("TransportationAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.ToTable("BusinessTripExpenses");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
{
|
|
{
|
|
b.Property<long>("Id")
|
|
b.Property<long>("Id")
|
|
@@ -3342,6 +3416,60 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.ToTable("OrderAllocations");
|
|
b.ToTable("OrderAllocations");
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAttachment", b =>
|
|
|
|
+ {
|
|
|
|
+ b.Property<long>("Id")
|
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
|
+ .HasColumnType("bigint")
|
|
|
|
+ .HasColumnOrder(0);
|
|
|
|
+
|
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("AttachmentTypeId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<string>("ContentType")
|
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
|
+
|
|
|
|
+ b.Property<DateTime>("CreateDate")
|
|
|
|
+ .HasColumnType("datetime2")
|
|
|
|
+ .HasColumnOrder(3);
|
|
|
|
+
|
|
|
|
+ b.Property<string>("CreateUser")
|
|
|
|
+ .HasMaxLength(450)
|
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
|
+ .HasColumnOrder(1);
|
|
|
|
+
|
|
|
|
+ b.Property<string>("FileName")
|
|
|
|
+ .HasMaxLength(250)
|
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
|
+
|
|
|
|
+ b.Property<string>("FilePath")
|
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
|
+
|
|
|
|
+ b.Property<long>("OrderRequestId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<string>("OriginalName")
|
|
|
|
+ .HasMaxLength(250)
|
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
|
+
|
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
|
+ .HasColumnType("datetime2")
|
|
|
|
+ .HasColumnOrder(4);
|
|
|
|
+
|
|
|
|
+ b.Property<string>("UpdateUser")
|
|
|
|
+ .HasMaxLength(450)
|
|
|
|
+ .HasColumnType("nvarchar(450)")
|
|
|
|
+ .HasColumnOrder(2);
|
|
|
|
+
|
|
|
|
+ b.HasKey("Id");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("OrderRequestId");
|
|
|
|
+
|
|
|
|
+ b.ToTable("OrderAttachment");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.OrderType", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.OrderType", b =>
|
|
{
|
|
{
|
|
b.Property<long>("Id")
|
|
b.Property<long>("Id")
|
|
@@ -3377,33 +3505,57 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
new
|
|
new
|
|
{
|
|
{
|
|
Id = 2L,
|
|
Id = 2L,
|
|
- DefaultDays = 15,
|
|
|
|
- NameAr = "طبية",
|
|
|
|
- NameEn = "Medical"
|
|
|
|
- },
|
|
|
|
- new
|
|
|
|
- {
|
|
|
|
- Id = 3L,
|
|
|
|
DefaultDays = 20,
|
|
DefaultDays = 20,
|
|
NameAr = "وقت إضافي",
|
|
NameAr = "وقت إضافي",
|
|
NameEn = "Overtime"
|
|
NameEn = "Overtime"
|
|
},
|
|
},
|
|
new
|
|
new
|
|
{
|
|
{
|
|
- Id = 4L,
|
|
|
|
|
|
+ Id = 3L,
|
|
DefaultDays = 0,
|
|
DefaultDays = 0,
|
|
NameAr = "رحلة عمل",
|
|
NameAr = "رحلة عمل",
|
|
NameEn = "Business trip"
|
|
NameEn = "Business trip"
|
|
},
|
|
},
|
|
new
|
|
new
|
|
{
|
|
{
|
|
- Id = 5L,
|
|
|
|
|
|
+ Id = 4L,
|
|
DefaultDays = 0,
|
|
DefaultDays = 0,
|
|
NameAr = "دورة تدريبية",
|
|
NameAr = "دورة تدريبية",
|
|
NameEn = "Course"
|
|
NameEn = "Course"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDay", b =>
|
|
|
|
+ {
|
|
|
|
+ b.Property<long>("Id")
|
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
|
+ .HasColumnType("bigint")
|
|
|
|
+ .HasColumnOrder(0);
|
|
|
|
+
|
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
+
|
|
|
|
+ b.Property<string>("EndTime")
|
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
|
+
|
|
|
|
+ b.Property<long?>("OrderRequestId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
+
|
|
|
|
+ b.Property<DateTime?>("OverTimeDate")
|
|
|
|
+ .HasColumnType("datetime2");
|
|
|
|
+
|
|
|
|
+ b.Property<string>("StartTime")
|
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
|
+
|
|
|
|
+ b.Property<decimal?>("TotalHours")
|
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
+
|
|
|
|
+ b.HasKey("Id");
|
|
|
|
+
|
|
|
|
+ b.HasIndex("OrderRequestId");
|
|
|
|
+
|
|
|
|
+ b.ToTable("OverTimeDay");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
|
|
{
|
|
{
|
|
b.Property<long>("Id")
|
|
b.Property<long>("Id")
|
|
@@ -4539,8 +4691,8 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
|
|
- b.Property<int?>("CityId")
|
|
|
|
- .HasColumnType("int");
|
|
|
|
|
|
+ b.Property<long?>("BusinessTripExpensesId")
|
|
|
|
+ .HasColumnType("bigint");
|
|
|
|
|
|
b.Property<long>("CompanyId")
|
|
b.Property<long>("CompanyId")
|
|
.HasColumnType("bigint");
|
|
.HasColumnType("bigint");
|
|
@@ -4548,9 +4700,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.Property<long?>("ContractId")
|
|
b.Property<long?>("ContractId")
|
|
.HasColumnType("bigint");
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
- b.Property<int?>("CountryId")
|
|
|
|
- .HasColumnType("int");
|
|
|
|
-
|
|
|
|
b.Property<DateTime>("CreateDate")
|
|
b.Property<DateTime>("CreateDate")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnOrder(3);
|
|
.HasColumnOrder(3);
|
|
@@ -4568,9 +4717,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.Property<DateTime?>("EndDate")
|
|
b.Property<DateTime?>("EndDate")
|
|
.HasColumnType("datetime2");
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
- b.Property<string>("EndTime")
|
|
|
|
- .HasColumnType("nvarchar(max)");
|
|
|
|
-
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit")
|
|
.HasColumnType("bit")
|
|
.HasColumnOrder(7);
|
|
.HasColumnOrder(7);
|
|
@@ -4594,9 +4740,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.Property<DateTime>("StartDate")
|
|
b.Property<DateTime>("StartDate")
|
|
.HasColumnType("datetime2");
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
- b.Property<string>("StartTime")
|
|
|
|
- .HasColumnType("nvarchar(max)");
|
|
|
|
-
|
|
|
|
b.Property<DateTime?>("UpdateDate")
|
|
b.Property<DateTime?>("UpdateDate")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnOrder(4);
|
|
.HasColumnOrder(4);
|
|
@@ -4608,6 +4751,8 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
+ b.HasIndex("BusinessTripExpensesId");
|
|
|
|
+
|
|
b.HasIndex("CompanyId");
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
b.HasIndex("LeaveTypeId");
|
|
b.HasIndex("LeaveTypeId");
|
|
@@ -6422,6 +6567,33 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
.IsRequired();
|
|
.IsRequired();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
|
+ {
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.OrderAttachment", "AccommodationAttachment")
|
|
|
|
+ .WithMany()
|
|
|
|
+ .HasForeignKey("AccommodationAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.OrderAttachment", "OtherAttachment")
|
|
|
|
+ .WithMany()
|
|
|
|
+ .HasForeignKey("OtherAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.OrderAttachment", "TicketAttachment")
|
|
|
|
+ .WithMany()
|
|
|
|
+ .HasForeignKey("TicketAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.OrderAttachment", "TransportationAttachment")
|
|
|
|
+ .WithMany()
|
|
|
|
+ .HasForeignKey("TransportationAttachmentId");
|
|
|
|
+
|
|
|
|
+ b.Navigation("AccommodationAttachment");
|
|
|
|
+
|
|
|
|
+ b.Navigation("OtherAttachment");
|
|
|
|
+
|
|
|
|
+ b.Navigation("TicketAttachment");
|
|
|
|
+
|
|
|
|
+ b.Navigation("TransportationAttachment");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
{
|
|
{
|
|
b.HasOne("MTWorkHR.Core.Entities.ChatMessage", "ChatMessage")
|
|
b.HasOne("MTWorkHR.Core.Entities.ChatMessage", "ChatMessage")
|
|
@@ -6520,6 +6692,24 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.Navigation("OrderType");
|
|
b.Navigation("OrderType");
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAttachment", b =>
|
|
|
|
+ {
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", "OrderRequest")
|
|
|
|
+ .WithMany("OrderAttachments")
|
|
|
|
+ .HasForeignKey("OrderRequestId")
|
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
|
+ .IsRequired();
|
|
|
|
+
|
|
|
|
+ b.Navigation("OrderRequest");
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDay", b =>
|
|
|
|
+ {
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", null)
|
|
|
|
+ .WithMany("OverTimeDays")
|
|
|
|
+ .HasForeignKey("OrderRequestId");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectStage", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectStage", b =>
|
|
{
|
|
{
|
|
b.HasOne("MTWorkHR.Core.Entities.Contract", "Contract")
|
|
b.HasOne("MTWorkHR.Core.Entities.Contract", "Contract")
|
|
@@ -6577,6 +6767,10 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
|
|
{
|
|
{
|
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.BusinessTripExpenses", "BusinessTripExpenses")
|
|
|
|
+ .WithMany()
|
|
|
|
+ .HasForeignKey("BusinessTripExpensesId");
|
|
|
|
+
|
|
b.HasOne("MTWorkHR.Core.Entities.LeaveType", "LeaveType")
|
|
b.HasOne("MTWorkHR.Core.Entities.LeaveType", "LeaveType")
|
|
.WithMany()
|
|
.WithMany()
|
|
.HasForeignKey("LeaveTypeId");
|
|
.HasForeignKey("LeaveTypeId");
|
|
@@ -6587,6 +6781,8 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
.IsRequired();
|
|
|
|
|
|
|
|
+ b.Navigation("BusinessTripExpenses");
|
|
|
|
+
|
|
b.Navigation("LeaveType");
|
|
b.Navigation("LeaveType");
|
|
|
|
|
|
b.Navigation("OrderType");
|
|
b.Navigation("OrderType");
|
|
@@ -6843,6 +7039,13 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
b.Navigation("TeamUsers");
|
|
b.Navigation("TeamUsers");
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
|
|
|
|
+ {
|
|
|
|
+ b.Navigation("OrderAttachments");
|
|
|
|
+
|
|
|
|
+ b.Navigation("OverTimeDays");
|
|
|
|
+ });
|
|
|
|
+
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
{
|
|
{
|
|
b.Navigation("TaskAttachments");
|
|
b.Navigation("TaskAttachments");
|