|
@@ -342,7 +342,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripAttachment", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
|
.ValueGeneratedOnAdd()
|
|
@@ -351,39 +351,80 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
|
|
- b.Property<long?>("AccommodationAttachmentId")
|
|
|
+ b.Property<long>("BusinessTripExpensesId")
|
|
|
.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<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("BusinessTripExpensesId");
|
|
|
+
|
|
|
+ b.ToTable("BusinessTripAttachment");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
b.Property<decimal?>("AccommodationCost")
|
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
|
|
- b.Property<long?>("OtherAttachmentId")
|
|
|
+ b.Property<long?>("OrderRequestId")
|
|
|
.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?>("TotalCost")
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
|
|
|
b.Property<decimal?>("TransportationCost")
|
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.HasIndex("AccommodationAttachmentId");
|
|
|
-
|
|
|
- b.HasIndex("OtherAttachmentId");
|
|
|
-
|
|
|
- b.HasIndex("TicketAttachmentId");
|
|
|
-
|
|
|
- b.HasIndex("TransportationAttachmentId");
|
|
|
+ b.HasIndex("OrderRequestId")
|
|
|
+ .IsUnique()
|
|
|
+ .HasFilter("[OrderRequestId] IS NOT NULL");
|
|
|
|
|
|
b.ToTable("BusinessTripExpenses");
|
|
|
});
|
|
@@ -3432,9 +3473,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
|
|
- b.Property<long?>("AttachmentTypeId")
|
|
|
- .HasColumnType("bigint");
|
|
|
-
|
|
|
b.Property<string>("ContentType")
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
@@ -3577,6 +3615,58 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.ToTable("OverTimeDay");
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDayAttachment", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ 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<string>("OriginalName")
|
|
|
+ .HasMaxLength(250)
|
|
|
+ .HasColumnType("nvarchar(250)");
|
|
|
+
|
|
|
+ b.Property<long>("OverTimeDayId")
|
|
|
+ .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("OverTimeDayId")
|
|
|
+ .IsUnique();
|
|
|
+
|
|
|
+ b.ToTable("OverTimeDayAttachment");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
@@ -4316,6 +4406,9 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.Property<string>("Name")
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
+ b.Property<long>("OrderRequestId")
|
|
|
+ .HasColumnType("bigint");
|
|
|
+
|
|
|
b.Property<string>("Position")
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
@@ -4330,6 +4423,9 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
+ b.HasIndex("OrderRequestId")
|
|
|
+ .IsUnique();
|
|
|
+
|
|
|
b.ToTable("ServiceCertificate");
|
|
|
});
|
|
|
|
|
@@ -4744,9 +4840,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
|
|
- b.Property<long?>("BusinessTripExpensesId")
|
|
|
- .HasColumnType("bigint");
|
|
|
-
|
|
|
b.Property<long>("CompanyId")
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
@@ -4799,12 +4892,12 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.IsRequired()
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
- b.Property<long?>("ServiceCertificateId")
|
|
|
- .HasColumnType("bigint");
|
|
|
-
|
|
|
b.Property<DateTime>("StartDate")
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
+ b.Property<decimal?>("TotalDays")
|
|
|
+ .HasColumnType("decimal(18,2)");
|
|
|
+
|
|
|
b.Property<DateTime?>("UpdateDate")
|
|
|
.HasColumnType("datetime2")
|
|
|
.HasColumnOrder(4);
|
|
@@ -4816,16 +4909,12 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.HasIndex("BusinessTripExpensesId");
|
|
|
-
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
b.HasIndex("LeaveTypeId");
|
|
|
|
|
|
b.HasIndex("OrderTypeId");
|
|
|
|
|
|
- b.HasIndex("ServiceCertificateId");
|
|
|
-
|
|
|
b.ToTable("OrderRequests");
|
|
|
});
|
|
|
|
|
@@ -6634,31 +6723,24 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
- modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripAttachment", 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.HasOne("MTWorkHR.Core.Entities.BusinessTripExpenses", "BusinessTripExpenses")
|
|
|
+ .WithMany("Attachments")
|
|
|
+ .HasForeignKey("BusinessTripExpensesId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
|
|
|
- b.Navigation("OtherAttachment");
|
|
|
+ b.Navigation("BusinessTripExpenses");
|
|
|
+ });
|
|
|
|
|
|
- b.Navigation("TicketAttachment");
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", "OrderRequest")
|
|
|
+ .WithOne("BusinessTripExpenses")
|
|
|
+ .HasForeignKey("MTWorkHR.Core.Entities.BusinessTripExpenses", "OrderRequestId");
|
|
|
|
|
|
- b.Navigation("TransportationAttachment");
|
|
|
+ b.Navigation("OrderRequest");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
@@ -6772,9 +6854,22 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDay", b =>
|
|
|
{
|
|
|
- b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", null)
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", "OrderRequest")
|
|
|
.WithMany("OverTimeDays")
|
|
|
.HasForeignKey("OrderRequestId");
|
|
|
+
|
|
|
+ b.Navigation("OrderRequest");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDayAttachment", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.OverTimeDay", "OverTimeDay")
|
|
|
+ .WithOne("OverTimeAttachment")
|
|
|
+ .HasForeignKey("MTWorkHR.Core.Entities.OverTimeDayAttachment", "OverTimeDayId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.Navigation("OverTimeDay");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectStage", b =>
|
|
@@ -6810,6 +6905,17 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.Navigation("Project");
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.ServiceCertificate", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.User.OrderRequest", "OrderRequest")
|
|
|
+ .WithOne("ServiceCertificate")
|
|
|
+ .HasForeignKey("MTWorkHR.Core.Entities.ServiceCertificate", "OrderRequestId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.Navigation("OrderRequest");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.TaskUser", b =>
|
|
|
{
|
|
|
b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
|
|
@@ -6834,10 +6940,6 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
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")
|
|
|
.WithMany()
|
|
|
.HasForeignKey("LeaveTypeId");
|
|
@@ -6848,17 +6950,9 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
.IsRequired();
|
|
|
|
|
|
- b.HasOne("MTWorkHR.Core.Entities.ServiceCertificate", "ServiceCertificate")
|
|
|
- .WithMany()
|
|
|
- .HasForeignKey("ServiceCertificateId");
|
|
|
-
|
|
|
- b.Navigation("BusinessTripExpenses");
|
|
|
-
|
|
|
b.Navigation("LeaveType");
|
|
|
|
|
|
b.Navigation("OrderType");
|
|
|
-
|
|
|
- b.Navigation("ServiceCertificate");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
@@ -7073,6 +7167,11 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.BusinessTripExpenses", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("Attachments");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ChatMessage", b =>
|
|
|
{
|
|
|
b.Navigation("ChatAttachments");
|
|
@@ -7097,6 +7196,11 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.Navigation("MeetingUsers");
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.OverTimeDay", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("OverTimeAttachment");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
|
|
|
{
|
|
|
b.Navigation("ProjectTeams");
|
|
@@ -7114,9 +7218,13 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
|
|
|
{
|
|
|
+ b.Navigation("BusinessTripExpenses");
|
|
|
+
|
|
|
b.Navigation("OrderAttachments");
|
|
|
|
|
|
b.Navigation("OverTimeDays");
|
|
|
+
|
|
|
+ b.Navigation("ServiceCertificate");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|