|
@@ -34,7 +34,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("UsersId");
|
|
|
|
|
|
- b.ToTable("ApplicationRoleApplicationUser", (string)null);
|
|
|
+ b.ToTable("ApplicationRoleApplicationUser");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Attendance", b =>
|
|
@@ -103,7 +103,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
- b.ToTable("Attendances", (string)null);
|
|
|
+ b.ToTable("Attendances");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.AttendanceLog", b =>
|
|
@@ -161,7 +161,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("AttendanceLogs", (string)null);
|
|
|
+ b.ToTable("AttendanceLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.AuthLog", b =>
|
|
@@ -219,7 +219,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("AuthLogs", (string)null);
|
|
|
+ b.ToTable("AuthLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Base.AttachmentType", b =>
|
|
@@ -246,7 +246,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("AttachmentTypes", (string)null);
|
|
|
+ b.ToTable("AttachmentTypes");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -314,6 +314,113 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<long>("ChatMessageId")
|
|
|
+ .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")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("FileType")
|
|
|
+ .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("ChatMessageId");
|
|
|
+
|
|
|
+ b.ToTable("ChatAttachment");
|
|
|
+ });
|
|
|
+
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.ChatMessage", b =>
|
|
|
+ {
|
|
|
+ b.Property<long>("Id")
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnType("bigint")
|
|
|
+ .HasColumnOrder(0);
|
|
|
+
|
|
|
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
+
|
|
|
+ b.Property<string>("Content")
|
|
|
+ .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>("IsSeen")
|
|
|
+ .HasColumnType("bit");
|
|
|
+
|
|
|
+ b.Property<string>("ReceiverId")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("ReceiverName")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("SenderId")
|
|
|
+ .IsRequired()
|
|
|
+ .HasColumnType("nvarchar(max)");
|
|
|
+
|
|
|
+ b.Property<string>("SenderName")
|
|
|
+ .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.ToTable("ChatMessages");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.City", b =>
|
|
|
{
|
|
|
b.Property<long>("Id")
|
|
@@ -348,7 +455,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("CountryId");
|
|
|
|
|
|
- b.ToTable("Cities", (string)null);
|
|
|
+ b.ToTable("Cities");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
|
|
@@ -404,7 +511,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("Companies", (string)null);
|
|
|
+ b.ToTable("Companies");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.CountryLookup", b =>
|
|
@@ -436,7 +543,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("CountryLookups", (string)null);
|
|
|
+ b.ToTable("CountryLookups");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
|
|
@@ -494,7 +601,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("FileLogs", (string)null);
|
|
|
+ b.ToTable("FileLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Industry", b =>
|
|
@@ -518,7 +625,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("Industries", (string)null);
|
|
|
+ b.ToTable("Industries");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -844,7 +951,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("JobTitles", (string)null);
|
|
|
+ b.ToTable("JobTitles");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -1015,7 +1122,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("LeaveTypes", (string)null);
|
|
|
+ b.ToTable("LeaveTypes");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -1080,7 +1187,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("LoginOTPs", (string)null);
|
|
|
+ b.ToTable("LoginOTPs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
|
|
@@ -1157,7 +1264,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
- b.ToTable("Meetings", (string)null);
|
|
|
+ b.ToTable("Meetings");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingLog", b =>
|
|
@@ -1215,7 +1322,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("MeetingLogs", (string)null);
|
|
|
+ b.ToTable("MeetingLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
|
|
@@ -1260,7 +1367,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("MeetingId");
|
|
|
|
|
|
- b.ToTable("MeetingUser", (string)null);
|
|
|
+ b.ToTable("MeetingUser");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAllocation", b =>
|
|
@@ -1317,7 +1424,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("OrderTypeId");
|
|
|
|
|
|
- b.ToTable("OrderAllocations", (string)null);
|
|
|
+ b.ToTable("OrderAllocations");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.OrderType", b =>
|
|
@@ -1342,7 +1449,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("OrderTypes", (string)null);
|
|
|
+ b.ToTable("OrderTypes");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -1411,7 +1518,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("Permissions", (string)null);
|
|
|
+ b.ToTable("Permissions");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -1697,7 +1804,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
- b.ToTable("Projects", (string)null);
|
|
|
+ b.ToTable("Projects");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectTeam", b =>
|
|
@@ -1741,7 +1848,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("ProjectId");
|
|
|
|
|
|
- b.ToTable("ProjectTeam", (string)null);
|
|
|
+ b.ToTable("ProjectTeam");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Qualification", b =>
|
|
@@ -1765,7 +1872,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("Qualifications", (string)null);
|
|
|
+ b.ToTable("Qualifications");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -1843,7 +1950,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("RoleLogs", (string)null);
|
|
|
+ b.ToTable("RoleLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
|
|
@@ -1901,7 +2008,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("SettingLogs", (string)null);
|
|
|
+ b.ToTable("SettingLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.TaskUser", b =>
|
|
@@ -1945,7 +2052,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("TaskId");
|
|
|
|
|
|
- b.ToTable("TaskUser", (string)null);
|
|
|
+ b.ToTable("TaskUser");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
|
|
@@ -2001,7 +2108,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
|
|
- b.ToTable("Teams", (string)null);
|
|
|
+ b.ToTable("Teams");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.TeamLog", b =>
|
|
@@ -2059,7 +2166,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("TeamLogs", (string)null);
|
|
|
+ b.ToTable("TeamLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
|
|
@@ -2107,7 +2214,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("TeamId");
|
|
|
|
|
|
- b.ToTable("TeamUser", (string)null);
|
|
|
+ b.ToTable("TeamUser");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.University", b =>
|
|
@@ -2131,7 +2238,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("Universities", (string)null);
|
|
|
+ b.ToTable("Universities");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -2235,7 +2342,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("OrderTypeId");
|
|
|
|
|
|
- b.ToTable("OrderRequests", (string)null);
|
|
|
+ b.ToTable("OrderRequests");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
|
|
@@ -2293,7 +2400,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("UserLogs", (string)null);
|
|
|
+ b.ToTable("UserLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
|
|
@@ -2367,7 +2474,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("StatusId");
|
|
|
|
|
|
- b.ToTable("UserTasks", (string)null);
|
|
|
+ b.ToTable("UserTasks");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
|
|
@@ -2427,7 +2534,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("TaskId");
|
|
|
|
|
|
- b.ToTable("UserTaskAttachments", (string)null);
|
|
|
+ b.ToTable("UserTaskAttachments");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
|
|
@@ -2479,7 +2586,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("TaskId");
|
|
|
|
|
|
- b.ToTable("UserTaskHistories", (string)null);
|
|
|
+ b.ToTable("UserTaskHistories");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskLog", b =>
|
|
@@ -2537,7 +2644,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("UserTaskLogs", (string)null);
|
|
|
+ b.ToTable("UserTaskLogs");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
|
|
@@ -2561,7 +2668,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
- b.ToTable("UserTaskStatuses", (string)null);
|
|
|
+ b.ToTable("UserTaskStatuses");
|
|
|
|
|
|
b.HasData(
|
|
|
new
|
|
@@ -2685,6 +2792,9 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.Property<long?>("CountryId")
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
+ b.Property<DateTime?>("CreateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
b.Property<string>("CreateUser")
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
@@ -2782,6 +2892,9 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.Property<long?>("UniversityId")
|
|
|
.HasColumnType("bigint");
|
|
|
|
|
|
+ b.Property<DateTime?>("UpdateDate")
|
|
|
+ .HasColumnType("datetime2");
|
|
|
+
|
|
|
b.Property<string>("UpdateUser")
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
@@ -2901,7 +3014,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
|
|
- b.ToTable("RolePermissions", (string)null);
|
|
|
+ b.ToTable("RolePermissions");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
|
|
@@ -2956,7 +3069,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
b.HasIndex("UserId")
|
|
|
.IsUnique();
|
|
|
|
|
|
- b.ToTable("UserAddress", (string)null);
|
|
|
+ b.ToTable("UserAddress");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
|
|
@@ -3019,7 +3132,7 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
- b.ToTable("UserAttachments", (string)null);
|
|
|
+ b.ToTable("UserAttachments");
|
|
|
});
|
|
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
@@ -3155,6 +3268,17 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.ChatAttachment", b =>
|
|
|
+ {
|
|
|
+ b.HasOne("MTWorkHR.Core.Entities.ChatMessage", "ChatMessage")
|
|
|
+ .WithMany("ChatAttachments")
|
|
|
+ .HasForeignKey("ChatMessageId")
|
|
|
+ .OnDelete(DeleteBehavior.Cascade)
|
|
|
+ .IsRequired();
|
|
|
+
|
|
|
+ b.Navigation("ChatMessage");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.City", b =>
|
|
|
{
|
|
|
b.HasOne("MTWorkHR.Core.Entities.CountryLookup", "Country")
|
|
@@ -3450,6 +3574,11 @@ namespace MTWorkHR.Infrastructure.Migrations
|
|
|
.IsRequired();
|
|
|
});
|
|
|
|
|
|
+ modelBuilder.Entity("MTWorkHR.Core.Entities.ChatMessage", b =>
|
|
|
+ {
|
|
|
+ b.Navigation("ChatAttachments");
|
|
|
+ });
|
|
|
+
|
|
|
modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
|
|
|
{
|
|
|
b.Navigation("MeetingUsers");
|