diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs index d5564846..5bb131c3 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs @@ -26,7 +26,7 @@ public static class MenuPrefixExtensions { return menu switch { - MenuPrefix.Platform => "P", + MenuPrefix.Platform => "Plat", MenuPrefix.Saas => "Sas", MenuPrefix.Administration => "Adm", MenuPrefix.Intranet => "Net", diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs index aedcf002..bff559cd 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -138,14 +138,12 @@ public enum TableNameEnum MaterialType, MaterialGroup, PaymentTerm, + SupplyType, + SupplyCardType, + CustomerType, + CustomerSegment, Partner, PartnerBank, PartnerCertificate, - PartnerContact, - SupplyType, - SupplyCardType, - Supply, - CustomerType, - CustomerSegment, - Customer + PartnerContact } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/TablePrefixEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/TablePrefixEnum.cs new file mode 100644 index 00000000..5c30241b --- /dev/null +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/TablePrefixEnum.cs @@ -0,0 +1,25 @@ +using Kurs.Platform.Enums; + +namespace Kurs.Platform; + +public static class TablePrefix +{ + private const string PlatformPrefix = "P"; + private const string TenantPrefix = "T"; + private const string BranchPrefix = "B"; + + public static string PlatformByName(MenuPrefix MenuGroup, TableNameEnum tableName) + { + return $"{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{PlatformPrefix}_{tableName}"; + } + + public static string TenantByName(MenuPrefix MenuGroup, TableNameEnum tableName) + { + return $"{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{TenantPrefix}_{tableName}"; + } + + public static string BranchByName(MenuPrefix MenuGroup, TableNameEnum tableName) + { + return $"{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{BranchPrefix}_{tableName}"; + } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index 803196f2..9963f4ff 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -43,40 +43,6 @@ public static class PlatformConsts public const string DbSchema = null; } - public static string FullNameTable(TableNameEnum TableName) - { - return TableNameResolver.GetFullTableName($"{TableName}"); - } - - public static string FullNameView(TableNameEnum TableName) - { - return TableNameResolver.GetFullViewName($"{TableName}"); - } - - public static class TablePrefix - { - public static string PlatformByName(MenuPrefix MenuGroup, TableNameEnum tableName) - { - string DbTablePlatform = "P"; - - return $"{DbTablePlatform}_{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{tableName}"; - } - - public static string TenantByName(MenuPrefix MenuGroup, TableNameEnum tableName) - { - string DbTableTenant = "T"; - - return $"{DbTableTenant}_{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{tableName}"; - } - - public static string BranchByName(MenuPrefix MenuGroup, TableNameEnum tableName) - { - string DbTableBranch = "B"; - - return $"{DbTableBranch}_{MenuPrefixExtensions.ToPrefix(MenuGroup)}_{tableName}"; - } - } - public static class Permissions { public const string MenuGroup = "MenuGroup"; @@ -1429,7 +1395,7 @@ public static class PlatformConsts new SelectListItem { Value = LanguageCodes.Tr, Text = LanguageNames.Tr }, new SelectListItem { Value = LanguageCodes.Zh, Text = LanguageNames.Zh }, ]; - + public static class CustomEndpointConsts { public static class ParameterTypes @@ -1480,4 +1446,14 @@ public static class PlatformConsts return ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); } } + + public static string FullNameTable(TableNameEnum TableName) + { + return TableNameResolver.GetFullTableName($"{TableName}"); + } + + public static string FullNameView(TableNameEnum TableName) + { + return TableNameResolver.GetFullViewName($"{TableName}"); + } } diff --git a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs index 026800f4..ccee22e4 100644 --- a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs @@ -8,174 +8,174 @@ public static class TableNameResolver public const string ViewPrefix = "V_"; // Tüm tabloların hangi prefix tipine ve menü grubuna ait olduğunu belirten harita - private static readonly Dictionary Method, MenuPrefix PrefixGroup)> _map - = new(StringComparer.OrdinalIgnoreCase) + private static readonly Dictionary Method, MenuPrefix PrefixGroup)> + _map = new(StringComparer.OrdinalIgnoreCase) { // 🔹 MODULE TABLOLARI - { nameof(TableNameEnum.Language), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.LanguageKey), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.LanguageText), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.SettingDefinition), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.Notification), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.NotificationRule), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.BackgroundWorker_MailQueue), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.AiBot), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.Language), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.LanguageKey), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.LanguageText), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.SettingDefinition), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.Notification), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.NotificationRule), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.BackgroundWorker_MailQueue), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, // 🔹 PLATFORM TABLOLARI - { nameof(TableNameEnum.Route), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.Menu), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.DataSource), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ListForm), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ListFormField), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ListFormCustomization), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ListFormImport), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ListFormImportExecute), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ContactTag), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ContactTitle), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.Currency), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.CountryGroup), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.Country), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.City), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.District), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.BackgroundWorker), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Platform) }, - { nameof(TableNameEnum.ForumCategory), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ForumTopic), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ForumPost), (PlatformConsts.TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Menu), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.DataSource), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ListForm), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ListFormField), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ListFormCustomization), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ListFormImport), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ListFormImportExecute), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ContactTag), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ContactTitle), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Currency), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.CountryGroup), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Country), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.City), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.District), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.ForumCategory), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ForumTopic), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, // 🔹 TENANT TABLOLARI (GENEL) - { nameof(TableNameEnum.Activity), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.Branch), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.BranchUsers), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.GlobalSearch), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.CustomEntity), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.CustomEntityField), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ApiMigration), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ApiEndpoint), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.CustomEndpoint), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.CustomComponent), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ReportCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ReportTemplate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ReportParameter), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ReportGenerated), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.IpRestriction), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.Sector), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Activity), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Branch), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.BranchUsers), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.GlobalSearch), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.CustomEntity), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.CustomEntityField), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ApiMigration), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ApiEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.CustomEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.CustomComponent), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ReportParameter), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ReportGenerated), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Saas) }, // 🔹 ADMINISTRATION - { nameof(TableNameEnum.SkillType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Skill), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.SkillLevel), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.UomCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Uom), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Behavior), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.EducationStatus), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Disease), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Lawyer), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Document), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Vehicle), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.WorkHour), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.About), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Service), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Product), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.PaymentMethod), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.InstallmentOption), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Order), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.OrderItem), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.BlogCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.BlogPost), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Demo), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Contact), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.PartnerBank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.PartnerCertificate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.PartnerContact), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SkillType), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Skill), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SkillLevel), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.UomCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Uom), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Behavior), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EducationStatus), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Disease), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Psychologist), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Vaccine), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Lawyer), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Document), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Vehicle), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.WorkHour), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.About), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Service), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Product), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.PaymentMethod), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.InstallmentOption), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Order), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.OrderItem), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.BlogCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.BlogPost), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Demo), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Contact), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Partner), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.PartnerBank), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.PartnerCertificate), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.PartnerContact), (TablePrefix.TenantByName, MenuPrefix.Administration) }, // 🔹 PARTICIPANT - { nameof(TableNameEnum.Interesting), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, - { nameof(TableNameEnum.Source), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, - { nameof(TableNameEnum.NoteType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, - { nameof(TableNameEnum.SalesRejectionReason), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, - { nameof(TableNameEnum.MeetingMethod), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, - { nameof(TableNameEnum.MeetingResult), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.Interesting), (TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.Source), (TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.NoteType), (TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.SalesRejectionReason), (TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.MeetingMethod), (TablePrefix.TenantByName, MenuPrefix.Participant) }, + { nameof(TableNameEnum.MeetingResult), (TablePrefix.TenantByName, MenuPrefix.Participant) }, // 🔹 COORDINATOR - { nameof(TableNameEnum.Schedule), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ScheduleLesson), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.RegistrationType), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.RegistrationMethod), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ClassType), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.Class), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.Level), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.LessonPeriod), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ClassCancellationReason), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.Program), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.Classroom), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ClassroomParticipant), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ClassroomAttandance), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.ClassroomChat), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.QuestionTag), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.QuestionPool), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.Question), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, - { nameof(TableNameEnum.QuestionOption), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Schedule), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ScheduleLesson), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.RegistrationType), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.RegistrationMethod), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ClassType), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Class), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Level), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.LessonPeriod), (TablePrefix.BranchByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ClassCancellationReason), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Program), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Classroom), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ClassroomParticipant), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ClassroomAttandance), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.ClassroomChat), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.QuestionTag), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.QuestionPool), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.Question), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, + { nameof(TableNameEnum.QuestionOption), (TablePrefix.TenantByName, MenuPrefix.Coordinator) }, // 🔹 HR - { nameof(TableNameEnum.Department), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.EmploymentType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.JobPosition), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Badge), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.CostCenter), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Employee), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Leave), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Overtime), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Payroll), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.PayrollItem), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Template360), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Performance360), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Expense), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.Survey), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.SurveyQuestion), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.SurveyQuestionOption), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.SurveyAnswer), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, - { nameof(TableNameEnum.SurveyResponse), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Department), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.EmploymentType), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.JobPosition), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Badge), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.CostCenter), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Employee), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Leave), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Overtime), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Payroll), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.PayrollItem), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Template360), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Performance360), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Expense), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.Survey), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.SurveyQuestion), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.SurveyQuestionOption), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.SurveyAnswer), (TablePrefix.TenantByName, MenuPrefix.Hr) }, + { nameof(TableNameEnum.SurveyResponse), (TablePrefix.TenantByName, MenuPrefix.Hr) }, // Intranet - { nameof(TableNameEnum.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Event), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventPhoto), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventComment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Training), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Certificate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Reservation), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.ShuttleRoute), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Announcement), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Visitor), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialPost), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialLocation), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialMedia), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialPollOption), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialComment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialLike), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventCategory), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventType), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Event), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventPhoto), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Training), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Certificate), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Meal), (TablePrefix.BranchByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Reservation), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.ShuttleRoute), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Announcement), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.Visitor), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialPost), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialLocation), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialMedia), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialPollOption), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, //Supply Chain - { nameof(TableNameEnum.MaterialType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, - { nameof(TableNameEnum.MaterialGroup), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, - { nameof(TableNameEnum.PaymentTerm), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, - { nameof(TableNameEnum.SupplyType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, - { nameof(TableNameEnum.SupplyCardType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, - { nameof(TableNameEnum.Supply), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, + { nameof(TableNameEnum.MaterialType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, + { nameof(TableNameEnum.MaterialGroup), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, + { nameof(TableNameEnum.PaymentTerm), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, + { nameof(TableNameEnum.SupplyType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, + { nameof(TableNameEnum.SupplyCardType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, //Crm - { nameof(TableNameEnum.Customer), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) }, - { nameof(TableNameEnum.CustomerSegment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) }, - { nameof(TableNameEnum.CustomerType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) }, + { nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) }, + { nameof(TableNameEnum.CustomerType), (TablePrefix.TenantByName, MenuPrefix.Crm) }, // 🔹 ACCOUNTING - { nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, - { nameof(TableNameEnum.BankAccount), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, + { nameof(TableNameEnum.Bank), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, + { nameof(TableNameEnum.BankAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, + }; public static string GetFullTableName(string tableName) diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs index ae057ca2..c6b47ef5 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -73,4 +73,6 @@ public class Employee : FullAuditedEntity, IMultiTenant public ICollection Certificates { get; set; } public ICollection ExpenseRequests { get; set; } public ICollection SurveyResponses { get; set; } + public ICollection Partners { get; set; } + } diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Customer.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Customer.cs deleted file mode 100644 index 02ba44d3..00000000 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Customer.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; - -namespace Kurs.Platform.Entities; - -public class Customer : Partner -{ - public PartnerType PartyType { get; set; } = PartnerType.Customer; - - public Guid? CustomerTypeId { get; set; } - public CustomerType? CustomerType { get; set; } - - public Guid? CustomerSegmentId { get; set; } - public CustomerSegment? CustomerSegment { get; set; } - - public Guid AssignedEmployeeId { get; set; } - public Employee? AssignedEmployee { get; set; } - - public string TeamCode { get; set; } // Organization Unit Code - - public decimal TotalRevenue { get; set; } // Toplam Gelir - public decimal AverageOrderValue { get; set; } // Ortalama Sipariş Değeri - public decimal LifetimeValue { get; set; } // Müşteri Ömrü Değeri -} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs index b5e6deee..c10f85f9 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs @@ -13,5 +13,5 @@ public class CustomerSegment : FullAuditedEntity, IMultiTenant public string Description { get; set; } public bool IsActive { get; set; } - public ICollection Customers { get; set; } + public ICollection Partners { get; set; } } diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs index d9c405a0..89f361d4 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs @@ -13,6 +13,6 @@ public class CustomerType : FullAuditedEntity, IMultiTenant public string Description { get; set; } public bool IsActive { get; set; } - public ICollection Customers { get; set; } + public ICollection Partners { get; set; } } diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs index 1e6b0761..f9bb6d7e 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -12,6 +14,8 @@ public class Partner : FullAuditedEntity, IMultiTenant public string Code { get; set; } public string Name { get; set; } + public PartnerType PartyType { get; set; } + public Guid? SectorId { get; set; } public Sector? Sector { get; set; } @@ -38,13 +42,66 @@ public class Partner : FullAuditedEntity, IMultiTenant public PaymentTerm? PaymentTerm { get; set; } public decimal CreditLimit { get; set; } - public DateTime LastOrderDate { get; set; } + public DateTime? LastOrderDate { get; set; } public PartnerStatus Status { get; set; } - public ICollection Certificates { get; set; } public ICollection Banks { get; set; } + public ICollection Certificates { get; set; } public ICollection Contacts { get; set; } + + //Customer ile ilgil bilgiler + public Guid? CustomerTypeId { get; set; } + public CustomerType? CustomerType { get; set; } + + public Guid? CustomerSegmentId { get; set; } + public CustomerSegment? CustomerSegment { get; set; } + + public Guid? AssignedEmployeeId { get; set; } + public Employee? AssignedEmployee { get; set; } + + public string? TeamCode { get; set; } // Organization Unit Code + + public decimal TotalRevenue { get; set; } // Toplam Gelir + public decimal AverageOrderValue { get; set; } // Ortalama Sipariş Değeri + public decimal LifetimeValue { get; set; } // Müşteri Ömrü Değeri + + //Supplier ile ilgili bilgiler + public Guid? SupplierTypeId { get; set; } + public SupplyType? SupplierType { get; set; } + + public Guid? SupplyCardTypeId { get; set; } + public SupplyCardType? SupplyCardType { get; set; } + + public string? CardNumber { get; set; } + public DateTime? ValidFrom { get; set; } + public DateTime? ValidTo { get; set; } + public decimal CurrentBalance { get; set; } + public decimal DiscountRate { get; set; } + + public string? PerformanceMetricsJson { get; set; } + + public PerformanceMetrics PerformanceMetrics + { + get + { + if (!string.IsNullOrEmpty(PerformanceMetricsJson)) + return JsonSerializer.Deserialize(PerformanceMetricsJson); + + return new PerformanceMetrics(); + } + set { PerformanceMetricsJson = JsonSerializer.Serialize(value); } + } } - +[NotMapped] +public class PerformanceMetrics +{ + public int DeliveryPerformance { get; set; } + public int QualityRating { get; set; } + public int PriceCompetitiveness { get; set; } + public int Responsiveness { get; set; } + public int ComplianceRating { get; set; } + public int OverallScore { get; set; } + public DateTime LastEvaluationDate { get; set; } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Supply.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Supply.cs deleted file mode 100644 index b0c2f8e9..00000000 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/Supply.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations.Schema; -using System.Text.Json; - -namespace Kurs.Platform.Entities; - -public class Supply : Partner -{ - public PartnerType PartyType { get; set; } = PartnerType.Supplier; - - public Guid? SupplierTypeId { get; set; } - public SupplyType? SupplierType { get; set; } - - public string CardNumber { get; set; } - - public Guid? SupplyCardTypeId { get; set; } - public SupplyCardType? SupplyCardType { get; set; } - - public DateTime ValidFrom { get; set; } - public DateTime ValidTo { get; set; } - public decimal CurrentBalance { get; set; } - public decimal DiscountRate { get; set; } - - public string? PerformanceMetricsJson { get; set; } - - [NotMapped] - public PerformanceMetrics PerformanceMetrics - { - get - { - if (!string.IsNullOrEmpty(PerformanceMetricsJson)) - return JsonSerializer.Deserialize(PerformanceMetricsJson); - - return new PerformanceMetrics(); - } - set { PerformanceMetricsJson = JsonSerializer.Serialize(value); } - } -} - -public class PerformanceMetrics -{ - public int DeliveryPerformance { get; set; } - public int QualityRating { get; set; } - public int PriceCompetitiveness { get; set; } - public int Responsiveness { get; set; } - public int ComplianceRating { get; set; } - public int OverallScore { get; set; } - public DateTime LastEvaluationDate { get; set; } -} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs index d090108e..44d38c8b 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs @@ -13,5 +13,5 @@ public class SupplyCardType : FullAuditedEntity, IMultiTenant public string Description { get; set; } public bool IsActive { get; set; } - public ICollection Supplies { get; set; } + public ICollection Partners { get; set; } } diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs index 04cfb31f..11bafb33 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs @@ -13,5 +13,5 @@ public class SupplyType : FullAuditedEntity, IMultiTenant public string Description { get; set; } public bool IsActive { get; set; } - public ICollection Supplies { get; set; } + public ICollection Partners { get; set; } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index d1508007..21f50af2 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -37,7 +37,7 @@ public class PlatformDbContext : IIdentityDbContext, ITenantManagementDbContext { - #region Saas from the modules + #region Saas public DbSet Tenants { get; set; } public DbSet TenantConnectionStrings { get; set; } public DbSet AiBots { get; set; } @@ -77,7 +77,7 @@ public class PlatformDbContext : public DbSet Districts { get; set; } #endregion - #region Administrator from the modules + #region Administrator public DbSet Users { get; set; } public DbSet Roles { get; set; } public DbSet ClaimTypes { get; set; } @@ -112,7 +112,6 @@ public class PlatformDbContext : public DbSet Vehicles { get; set; } public DbSet Psychologists { get; set; } public DbSet Lawyers { get; set; } - public DbSet Partners { get; set; } #endregion #region Intranet @@ -135,7 +134,7 @@ public class PlatformDbContext : public DbSet SocialLikes { get; set; } #endregion - #region Participant from the modules + #region Participant public DbSet MeetingMethods { get; set; } public DbSet MeetingResults { get; set; } public DbSet Sources { get; set; } @@ -144,7 +143,7 @@ public class PlatformDbContext : public DbSet NoteTypes { get; set; } #endregion - #region Coordinator from the modules + #region Coordinator public DbSet Programs { get; set; } public DbSet Schedules { get; set; } public DbSet ScheduleLessons { get; set; } @@ -196,13 +195,12 @@ public class PlatformDbContext : public DbSet MaterialGroups { get; set; } public DbSet PaymentTerms { get; set; } + public DbSet Partners { get; set; } public DbSet SupplyTypes { get; set; } public DbSet SupplyCardTypes { get; set; } - public DbSet Supplies { get; set; } public DbSet CustomerTypes { get; set; } public DbSet CustomerSegments { get; set; } - public DbSet Customers { get; set; } public DbSet PartnerBanks { get; set; } public DbSet PartnerCertificates { get; set; } @@ -2253,46 +2251,6 @@ public class PlatformDbContext : b.Property(x => x.IsActive).HasDefaultValue(true); }); - builder.Entity(b => - { - b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Supply)), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(p => p.Code).IsRequired().HasMaxLength(64); - b.Property(p => p.Name).IsRequired().HasMaxLength(256); - b.Property(p => p.TaxNumber).IsRequired(); - b.Property(p => p.TaxOffice).HasMaxLength(128); - b.Property(p => p.Country).IsRequired().HasMaxLength(64); - b.Property(p => p.City).IsRequired().HasMaxLength(64); - b.Property(p => p.District).HasMaxLength(64); - b.Property(p => p.Street).HasMaxLength(128); - b.Property(p => p.Address1).HasMaxLength(256); - b.Property(p => p.Address2).HasMaxLength(256); - b.Property(p => p.PostalCode).HasMaxLength(16); - b.Property(p => p.Phone).HasMaxLength(32); - b.Property(p => p.Mobile).HasMaxLength(32); - b.Property(p => p.Fax).HasMaxLength(32); - b.Property(p => p.Email).HasMaxLength(128); - b.Property(p => p.Website).HasMaxLength(128); - b.Property(p => p.CreditLimit).HasPrecision(18, 2); - b.Property(p => p.Status).IsRequired(); - - b.Property(x => x.CardNumber).HasMaxLength(64); - b.Property(x => x.CurrentBalance).HasDefaultValue(0); - b.Property(x => x.DiscountRate).HasDefaultValue(0); - b.Property(a => a.PerformanceMetricsJson).HasColumnType("text"); - - b.HasOne(x => x.SupplierType) - .WithMany(x => x.Supplies) - .HasForeignKey(x => x.SupplierTypeId) - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne(x => x.SupplyCardType) - .WithMany(x => x.Supplies) - .HasForeignKey(x => x.SupplyCardTypeId) - .OnDelete(DeleteBehavior.Restrict); - }); - builder.Entity(b => { b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerType)), Prefix.DbSchema); @@ -2313,11 +2271,9 @@ public class PlatformDbContext : b.Property(x => x.IsActive).HasDefaultValue(true); }); - builder.Ignore(); - - builder.Entity(b => + builder.Entity(b => { - b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Customer)), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Partner)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(p => p.Code).IsRequired().HasMaxLength(64); @@ -2336,23 +2292,46 @@ public class PlatformDbContext : b.Property(p => p.Fax).HasMaxLength(32); b.Property(p => p.Email).HasMaxLength(128); b.Property(p => p.Website).HasMaxLength(128); - b.Property(p => p.CreditLimit).HasPrecision(18, 2); b.Property(p => p.Status).IsRequired(); + b.Property(p => p.CreditLimit).HasPrecision(18, 2).HasDefaultValue(0); + //Supplier configuration + b.Property(x => x.CardNumber).HasMaxLength(64); + b.Property(x => x.CurrentBalance).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(x => x.DiscountRate).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(a => a.PerformanceMetricsJson).HasColumnType("text"); + + //Customer configuration b.Property(x => x.TeamCode).HasMaxLength(95); - b.Property(x => x.TotalRevenue).HasDefaultValue(0); - b.Property(x => x.AverageOrderValue).HasDefaultValue(0); - b.Property(x => x.LifetimeValue).HasDefaultValue(0); + b.Property(p => p.CreditLimit).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(x => x.TotalRevenue).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(x => x.AverageOrderValue).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(x => x.LifetimeValue).HasPrecision(18, 2).HasDefaultValue(0); + + b.HasOne(x => x.SupplierType) + .WithMany(x => x.Partners) + .HasForeignKey(x => x.SupplierTypeId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.SupplyCardType) + .WithMany(x => x.Partners) + .HasForeignKey(x => x.SupplyCardTypeId) + .OnDelete(DeleteBehavior.Restrict); b.HasOne(x => x.CustomerType) - .WithMany(x => x.Customers) + .WithMany(x => x.Partners) .HasForeignKey(x => x.CustomerTypeId) .OnDelete(DeleteBehavior.Restrict); b.HasOne(x => x.CustomerSegment) - .WithMany(x => x.Customers) + .WithMany(x => x.Partners) .HasForeignKey(x => x.CustomerSegmentId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.AssignedEmployee) + .WithMany(x => x.Partners) + .HasForeignKey(x => x.AssignedEmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2367,9 +2346,9 @@ public class PlatformDbContext : b.Property(pb => pb.AccountOwner).IsRequired().HasMaxLength(128); b.Property(pb => pb.BranchName).HasMaxLength(128); b.Property(pb => pb.AccountType).HasMaxLength(64); - b.Property(pb => pb.Balance).HasPrecision(18, 2); - b.Property(pb => pb.OverdraftLimit).HasPrecision(18, 2); - b.Property(pb => pb.DailyTransferLimit).HasPrecision(18, 2); + b.Property(pb => pb.Balance).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(pb => pb.OverdraftLimit).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(pb => pb.DailyTransferLimit).HasPrecision(18, 2).HasDefaultValue(0); b.Property(pb => pb.IsDefault).HasDefaultValue(false); b.Property(pb => pb.IsActive).HasDefaultValue(true); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.Designer.cs similarity index 96% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.Designer.cs index 8813089b..efdceb64 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251031221233_Initial")] + [Migration("20251101080853_Initial")] partial class Initial { /// @@ -622,7 +622,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_About", (string)null); + b.ToTable("Adm_T_About", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Activity", b => @@ -689,7 +689,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Activity", (string)null); + b.ToTable("Sas_T_Activity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -704,7 +704,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_P_AiBot", (string)null); + b.ToTable("Plat_P_AiBot", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b => @@ -799,7 +799,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Announcement", (string)null); + b.ToTable("Net_T_Announcement", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => @@ -875,7 +875,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_ApiEndpoint", (string)null); + b.ToTable("Sas_T_ApiEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => @@ -936,7 +936,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_ApiMigration", (string)null); + b.ToTable("Sas_T_ApiMigration", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => @@ -1009,7 +1009,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_P_BackgroundWorker", (string)null); + b.ToTable("Plat_P_BackgroundWorker", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Badge", b => @@ -1099,7 +1099,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Badge", (string)null); + b.ToTable("Hr_T_Badge", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Bank", b => @@ -1187,7 +1187,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Acc_Bank", (string)null); + b.ToTable("Acc_T_Bank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => @@ -1259,7 +1259,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("BankId"); - b.ToTable("T_Acc_BankAccount", (string)null); + b.ToTable("Acc_T_BankAccount", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => @@ -1308,7 +1308,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Behavior", (string)null); + b.ToTable("Adm_T_Behavior", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => @@ -1381,7 +1381,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("T_Adm_BlogCategory", (string)null); + b.ToTable("Adm_T_BlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1485,7 +1485,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("T_Adm_BlogPost", (string)null); + b.ToTable("Adm_T_BlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1599,7 +1599,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Branch", (string)null); + b.ToTable("Sas_T_Branch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => @@ -1619,7 +1619,7 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); - b.ToTable("T_Sas_BranchUsers", (string)null); + b.ToTable("Sas_T_BranchUsers", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => @@ -1686,7 +1686,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TrainingId"); - b.ToTable("T_Net_Certificate", (string)null); + b.ToTable("Net_T_Certificate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.City", b => @@ -1753,7 +1753,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL"); - b.ToTable("P_Sas_City", (string)null); + b.ToTable("Sas_P_City", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Class", b => @@ -1814,7 +1814,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("B_Crd_Class", (string)null); + b.ToTable("Crd_B_Class", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => @@ -1867,7 +1867,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_ClassCancellationReason", (string)null); + b.ToTable("Crd_T_ClassCancellationReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => @@ -1934,7 +1934,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("B_Crd_ClassType", (string)null); + b.ToTable("Crd_B_ClassType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => @@ -2030,7 +2030,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TeacherId"); - b.ToTable("T_Crd_Classroom", (string)null); + b.ToTable("Crd_T_Classroom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -2103,7 +2103,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("StudentId"); - b.ToTable("T_Crd_ClassroomAttandance", (string)null); + b.ToTable("Crd_T_ClassroomAttandance", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", b => @@ -2187,7 +2187,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Timestamp"); - b.ToTable("T_Crd_ClassroomChat", (string)null); + b.ToTable("Crd_T_ClassroomChat", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => @@ -2282,7 +2282,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[UserId] IS NOT NULL"); - b.ToTable("T_Crd_ClassroomParticipant", (string)null); + b.ToTable("Crd_T_ClassroomParticipant", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Contact", b => @@ -2355,7 +2355,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Contact", (string)null); + b.ToTable("Adm_T_Contact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => @@ -2404,7 +2404,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ContactTag", (string)null); + b.ToTable("Sas_P_ContactTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => @@ -2453,7 +2453,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ContactTitle", (string)null); + b.ToTable("Sas_P_ContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => @@ -2549,7 +2549,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResponsibleEmployeeId"); - b.ToTable("T_Hr_CostCenter", (string)null); + b.ToTable("Hr_T_CostCenter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2624,7 +2624,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("GroupName"); - b.ToTable("P_Sas_Country", (string)null); + b.ToTable("Sas_P_Country", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CountryGroup", b => @@ -2672,7 +2672,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Name") .IsUnique(); - b.ToTable("P_Sas_CountryGroup", (string)null); + b.ToTable("Sas_P_CountryGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Currency", b => @@ -2738,7 +2738,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_Currency", (string)null); + b.ToTable("Sas_P_Currency", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomComponent", b => @@ -2806,7 +2806,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomComponent", (string)null); + b.ToTable("Sas_T_CustomComponent", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEndpoint", b => @@ -2884,7 +2884,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomEndpoint", (string)null); + b.ToTable("Sas_T_CustomEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", b => @@ -2969,7 +2969,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomEntity", (string)null); + b.ToTable("Sas_T_CustomEntity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => @@ -3044,181 +3044,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_CustomEntityField", (string)null); - }); - - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address1") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Address2") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("AssignedEmployeeId") - .HasColumnType("uniqueidentifier"); - - b.Property("AverageOrderValue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("City") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CreditLimit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerSegmentId") - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("District") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Email") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Fax") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LastOrderDate") - .HasColumnType("datetime2"); - - b.Property("LifetimeValue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("Mobile") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PartyType") - .HasColumnType("int"); - - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); - - b.Property("Phone") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("PostalCode") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); - - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Street") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TaxNumber") - .HasColumnType("bigint"); - - b.Property("TaxOffice") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TeamCode") - .HasMaxLength(95) - .HasColumnType("nvarchar(95)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TotalRevenue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("Website") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("AssignedEmployeeId"); - - b.HasIndex("CurrencyId"); - - b.HasIndex("CustomerSegmentId"); - - b.HasIndex("CustomerTypeId"); - - b.HasIndex("PaymentTermId"); - - b.HasIndex("SectorId"); - - b.ToTable("T_Crm_Customer", (string)null); + b.ToTable("Sas_T_CustomEntityField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", b => @@ -3276,7 +3102,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crm_CustomerSegment", (string)null); + b.ToTable("Crm_T_CustomerSegment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", b => @@ -3334,7 +3160,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crm_CustomerType", (string)null); + b.ToTable("Crm_T_CustomerType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.DataSource", b => @@ -3386,7 +3212,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_DataSource", (string)null); + b.ToTable("Sas_P_DataSource", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Demo", b => @@ -3466,7 +3292,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Demo", (string)null); + b.ToTable("Adm_T_Demo", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Department", b => @@ -3550,7 +3376,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ParentDepartmentId"); - b.ToTable("T_Hr_Department", (string)null); + b.ToTable("Hr_T_Department", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => @@ -3599,7 +3425,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Disease", (string)null); + b.ToTable("Adm_T_Disease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -3674,7 +3500,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); - b.ToTable("P_Sas_District", (string)null); + b.ToTable("Sas_P_District", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Document", b => @@ -3723,7 +3549,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Document", (string)null); + b.ToTable("Adm_T_Document", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => @@ -3775,7 +3601,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_EducationStatus", (string)null); + b.ToTable("Adm_T_EducationStatus", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => @@ -3946,7 +3772,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ManagerId"); - b.ToTable("T_Hr_Employee", (string)null); + b.ToTable("Hr_T_Employee", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EmploymentType", b => @@ -3995,7 +3821,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_EmploymentType", (string)null); + b.ToTable("Hr_T_EmploymentType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Event", b => @@ -4085,7 +3911,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("T_Net_Event", (string)null); + b.ToTable("Net_T_Event", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => @@ -4134,7 +3960,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_EventCategory", (string)null); + b.ToTable("Net_T_EventCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b => @@ -4195,7 +4021,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Net_EventComment", (string)null); + b.ToTable("Net_T_EventComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b => @@ -4248,7 +4074,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Net_EventPhoto", (string)null); + b.ToTable("Net_T_EventPhoto", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => @@ -4297,7 +4123,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_EventType", (string)null); + b.ToTable("Net_T_EventType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Expense", b => @@ -4390,7 +4216,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Expense", (string)null); + b.ToTable("Hr_T_Expense", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => @@ -4428,7 +4254,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_GlobalSearch", (string)null); + b.ToTable("Sas_T_GlobalSearch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => @@ -4484,7 +4310,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_InstallmentOption", (string)null); + b.ToTable("Adm_T_InstallmentOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => @@ -4537,7 +4363,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_Interesting", (string)null); + b.ToTable("Prt_T_Interesting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -4595,7 +4421,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_IpRestriction", (string)null); + b.ToTable("Sas_T_IpRestriction", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => @@ -4687,7 +4513,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DepartmentId"); - b.ToTable("T_Hr_JobPosition", (string)null); + b.ToTable("Hr_T_JobPosition", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => @@ -4784,7 +4610,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Lawyer", (string)null); + b.ToTable("Adm_T_Lawyer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Leave", b => @@ -4876,7 +4702,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Leave", (string)null); + b.ToTable("Hr_T_Leave", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => @@ -4948,7 +4774,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_LessonPeriod", (string)null); + b.ToTable("Crd_B_LessonPeriod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Level", b => @@ -5026,7 +4852,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("B_Crd_Level", (string)null); + b.ToTable("Crd_B_Level", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => @@ -5318,7 +5144,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ListForm", (string)null); + b.ToTable("Sas_P_ListForm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -5383,7 +5209,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormCustomization", (string)null); + b.ToTable("Sas_P_ListFormCustomization", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => @@ -5550,7 +5376,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormField", (string)null); + b.ToTable("Sas_P_ListFormField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => @@ -5610,7 +5436,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormImport", (string)null); + b.ToTable("Sas_P_ListFormImport", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => @@ -5680,7 +5506,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ImportId"); - b.ToTable("P_Sas_ListFormImportExecute", (string)null); + b.ToTable("Sas_P_ListFormImportExecute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b => @@ -5748,7 +5574,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ParentGroupId"); - b.ToTable("T_Scp_MaterialGroup", (string)null); + b.ToTable("Scp_T_MaterialGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MaterialType", b => @@ -5811,7 +5637,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_MaterialType", (string)null); + b.ToTable("Scp_T_MaterialType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => @@ -5873,7 +5699,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Net_Meal", (string)null); + b.ToTable("Net_B_Meal", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => @@ -5932,7 +5758,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_MeetingMethod", (string)null); + b.ToTable("Prt_T_MeetingMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => @@ -5989,7 +5815,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_MeetingResult", (string)null); + b.ToTable("Prt_T_MeetingResult", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => @@ -6085,7 +5911,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_Menu", (string)null); + b.ToTable("Sas_P_Menu", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => @@ -6134,7 +5960,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_NoteType", (string)null); + b.ToTable("Prt_T_NoteType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Order", b => @@ -6267,7 +6093,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Order", (string)null); + b.ToTable("Adm_T_Order", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -6332,7 +6158,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("T_Adm_OrderItem", (string)null); + b.ToTable("Adm_T_OrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Overtime", b => @@ -6421,83 +6247,153 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Overtime", (string)null); + b.ToTable("Hr_T_Overtime", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Address1") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Address2") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); - b.Property("City") - .HasColumnType("nvarchar(max)"); - - b.Property("Code") - .HasColumnType("nvarchar(max)"); - - b.Property("Country") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") + b.Property("AssignedEmployeeId") .HasColumnType("uniqueidentifier"); + b.Property("AverageOrderValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CardNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + b.Property("CreditLimit") - .HasColumnType("decimal(18,2)"); + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") + b.Property("CurrentBalance") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CustomerSegmentId") .HasColumnType("uniqueidentifier"); + b.Property("CustomerTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + b.Property("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiscountRate") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("District") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Email") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Fax") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("IsDeleted") - .HasColumnType("bit"); + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("LastOrderDate") + b.Property("LastOrderDate") .HasColumnType("datetime2"); + b.Property("LifetimeValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + b.Property("Mobile") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("Name") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PartyType") + .HasColumnType("int"); b.Property("PaymentTermId") .HasColumnType("uniqueidentifier"); + b.Property("PerformanceMetricsJson") + .HasColumnType("text"); + b.Property("Phone") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("PostalCode") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); b.Property("SectorId") .HasColumnType("uniqueidentifier"); @@ -6506,29 +6402,65 @@ namespace Kurs.Platform.Migrations .HasColumnType("int"); b.Property("Street") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SupplierTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SupplyCardTypeId") + .HasColumnType("uniqueidentifier"); b.Property("TaxNumber") .HasColumnType("bigint"); b.Property("TaxOffice") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TeamCode") + .HasMaxLength(95) + .HasColumnType("nvarchar(95)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalRevenue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("ValidFrom") + .HasColumnType("datetime2"); + + b.Property("ValidTo") + .HasColumnType("datetime2"); b.Property("Website") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); + b.HasIndex("AssignedEmployeeId"); + b.HasIndex("CurrencyId"); + b.HasIndex("CustomerSegmentId"); + + b.HasIndex("CustomerTypeId"); + b.HasIndex("PaymentTermId"); b.HasIndex("SectorId"); - b.ToTable("Partners"); + b.HasIndex("SupplierTypeId"); + + b.HasIndex("SupplyCardTypeId"); + + b.ToTable("Adm_T_Partner", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => @@ -6551,8 +6483,10 @@ namespace Kurs.Platform.Migrations .HasColumnType("nvarchar(64)"); b.Property("Balance") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("BankName") .IsRequired() @@ -6574,12 +6508,11 @@ namespace Kurs.Platform.Migrations b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DailyTransferLimit") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -6619,15 +6552,14 @@ namespace Kurs.Platform.Migrations .HasColumnName("LastModifierId"); b.Property("OverdraftLimit") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("SwiftCode") .HasMaxLength(11) .HasColumnType("nvarchar(11)"); @@ -6640,13 +6572,9 @@ namespace Kurs.Platform.Migrations b.HasIndex("CurrencyId"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerBank", (string)null); + b.ToTable("Adm_T_PartnerBank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => @@ -6667,9 +6595,6 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -6705,22 +6630,15 @@ namespace Kurs.Platform.Migrations b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.HasKey("Id"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerCertificate", (string)null); + b.ToTable("Adm_T_PartnerCertificate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", b => @@ -6736,9 +6654,6 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -6795,9 +6710,6 @@ namespace Kurs.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -6808,13 +6720,9 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerContact", (string)null); + b.ToTable("Adm_T_PartnerContact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -6871,7 +6779,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_PaymentMethod", (string)null); + b.ToTable("Adm_T_PaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentTerm", b => @@ -6920,7 +6828,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_PaymentTerm", (string)null); + b.ToTable("Scp_T_PaymentTerm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b => @@ -7008,7 +6916,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Payroll", (string)null); + b.ToTable("Hr_T_Payroll", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b => @@ -7081,7 +6989,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("PayrollItemId"); - b.ToTable("T_Hr_PayrollItem", (string)null); + b.ToTable("Hr_T_PayrollItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => @@ -7158,7 +7066,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Hr_Performance360", (string)null); + b.ToTable("Hr_T_Performance360", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -7234,7 +7142,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Product", (string)null); + b.ToTable("Adm_T_Product", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Program", b => @@ -7287,7 +7195,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_Program", (string)null); + b.ToTable("Crd_T_Program", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => @@ -7352,7 +7260,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Psychologist", (string)null); + b.ToTable("Adm_T_Psychologist", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Question", b => @@ -7445,7 +7353,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionPoolId"); - b.ToTable("T_Crd_Question", (string)null); + b.ToTable("Crd_T_Question", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", b => @@ -7506,7 +7414,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("T_Crd_QuestionOption", (string)null); + b.ToTable("Crd_T_QuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", b => @@ -7563,7 +7471,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_QuestionPool", (string)null); + b.ToTable("Crd_T_QuestionPool", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b => @@ -7625,7 +7533,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_QuestionTag", (string)null); + b.ToTable("Crd_T_QuestionTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => @@ -7685,7 +7593,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("B_Crd_RegistrationMethod", (string)null); + b.ToTable("Crd_B_RegistrationMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => @@ -7741,7 +7649,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_RegistrationType", (string)null); + b.ToTable("Crd_B_RegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -7798,7 +7706,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_ReportCategory", (string)null); + b.ToTable("Sas_T_ReportCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => @@ -7860,7 +7768,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Sas_ReportGenerated", (string)null); + b.ToTable("Sas_T_ReportGenerated", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => @@ -7933,7 +7841,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Sas_ReportParameter", (string)null); + b.ToTable("Sas_T_ReportParameter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => @@ -7999,7 +7907,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CategoryId"); - b.ToTable("T_Sas_ReportTemplate", (string)null); + b.ToTable("Sas_T_ReportTemplate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b => @@ -8081,7 +7989,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Reservation", (string)null); + b.ToTable("Net_T_Reservation", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Route", b => @@ -8146,7 +8054,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("P_Sas_Route", (string)null); + b.ToTable("Sas_P_Route", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => @@ -8203,7 +8111,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_SalesRejectionReason", (string)null); + b.ToTable("Prt_T_SalesRejectionReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => @@ -8307,7 +8215,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_Schedule", (string)null); + b.ToTable("Crd_B_Schedule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => @@ -8380,7 +8288,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ScheduleId"); - b.ToTable("B_Crd_ScheduleLesson", (string)null); + b.ToTable("Crd_B_ScheduleLesson", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => @@ -8429,7 +8337,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Sector", (string)null); + b.ToTable("Sas_T_Sector", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Service", b => @@ -8492,7 +8400,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Service", (string)null); + b.ToTable("Adm_T_Service", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ShuttleRoute", b => @@ -8567,7 +8475,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_ShuttleRoute", (string)null); + b.ToTable("Net_T_ShuttleRoute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -8621,7 +8529,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("T_Adm_Skill", (string)null); + b.ToTable("Adm_T_Skill", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => @@ -8685,7 +8593,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("T_Adm_SkillLevel", (string)null); + b.ToTable("Adm_T_SkillLevel", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => @@ -8734,7 +8642,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_SkillType", (string)null); + b.ToTable("Adm_T_SkillType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialComment", b => @@ -8793,7 +8701,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("T_Net_SocialComment", (string)null); + b.ToTable("Net_T_SocialComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialLike", b => @@ -8847,7 +8755,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("T_Net_SocialLike", (string)null); + b.ToTable("Net_T_SocialLike", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialLocation", b => @@ -8916,7 +8824,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("T_Net_SocialLocation", (string)null); + b.ToTable("Net_T_SocialLocation", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialMedia", b => @@ -8987,7 +8895,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("T_Net_SocialMedia", (string)null); + b.ToTable("Net_T_SocialMedia", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialPollOption", b => @@ -9044,7 +8952,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialMediaId"); - b.ToTable("T_Net_SocialPollOption", (string)null); + b.ToTable("Net_T_SocialPollOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialPost", b => @@ -9113,7 +9021,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_SocialPost", (string)null); + b.ToTable("Net_T_SocialPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Source", b => @@ -9166,150 +9074,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_Source", (string)null); - }); - - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address1") - .HasColumnType("nvarchar(max)"); - - b.Property("Address2") - .HasColumnType("nvarchar(max)"); - - b.Property("CardNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("City") - .HasColumnType("nvarchar(max)"); - - b.Property("Code") - .HasColumnType("nvarchar(max)"); - - b.Property("Country") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreditLimit") - .HasColumnType("decimal(18,2)"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("CurrentBalance") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DiscountRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("District") - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasColumnType("nvarchar(max)"); - - b.Property("Fax") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastOrderDate") - .HasColumnType("datetime2"); - - b.Property("Mobile") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PartyType") - .HasColumnType("int"); - - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); - - b.Property("PerformanceMetricsJson") - .HasColumnType("text"); - - b.Property("Phone") - .HasColumnType("nvarchar(max)"); - - b.Property("PostalCode") - .HasColumnType("nvarchar(max)"); - - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Street") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("SupplyCardTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TaxNumber") - .HasColumnType("bigint"); - - b.Property("TaxOffice") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ValidFrom") - .HasColumnType("datetime2"); - - b.Property("ValidTo") - .HasColumnType("datetime2"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CurrencyId"); - - b.HasIndex("PaymentTermId"); - - b.HasIndex("SectorId"); - - b.HasIndex("SupplierTypeId"); - - b.HasIndex("SupplyCardTypeId"); - - b.ToTable("T_Scp_Supply", (string)null); + b.ToTable("Prt_T_Source", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", b => @@ -9367,7 +9132,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_SupplyCardType", (string)null); + b.ToTable("Scp_T_SupplyCardType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", b => @@ -9425,7 +9190,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_SupplyType", (string)null); + b.ToTable("Scp_T_SupplyType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => @@ -9494,7 +9259,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Survey", (string)null); + b.ToTable("Hr_T_Survey", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", b => @@ -9557,7 +9322,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResponseId"); - b.ToTable("T_Hr_SurveyAnswer", (string)null); + b.ToTable("Hr_T_SurveyAnswer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestion", b => @@ -9622,7 +9387,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SurveyId"); - b.ToTable("T_Hr_SurveyQuestion", (string)null); + b.ToTable("Hr_T_SurveyQuestion", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestionOption", b => @@ -9679,7 +9444,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("T_Hr_SurveyQuestionOption", (string)null); + b.ToTable("Hr_T_SurveyQuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyResponse", b => @@ -9736,7 +9501,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SurveyId"); - b.ToTable("T_Hr_SurveyResponse", (string)null); + b.ToTable("Hr_T_SurveyResponse", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => @@ -9801,7 +9566,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Template360", (string)null); + b.ToTable("Hr_T_Template360", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Training", b => @@ -9904,7 +9669,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_Training", (string)null); + b.ToTable("Net_T_Training", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => @@ -9974,7 +9739,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("UomCategoryId"); - b.ToTable("T_Adm_Uom", (string)null); + b.ToTable("Adm_T_Uom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => @@ -10023,7 +9788,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_UomCategory", (string)null); + b.ToTable("Adm_T_UomCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => @@ -10072,7 +9837,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Vaccine", (string)null); + b.ToTable("Adm_T_Vaccine", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => @@ -10164,7 +9929,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Vehicle", (string)null); + b.ToTable("Adm_T_Vehicle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Visitor", b => @@ -10255,7 +10020,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Visitor", (string)null); + b.ToTable("Net_T_Visitor", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => @@ -10335,7 +10100,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_WorkHour", (string)null); + b.ToTable("Adm_T_WorkHour", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => @@ -10425,7 +10190,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("P_Sas_ForumCategory", (string)null); + b.ToTable("Sas_P_ForumCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => @@ -10495,7 +10260,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("P_Sas_ForumPost", (string)null); + b.ToTable("Sas_P_ForumPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => @@ -10594,7 +10359,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("P_Sas_ForumTopic", (string)null); + b.ToTable("Sas_P_ForumTopic", (string)null); }); modelBuilder.Entity("Kurs.Settings.Entities.SettingDefinition", b => @@ -12748,49 +12513,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Entity"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.HasOne("Kurs.Platform.Entities.Employee", "AssignedEmployee") - .WithMany() - .HasForeignKey("AssignedEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Kurs.Platform.Entities.Currency", "Currency") - .WithMany() - .HasForeignKey("CurrencyId"); - - b.HasOne("Kurs.Platform.Entities.CustomerSegment", "CustomerSegment") - .WithMany("Customers") - .HasForeignKey("CustomerSegmentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.CustomerType", "CustomerType") - .WithMany("Customers") - .HasForeignKey("CustomerTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") - .WithMany() - .HasForeignKey("PaymentTermId"); - - b.HasOne("Kurs.Platform.Entities.Sector", "Sector") - .WithMany() - .HasForeignKey("SectorId"); - - b.Navigation("AssignedEmployee"); - - b.Navigation("Currency"); - - b.Navigation("CustomerSegment"); - - b.Navigation("CustomerType"); - - b.Navigation("PaymentTerm"); - - b.Navigation("Sector"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { b.HasOne("Kurs.Platform.Entities.CostCenter", "CostCenter") @@ -13032,10 +12754,25 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => { + b.HasOne("Kurs.Platform.Entities.Employee", "AssignedEmployee") + .WithMany("Partners") + .HasForeignKey("AssignedEmployeeId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") .WithMany() .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.CustomerSegment", "CustomerSegment") + .WithMany("Partners") + .HasForeignKey("CustomerSegmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.CustomerType", "CustomerType") + .WithMany("Partners") + .HasForeignKey("CustomerTypeId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") .WithMany() .HasForeignKey("PaymentTermId"); @@ -13044,11 +12781,31 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("SectorId"); + b.HasOne("Kurs.Platform.Entities.SupplyType", "SupplierType") + .WithMany("Partners") + .HasForeignKey("SupplierTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.SupplyCardType", "SupplyCardType") + .WithMany("Partners") + .HasForeignKey("SupplyCardTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AssignedEmployee"); + b.Navigation("Currency"); + b.Navigation("CustomerSegment"); + + b.Navigation("CustomerType"); + b.Navigation("PaymentTerm"); b.Navigation("Sector"); + + b.Navigation("SupplierType"); + + b.Navigation("SupplyCardType"); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => @@ -13057,20 +12814,12 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("CurrencyId"); - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Banks") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Banks") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Banks") - .HasForeignKey("SupplyId"); - b.Navigation("Currency"); b.Navigation("Partner"); @@ -13078,39 +12827,23 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => { - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Certificates") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Certificates") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Certificates") - .HasForeignKey("SupplyId"); - b.Navigation("Partner"); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", b => { - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Contacts") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Contacts") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Contacts") - .HasForeignKey("SupplyId"); - b.Navigation("Partner"); }); @@ -13327,41 +13060,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.HasOne("Kurs.Platform.Entities.Currency", "Currency") - .WithMany() - .HasForeignKey("CurrencyId"); - - b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") - .WithMany() - .HasForeignKey("PaymentTermId"); - - b.HasOne("Kurs.Platform.Entities.Sector", "Sector") - .WithMany() - .HasForeignKey("SectorId"); - - b.HasOne("Kurs.Platform.Entities.SupplyType", "SupplierType") - .WithMany("Supplies") - .HasForeignKey("SupplierTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.SupplyCardType", "SupplyCardType") - .WithMany("Supplies") - .HasForeignKey("SupplyCardTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Currency"); - - b.Navigation("PaymentTerm"); - - b.Navigation("Sector"); - - b.Navigation("SupplierType"); - - b.Navigation("SupplyCardType"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", b => { b.HasOne("Kurs.Platform.Entities.SurveyQuestion", "Question") @@ -13674,23 +13372,14 @@ namespace Kurs.Platform.Migrations b.Navigation("Fields"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.Navigation("Banks"); - - b.Navigation("Certificates"); - - b.Navigation("Contacts"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", b => { - b.Navigation("Customers"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", b => { - b.Navigation("Customers"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.Department", b => @@ -13712,6 +13401,8 @@ namespace Kurs.Platform.Migrations b.Navigation("Overtimes"); + b.Navigation("Partners"); + b.Navigation("Reservations"); b.Navigation("SurveyResponses"); @@ -13817,23 +13508,14 @@ namespace Kurs.Platform.Migrations b.Navigation("Media"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.Navigation("Banks"); - - b.Navigation("Certificates"); - - b.Navigation("Contacts"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", b => { - b.Navigation("Supplies"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", b => { - b.Navigation("Supplies"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.cs similarity index 86% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.cs index 1e8b2daf..58f012da 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251031221233_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251101080853_Initial.cs @@ -435,7 +435,534 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "B_Crd_LessonPeriod", + name: "Acc_T_Bank", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + IdentifierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Address1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Address2 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Acc_T_Bank", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_About", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + StatsJson = table.Column(type: "text", nullable: true), + DescriptionsJson = table.Column(type: "text", nullable: true), + SectionsJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_About", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Behavior", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Behavior", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_BlogCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Icon = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + DisplayOrder = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + PostCount = table.Column(type: "int", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_BlogCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Contact", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Address = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Phone = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), + Location = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), + TaxNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + BankJson = table.Column(type: "text", nullable: true), + WorkHoursJson = table.Column(type: "text", nullable: true), + MapJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Contact", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Demo", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + FullName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + NumberOfBranches = table.Column(type: "int", nullable: false), + NumberOfUsers = table.Column(type: "int", nullable: false), + Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Demo", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Disease", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Disease", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Document", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(80)", maxLength: 80, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Document", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EducationStatus", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Order = table.Column(type: "smallint", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_EducationStatus", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_InstallmentOption", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Installment = table.Column(type: "int", nullable: false), + Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_InstallmentOption", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Lawyer", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + ContactPerson = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + TaxOffice = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone3 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone4 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Fax = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Lawyer", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Order", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + VknTckn = table.Column(type: "bigint", nullable: false), + TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Address1 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Phone = table.Column(type: "nvarchar(max)", nullable: true), + Mobile = table.Column(type: "nvarchar(max)", nullable: true), + Fax = table.Column(type: "nvarchar(max)", nullable: true), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + PaymentMethodId = table.Column(type: "uniqueidentifier", nullable: false), + Installment = table.Column(type: "int", nullable: true), + PaymentDataJson = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Order", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_PaymentMethod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), + Logo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_PaymentMethod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Product", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Order = table.Column(type: "int", nullable: false), + MonthlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + YearlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + IsQuantityBased = table.Column(type: "bit", nullable: false), + ImageUrl = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Product", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Psychologist", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Psychologist", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Service", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Type = table.Column(type: "nvarchar(max)", nullable: true), + Features = table.Column(type: "nvarchar(max)", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Service", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SkillType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SkillType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_UomCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_UomCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Vaccine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Vaccine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Vehicle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Plate = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + Brand = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ModelYear = table.Column(type: "int", nullable: true), + DriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), + DriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + DriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + AssistantDriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), + AssistantDriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + AssistantDriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + AssistantDriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Status = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Vehicle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_WorkHour", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + StartHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + EndHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Monday = table.Column(type: "bit", nullable: true), + Tuesday = table.Column(type: "bit", nullable: true), + Wednesday = table.Column(type: "bit", nullable: true), + Thursday = table.Column(type: "bit", nullable: true), + Friday = table.Column(type: "bit", nullable: true), + Saturday = table.Column(type: "bit", nullable: true), + Sunday = table.Column(type: "bit", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_WorkHour", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_LessonPeriod", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -457,11 +984,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_LessonPeriod", x => x.Id); + table.PrimaryKey("PK_Crd_B_LessonPeriod", x => x.Id); }); migrationBuilder.CreateTable( - name: "B_Crd_RegistrationType", + name: "Crd_B_RegistrationType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -479,11 +1006,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_RegistrationType", x => x.Id); + table.PrimaryKey("PK_Crd_B_RegistrationType", x => x.Id); }); migrationBuilder.CreateTable( - name: "B_Crd_Schedule", + name: "Crd_B_Schedule", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -516,11 +1043,305 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_Schedule", x => x.Id); + table.PrimaryKey("PK_Crd_B_Schedule", x => x.Id); }); migrationBuilder.CreateTable( - name: "B_Net_Meal", + name: "Crd_T_ClassCancellationReason", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_ClassCancellationReason", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_Classroom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Subject = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + TeacherId = table.Column(type: "uniqueidentifier", nullable: true), + TeacherName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + ScheduledStartTime = table.Column(type: "datetime2", nullable: false), + ScheduledEndTime = table.Column(type: "datetime2", nullable: true), + Duration = table.Column(type: "int", nullable: false), + ActualStartTime = table.Column(type: "datetime2", nullable: true), + ActualEndTime = table.Column(type: "datetime2", nullable: true), + MaxParticipants = table.Column(type: "int", nullable: false), + ParticipantCount = table.Column(type: "int", nullable: false), + SettingsJson = table.Column(type: "nvarchar(max)", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_Classroom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_Program", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_Program", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_QuestionPool", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Tags = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_QuestionPool", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_QuestionTag", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Color = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: true), + UsageCount = table.Column(type: "int", nullable: false, defaultValue: 0), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_QuestionTag", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crm_T_CustomerSegment", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crm_T_CustomerSegment", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Crm_T_CustomerType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crm_T_CustomerType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_Badge", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Icon = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Color = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + BackgroundColor = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Category = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Criteria = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Points = table.Column(type: "int", nullable: false), + Rarity = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_Badge", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_EmploymentType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_EmploymentType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_Payroll", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + PeriodYear = table.Column(type: "int", nullable: false), + PeriodMonth = table.Column(type: "int", maxLength: 20, nullable: false), + BaseSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + Overtime = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + Bonus = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + GrossSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + NetSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + Tax = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + SocialSecurity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + Status = table.Column(type: "nvarchar(max)", nullable: true), + PaymentDate = table.Column(type: "datetime2", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_Payroll", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_Survey", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Deadline = table.Column(type: "datetime2", nullable: false), + Responses = table.Column(type: "int", nullable: false, defaultValue: 0), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + IsAnonymous = table.Column(type: "bit", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_Survey", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_Template360", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + AssessorTypes = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + QuestionGroupsJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_Template360", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Net_B_Meal", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -540,7 +1361,105 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Net_Meal", x => x.Id); + table.PrimaryKey("PK_Net_B_Meal", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Net_T_EventCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Net_T_EventCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Net_T_EventType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Net_T_EventType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Net_T_ShuttleRoute", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + DepartureTime = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + ArrivalTime = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), + Available = table.Column(type: "int", nullable: false, defaultValue: 0), + Route = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Net_T_ShuttleRoute", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Net_T_Training", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Instructor = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Category = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Duration = table.Column(type: "int", nullable: false, defaultValue: 0), + StartDate = table.Column(type: "datetime2", nullable: false), + EndDate = table.Column(type: "datetime2", nullable: false), + MaxParticipants = table.Column(type: "int", nullable: false, defaultValue: 0), + Enrolled = table.Column(type: "int", nullable: false, defaultValue: 0), + Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Location = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Thumbnail = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Net_T_Training", x => x.Id); }); migrationBuilder.CreateTable( @@ -606,44 +1525,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); }); - migrationBuilder.CreateTable( - name: "P_P_AiBot", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BotName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_P_P_AiBot", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "P_P_BackgroundWorker", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Cron = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - WorkerType = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - DataSourceCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - BeforeSp = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - AfterSp = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - Options = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_P_P_BackgroundWorker", x => x.Id); - }); - migrationBuilder.CreateTable( name: "P_P_BackgroundWorker_MailQueueTableFormat", columns: table => new @@ -773,7 +1654,173 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "P_Sas_ContactTag", + name: "Plat_P_AiBot", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BotName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Plat_P_AiBot", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Plat_P_BackgroundWorker", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Cron = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + WorkerType = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + DataSourceCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + BeforeSp = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + AfterSp = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Options = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Plat_P_BackgroundWorker", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_Interesting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_Interesting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_MeetingMethod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_MeetingMethod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_MeetingResult", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Order = table.Column(type: "smallint", nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_MeetingResult", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_NoteType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_NoteType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_SalesRejectionReason", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Category = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_SalesRejectionReason", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Prt_T_Source", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Prt_T_Source", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_P_ContactTag", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -789,11 +1836,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ContactTag", x => x.Id); + table.PrimaryKey("PK_Sas_P_ContactTag", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_ContactTitle", + name: "Sas_P_ContactTitle", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -809,11 +1856,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ContactTitle", x => x.Id); + table.PrimaryKey("PK_Sas_P_ContactTitle", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_CountryGroup", + name: "Sas_P_CountryGroup", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -828,12 +1875,12 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_CountryGroup", x => x.Id); - table.UniqueConstraint("AK_P_Sas_CountryGroup_Name", x => x.Name); + table.PrimaryKey("PK_Sas_P_CountryGroup", x => x.Id); + table.UniqueConstraint("AK_Sas_P_CountryGroup_Name", x => x.Name); }); migrationBuilder.CreateTable( - name: "P_Sas_Currency", + name: "Sas_P_Currency", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -853,11 +1900,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_Currency", x => x.Id); + table.PrimaryKey("PK_Sas_P_Currency", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_DataSource", + name: "Sas_P_DataSource", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -874,11 +1921,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_DataSource", x => x.Id); + table.PrimaryKey("PK_Sas_P_DataSource", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_ForumCategory", + name: "Sas_P_ForumCategory", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -906,11 +1953,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ForumCategory", x => x.Id); + table.PrimaryKey("PK_Sas_P_ForumCategory", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_ListForm", + name: "Sas_P_ListForm", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1002,12 +2049,12 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ListForm", x => x.Id); - table.UniqueConstraint("AK_P_Sas_ListForm_ListFormCode", x => x.ListFormCode); + table.PrimaryKey("PK_Sas_P_ListForm", x => x.Id); + table.UniqueConstraint("AK_Sas_P_ListForm_ListFormCode", x => x.ListFormCode); }); migrationBuilder.CreateTable( - name: "P_Sas_Menu", + name: "Sas_P_Menu", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1035,11 +2082,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_Menu", x => x.Id); + table.PrimaryKey("PK_Sas_P_Menu", x => x.Id); }); migrationBuilder.CreateTable( - name: "P_Sas_Route", + name: "Sas_P_Route", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1058,1058 +2105,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_Route", x => x.Id); + table.PrimaryKey("PK_Sas_P_Route", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Acc_Bank", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - IdentifierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Address1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Address2 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Acc_Bank", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_About", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - StatsJson = table.Column(type: "text", nullable: true), - DescriptionsJson = table.Column(type: "text", nullable: true), - SectionsJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_About", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Behavior", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Behavior", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_BlogCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Icon = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - DisplayOrder = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - PostCount = table.Column(type: "int", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_BlogCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Contact", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Address = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Phone = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), - Location = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), - TaxNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - BankJson = table.Column(type: "text", nullable: true), - WorkHoursJson = table.Column(type: "text", nullable: true), - MapJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Contact", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Demo", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - FullName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - NumberOfBranches = table.Column(type: "int", nullable: false), - NumberOfUsers = table.Column(type: "int", nullable: false), - Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Demo", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Disease", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Disease", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Document", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(80)", maxLength: 80, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Document", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_EducationStatus", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Order = table.Column(type: "smallint", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_EducationStatus", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_InstallmentOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Installment = table.Column(type: "int", nullable: false), - Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_InstallmentOption", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Lawyer", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - ContactPerson = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), - TaxOffice = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - TaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Phone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Phone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Phone3 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Phone4 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Fax = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Lawyer", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Order", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsActive = table.Column(type: "bit", nullable: false), - OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VknTckn = table.Column(type: "bigint", nullable: false), - TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Address1 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - Phone = table.Column(type: "nvarchar(max)", nullable: true), - Mobile = table.Column(type: "nvarchar(max)", nullable: true), - Fax = table.Column(type: "nvarchar(max)", nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - PaymentMethodId = table.Column(type: "uniqueidentifier", nullable: false), - Installment = table.Column(type: "int", nullable: true), - PaymentDataJson = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Order", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_PaymentMethod", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), - Logo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_PaymentMethod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Product", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Order = table.Column(type: "int", nullable: false), - MonthlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - YearlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - IsQuantityBased = table.Column(type: "bit", nullable: false), - ImageUrl = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Product", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Psychologist", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Psychologist", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Service", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Type = table.Column(type: "nvarchar(max)", nullable: true), - Features = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Service", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_SkillType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_SkillType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_UomCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_UomCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Vaccine", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Vaccine", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Vehicle", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Plate = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - Brand = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - ModelYear = table.Column(type: "int", nullable: true), - DriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), - DriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - DriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - DriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - AssistantDriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), - AssistantDriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - AssistantDriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - AssistantDriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Status = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Vehicle", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_WorkHour", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - StartHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - EndHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - Monday = table.Column(type: "bit", nullable: true), - Tuesday = table.Column(type: "bit", nullable: true), - Wednesday = table.Column(type: "bit", nullable: true), - Thursday = table.Column(type: "bit", nullable: true), - Friday = table.Column(type: "bit", nullable: true), - Saturday = table.Column(type: "bit", nullable: true), - Sunday = table.Column(type: "bit", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_WorkHour", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_ClassCancellationReason", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_ClassCancellationReason", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_Classroom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Subject = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - TeacherId = table.Column(type: "uniqueidentifier", nullable: true), - TeacherName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - ScheduledStartTime = table.Column(type: "datetime2", nullable: false), - ScheduledEndTime = table.Column(type: "datetime2", nullable: true), - Duration = table.Column(type: "int", nullable: false), - ActualStartTime = table.Column(type: "datetime2", nullable: true), - ActualEndTime = table.Column(type: "datetime2", nullable: true), - MaxParticipants = table.Column(type: "int", nullable: false), - ParticipantCount = table.Column(type: "int", nullable: false), - SettingsJson = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_Classroom", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_Program", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_Program", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_QuestionPool", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Tags = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_QuestionPool", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_QuestionTag", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Color = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: true), - UsageCount = table.Column(type: "int", nullable: false, defaultValue: 0), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_QuestionTag", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crm_CustomerSegment", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crm_CustomerSegment", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Crm_CustomerType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crm_CustomerType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_Badge", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Icon = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Color = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - BackgroundColor = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Category = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - Criteria = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Points = table.Column(type: "int", nullable: false), - Rarity = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_Badge", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_EmploymentType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_EmploymentType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_Payroll", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - PeriodYear = table.Column(type: "int", nullable: false), - PeriodMonth = table.Column(type: "int", maxLength: 20, nullable: false), - BaseSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - Overtime = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - Bonus = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - GrossSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - NetSalary = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - Tax = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - SocialSecurity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - Status = table.Column(type: "nvarchar(max)", nullable: true), - PaymentDate = table.Column(type: "datetime2", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_Payroll", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_Survey", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - Deadline = table.Column(type: "datetime2", nullable: false), - Responses = table.Column(type: "int", nullable: false, defaultValue: 0), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - IsAnonymous = table.Column(type: "bit", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_Survey", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_Template360", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - AssessorTypes = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - QuestionGroupsJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_Template360", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Net_EventCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Net_EventCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Net_EventType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Net_EventType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Net_ShuttleRoute", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), - DepartureTime = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - ArrivalTime = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), - Available = table.Column(type: "int", nullable: false, defaultValue: 0), - Route = table.Column(type: "nvarchar(max)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Net_ShuttleRoute", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Net_Training", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Instructor = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Category = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Duration = table.Column(type: "int", nullable: false, defaultValue: 0), - StartDate = table.Column(type: "datetime2", nullable: false), - EndDate = table.Column(type: "datetime2", nullable: false), - MaxParticipants = table.Column(type: "int", nullable: false, defaultValue: 0), - Enrolled = table.Column(type: "int", nullable: false, defaultValue: 0), - Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Location = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Thumbnail = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Net_Training", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_Interesting", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_Interesting", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_MeetingMethod", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_MeetingMethod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_MeetingResult", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Order = table.Column(type: "smallint", nullable: true), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_MeetingResult", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_NoteType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_NoteType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_SalesRejectionReason", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Category = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_SalesRejectionReason", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Prt_Source", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Prt_Source", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "T_Sas_Activity", + name: "Sas_T_Activity", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2130,11 +2130,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_Activity", x => x.Id); + table.PrimaryKey("PK_Sas_T_Activity", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_Branch", + name: "Sas_T_Branch", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2166,11 +2166,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_Branch", x => x.Id); + table.PrimaryKey("PK_Sas_T_Branch", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_BranchUsers", + name: "Sas_T_BranchUsers", columns: table => new { BranchId = table.Column(type: "uniqueidentifier", nullable: false), @@ -2180,11 +2180,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_BranchUsers", x => new { x.UserId, x.BranchId }); + table.PrimaryKey("PK_Sas_T_BranchUsers", x => new { x.UserId, x.BranchId }); }); migrationBuilder.CreateTable( - name: "T_Sas_CustomComponent", + name: "Sas_T_CustomComponent", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2205,11 +2205,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_CustomComponent", x => x.Id); + table.PrimaryKey("PK_Sas_T_CustomComponent", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_CustomEndpoint", + name: "Sas_T_CustomEndpoint", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2232,11 +2232,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_CustomEndpoint", x => x.Id); + table.PrimaryKey("PK_Sas_T_CustomEndpoint", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_CustomEntity", + name: "Sas_T_CustomEntity", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2261,11 +2261,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_CustomEntity", x => x.Id); + table.PrimaryKey("PK_Sas_T_CustomEntity", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_GlobalSearch", + name: "Sas_T_GlobalSearch", columns: table => new { Id = table.Column(type: "int", nullable: false) @@ -2279,11 +2279,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_GlobalSearch", x => x.Id); + table.PrimaryKey("PK_Sas_T_GlobalSearch", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_IpRestriction", + name: "Sas_T_IpRestriction", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2301,11 +2301,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_IpRestriction", x => x.Id); + table.PrimaryKey("PK_Sas_T_IpRestriction", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_ReportCategory", + name: "Sas_T_ReportCategory", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2323,11 +2323,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ReportCategory", x => x.Id); + table.PrimaryKey("PK_Sas_T_ReportCategory", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Sas_Sector", + name: "Sas_T_Sector", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2343,11 +2343,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_Sector", x => x.Id); + table.PrimaryKey("PK_Sas_T_Sector", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Scp_MaterialGroup", + name: "Scp_T_MaterialGroup", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2367,17 +2367,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Scp_MaterialGroup", x => x.Id); + table.PrimaryKey("PK_Scp_T_MaterialGroup", x => x.Id); table.ForeignKey( - name: "FK_T_Scp_MaterialGroup_T_Scp_MaterialGroup_ParentGroupId", + name: "FK_Scp_T_MaterialGroup_Scp_T_MaterialGroup_ParentGroupId", column: x => x.ParentGroupId, - principalTable: "T_Scp_MaterialGroup", + principalTable: "Scp_T_MaterialGroup", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Scp_MaterialType", + name: "Scp_T_MaterialType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2396,11 +2396,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Scp_MaterialType", x => x.Id); + table.PrimaryKey("PK_Scp_T_MaterialType", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Scp_PaymentTerm", + name: "Scp_T_PaymentTerm", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2416,11 +2416,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Scp_PaymentTerm", x => x.Id); + table.PrimaryKey("PK_Scp_T_PaymentTerm", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Scp_SupplyCardType", + name: "Scp_T_SupplyCardType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2438,11 +2438,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Scp_SupplyCardType", x => x.Id); + table.PrimaryKey("PK_Scp_T_SupplyCardType", x => x.Id); }); migrationBuilder.CreateTable( - name: "T_Scp_SupplyType", + name: "Scp_T_SupplyType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2460,7 +2460,7 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Scp_SupplyType", x => x.Id); + table.PrimaryKey("PK_Scp_T_SupplyType", x => x.Id); }); migrationBuilder.CreateTable( @@ -2696,7 +2696,195 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "B_Crd_ClassType", + name: "Acc_T_BankAccount", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + AccountNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BankId = table.Column(type: "uniqueidentifier", nullable: false), + AccountOwner = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), + CanTransferMoney = table.Column(type: "bit", nullable: false), + Company = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Acc_T_BankAccount", x => x.Id); + table.ForeignKey( + name: "FK_Acc_T_BankAccount_Acc_T_Bank_BankId", + column: x => x.BankId, + principalTable: "Acc_T_Bank", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_BlogPost", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ContentTr = table.Column(type: "nvarchar(max)", nullable: false), + ContentEn = table.Column(type: "nvarchar(max)", nullable: false), + Summary = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + CoverImage = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + ReadTime = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + AuthorId = table.Column(type: "uniqueidentifier", nullable: false), + ViewCount = table.Column(type: "int", nullable: true), + LikeCount = table.Column(type: "int", nullable: true), + CommentCount = table.Column(type: "int", nullable: true), + IsPublished = table.Column(type: "bit", nullable: false), + PublishedAt = table.Column(type: "datetime2", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_BlogPost", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_BlogPost_Adm_T_BlogCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Adm_T_BlogCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_OrderItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OrderId = table.Column(type: "uniqueidentifier", nullable: false), + ProductId = table.Column(type: "uniqueidentifier", nullable: false), + ProductName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + BillingCycle = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Quantity = table.Column(type: "int", nullable: false), + TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_OrderItem", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_OrderItem_Adm_T_Order_OrderId", + column: x => x.OrderId, + principalTable: "Adm_T_Order", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Skill", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Skill", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Skill_Adm_T_SkillType_SkillTypeId", + column: x => x.SkillTypeId, + principalTable: "Adm_T_SkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SkillLevel", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Progress = table.Column(type: "int", nullable: false, defaultValue: 0), + IsDefault = table.Column(type: "bit", nullable: false, defaultValue: false), + SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SkillLevel", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SkillLevel_Adm_T_SkillType_SkillTypeId", + column: x => x.SkillTypeId, + principalTable: "Adm_T_SkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Uom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UomCategoryId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + Rounding = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Uom", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Uom_Adm_T_UomCategory_UomCategoryId", + column: x => x.UomCategoryId, + principalTable: "Adm_T_UomCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_ClassType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2717,17 +2905,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_ClassType", x => x.Id); + table.PrimaryKey("PK_Crd_B_ClassType", x => x.Id); table.ForeignKey( - name: "FK_B_Crd_ClassType_B_Crd_RegistrationType_RegistrationTypeId", + name: "FK_Crd_B_ClassType_Crd_B_RegistrationType_RegistrationTypeId", column: x => x.RegistrationTypeId, - principalTable: "B_Crd_RegistrationType", + principalTable: "Crd_B_RegistrationType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "B_Crd_RegistrationMethod", + name: "Crd_B_RegistrationMethod", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2746,17 +2934,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_RegistrationMethod", x => x.Id); + table.PrimaryKey("PK_Crd_B_RegistrationMethod", x => x.Id); table.ForeignKey( - name: "FK_B_Crd_RegistrationMethod_B_Crd_RegistrationType_RegistrationTypeId", + name: "FK_Crd_B_RegistrationMethod_Crd_B_RegistrationType_RegistrationTypeId", column: x => x.RegistrationTypeId, - principalTable: "B_Crd_RegistrationType", + principalTable: "Crd_B_RegistrationType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "B_Crd_ScheduleLesson", + name: "Crd_B_ScheduleLesson", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2779,11 +2967,212 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_ScheduleLesson", x => x.Id); + table.PrimaryKey("PK_Crd_B_ScheduleLesson", x => x.Id); table.ForeignKey( - name: "FK_B_Crd_ScheduleLesson_B_Crd_Schedule_ScheduleId", + name: "FK_Crd_B_ScheduleLesson_Crd_B_Schedule_ScheduleId", column: x => x.ScheduleId, - principalTable: "B_Crd_Schedule", + principalTable: "Crd_B_Schedule", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_ClassroomAttandance", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + SessionId = table.Column(type: "uniqueidentifier", nullable: false), + StudentId = table.Column(type: "uniqueidentifier", nullable: true), + StudentName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + JoinTime = table.Column(type: "datetime2", nullable: false), + LeaveTime = table.Column(type: "datetime2", nullable: true), + TotalDurationMinutes = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_ClassroomAttandance", x => x.Id); + table.ForeignKey( + name: "FK_Crd_T_ClassroomAttandance_Crd_T_Classroom_SessionId", + column: x => x.SessionId, + principalTable: "Crd_T_Classroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_ClassroomChat", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + SessionId = table.Column(type: "uniqueidentifier", nullable: false), + SenderId = table.Column(type: "uniqueidentifier", nullable: true), + SenderName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), + Timestamp = table.Column(type: "datetime2", nullable: false), + RecipientId = table.Column(type: "uniqueidentifier", nullable: true), + RecipientName = table.Column(type: "nvarchar(max)", nullable: true), + IsTeacher = table.Column(type: "bit", nullable: false), + MessageType = table.Column(type: "nvarchar(max)", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_ClassroomChat", x => x.Id); + table.ForeignKey( + name: "FK_Crd_T_ClassroomChat_Crd_T_Classroom_SessionId", + column: x => x.SessionId, + principalTable: "Crd_T_Classroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_ClassroomParticipant", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + SessionId = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + IsTeacher = table.Column(type: "bit", nullable: false), + IsAudioMuted = table.Column(type: "bit", nullable: false), + IsVideoMuted = table.Column(type: "bit", nullable: false), + IsHandRaised = table.Column(type: "bit", nullable: false), + IsKicked = table.Column(type: "bit", nullable: false, defaultValue: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + JoinTime = table.Column(type: "datetime2", nullable: false), + ConnectionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_ClassroomParticipant", x => x.Id); + table.ForeignKey( + name: "FK_Crd_T_ClassroomParticipant_Crd_T_Classroom_SessionId", + column: x => x.SessionId, + principalTable: "Crd_T_Classroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_Question", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + QuestionType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Points = table.Column(type: "int", nullable: false, defaultValue: 0), + Title = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), + Content = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + MediaUrl = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + MediaType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CorrectAnswer = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Difficulty = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + TimeLimit = table.Column(type: "int", nullable: false, defaultValue: 0), + Explanation = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + QuestionPoolId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_Question", x => x.Id); + table.ForeignKey( + name: "FK_Crd_T_Question_Crd_T_QuestionPool_QuestionPoolId", + column: x => x.QuestionPoolId, + principalTable: "Crd_T_QuestionPool", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_PayrollItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + PayrollItemId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Amount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + ItemType = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Taxable = table.Column(type: "bit", nullable: true, defaultValue: false), + Mandatory = table.Column(type: "bit", nullable: true, defaultValue: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_PayrollItem", x => x.Id); + table.ForeignKey( + name: "FK_Hr_T_PayrollItem_Hr_T_Payroll_PayrollItemId", + column: x => x.PayrollItemId, + principalTable: "Hr_T_Payroll", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_SurveyQuestion", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SurveyId = table.Column(type: "uniqueidentifier", nullable: false), + QuestionText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Order = table.Column(type: "int", nullable: false), + IsRequired = table.Column(type: "bit", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_SurveyQuestion", x => x.Id); + table.ForeignKey( + name: "FK_Hr_T_SurveyQuestion_Hr_T_Survey_SurveyId", + column: x => x.SurveyId, + principalTable: "Hr_T_Survey", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -2918,7 +3307,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "P_Sas_Country", + name: "Sas_P_Country", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2940,17 +3329,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_Country", x => x.Id); + table.PrimaryKey("PK_Sas_P_Country", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_Country_P_Sas_CountryGroup_GroupName", + name: "FK_Sas_P_Country_Sas_P_CountryGroup_GroupName", column: x => x.GroupName, - principalTable: "P_Sas_CountryGroup", + principalTable: "Sas_P_CountryGroup", principalColumn: "Name", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "P_Sas_ForumTopic", + name: "Sas_P_ForumTopic", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2980,17 +3369,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ForumTopic", x => x.Id); + table.PrimaryKey("PK_Sas_P_ForumTopic", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ForumTopic_P_Sas_ForumCategory_CategoryId", + name: "FK_Sas_P_ForumTopic_Sas_P_ForumCategory_CategoryId", column: x => x.CategoryId, - principalTable: "P_Sas_ForumCategory", + principalTable: "Sas_P_ForumCategory", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "P_Sas_ListFormCustomization", + name: "Sas_P_ListFormCustomization", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3010,17 +3399,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ListFormCustomization", x => x.Id); + table.PrimaryKey("PK_Sas_P_ListFormCustomization", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ListFormCustomization_P_Sas_ListForm_ListFormCode", + name: "FK_Sas_P_ListFormCustomization_Sas_P_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "P_Sas_ListForm", + principalTable: "Sas_P_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "P_Sas_ListFormField", + name: "Sas_P_ListFormField", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3067,17 +3456,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ListFormField", x => x.Id); + table.PrimaryKey("PK_Sas_P_ListFormField", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ListFormField_P_Sas_ListForm_ListFormCode", + name: "FK_Sas_P_ListFormField_Sas_P_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "P_Sas_ListForm", + principalTable: "Sas_P_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "P_Sas_ListFormImport", + name: "Sas_P_ListFormImport", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3095,406 +3484,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ListFormImport", x => x.Id); + table.PrimaryKey("PK_Sas_P_ListFormImport", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ListFormImport_P_Sas_ListForm_ListFormCode", + name: "FK_Sas_P_ListFormImport_Sas_P_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "P_Sas_ListForm", + principalTable: "Sas_P_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Acc_BankAccount", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - AccountNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BankId = table.Column(type: "uniqueidentifier", nullable: false), - AccountOwner = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), - CanTransferMoney = table.Column(type: "bit", nullable: false), - Company = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Acc_BankAccount", x => x.Id); - table.ForeignKey( - name: "FK_T_Acc_BankAccount_T_Acc_Bank_BankId", - column: x => x.BankId, - principalTable: "T_Acc_Bank", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_BlogPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ContentTr = table.Column(type: "nvarchar(max)", nullable: false), - ContentEn = table.Column(type: "nvarchar(max)", nullable: false), - Summary = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - CoverImage = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - ReadTime = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - AuthorId = table.Column(type: "uniqueidentifier", nullable: false), - ViewCount = table.Column(type: "int", nullable: true), - LikeCount = table.Column(type: "int", nullable: true), - CommentCount = table.Column(type: "int", nullable: true), - IsPublished = table.Column(type: "bit", nullable: false), - PublishedAt = table.Column(type: "datetime2", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_BlogPost", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_BlogPost_T_Adm_BlogCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "T_Adm_BlogCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_OrderItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OrderId = table.Column(type: "uniqueidentifier", nullable: false), - ProductId = table.Column(type: "uniqueidentifier", nullable: false), - ProductName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - BillingCycle = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Quantity = table.Column(type: "int", nullable: false), - TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_OrderItem", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_OrderItem_T_Adm_Order_OrderId", - column: x => x.OrderId, - principalTable: "T_Adm_Order", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Skill", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Skill", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_Skill_T_Adm_SkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "T_Adm_SkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_SkillLevel", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Progress = table.Column(type: "int", nullable: false, defaultValue: 0), - IsDefault = table.Column(type: "bit", nullable: false, defaultValue: false), - SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_SkillLevel", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_SkillLevel_T_Adm_SkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "T_Adm_SkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_Uom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UomCategoryId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - Rounding = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_Uom", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_Uom_T_Adm_UomCategory_UomCategoryId", - column: x => x.UomCategoryId, - principalTable: "T_Adm_UomCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_ClassroomAttandance", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - StudentId = table.Column(type: "uniqueidentifier", nullable: true), - StudentName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - JoinTime = table.Column(type: "datetime2", nullable: false), - LeaveTime = table.Column(type: "datetime2", nullable: true), - TotalDurationMinutes = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_ClassroomAttandance", x => x.Id); - table.ForeignKey( - name: "FK_T_Crd_ClassroomAttandance_T_Crd_Classroom_SessionId", - column: x => x.SessionId, - principalTable: "T_Crd_Classroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_ClassroomChat", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - SenderId = table.Column(type: "uniqueidentifier", nullable: true), - SenderName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), - Timestamp = table.Column(type: "datetime2", nullable: false), - RecipientId = table.Column(type: "uniqueidentifier", nullable: true), - RecipientName = table.Column(type: "nvarchar(max)", nullable: true), - IsTeacher = table.Column(type: "bit", nullable: false), - MessageType = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_ClassroomChat", x => x.Id); - table.ForeignKey( - name: "FK_T_Crd_ClassroomChat_T_Crd_Classroom_SessionId", - column: x => x.SessionId, - principalTable: "T_Crd_Classroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_ClassroomParticipant", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - UserName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - IsTeacher = table.Column(type: "bit", nullable: false), - IsAudioMuted = table.Column(type: "bit", nullable: false), - IsVideoMuted = table.Column(type: "bit", nullable: false), - IsHandRaised = table.Column(type: "bit", nullable: false), - IsKicked = table.Column(type: "bit", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - JoinTime = table.Column(type: "datetime2", nullable: false), - ConnectionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_ClassroomParticipant", x => x.Id); - table.ForeignKey( - name: "FK_T_Crd_ClassroomParticipant_T_Crd_Classroom_SessionId", - column: x => x.SessionId, - principalTable: "T_Crd_Classroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Crd_Question", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - QuestionType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Points = table.Column(type: "int", nullable: false, defaultValue: 0), - Title = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), - Content = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - MediaUrl = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - MediaType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CorrectAnswer = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Difficulty = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - TimeLimit = table.Column(type: "int", nullable: false, defaultValue: 0), - Explanation = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - QuestionPoolId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_Question", x => x.Id); - table.ForeignKey( - name: "FK_T_Crd_Question_T_Crd_QuestionPool_QuestionPoolId", - column: x => x.QuestionPoolId, - principalTable: "T_Crd_QuestionPool", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_PayrollItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - PayrollItemId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Amount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - ItemType = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Taxable = table.Column(type: "bit", nullable: true, defaultValue: false), - Mandatory = table.Column(type: "bit", nullable: true, defaultValue: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_PayrollItem", x => x.Id); - table.ForeignKey( - name: "FK_T_Hr_PayrollItem_T_Hr_Payroll_PayrollItemId", - column: x => x.PayrollItemId, - principalTable: "T_Hr_Payroll", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_SurveyQuestion", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SurveyId = table.Column(type: "uniqueidentifier", nullable: false), - QuestionText = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Order = table.Column(type: "int", nullable: false), - IsRequired = table.Column(type: "bit", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_SurveyQuestion", x => x.Id); - table.ForeignKey( - name: "FK_T_Hr_SurveyQuestion_T_Hr_Survey_SurveyId", - column: x => x.SurveyId, - principalTable: "T_Hr_Survey", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Sas_ApiEndpoint", + name: "Sas_T_ApiEndpoint", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3516,17 +3516,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ApiEndpoint", x => x.Id); + table.PrimaryKey("PK_Sas_T_ApiEndpoint", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_ApiEndpoint_T_Sas_CustomEntity_EntityId", + name: "FK_Sas_T_ApiEndpoint_Sas_T_CustomEntity_EntityId", column: x => x.EntityId, - principalTable: "T_Sas_CustomEntity", + principalTable: "Sas_T_CustomEntity", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Sas_ApiMigration", + name: "Sas_T_ApiMigration", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3545,17 +3545,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ApiMigration", x => x.Id); + table.PrimaryKey("PK_Sas_T_ApiMigration", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_ApiMigration_T_Sas_CustomEntity_EntityId", + name: "FK_Sas_T_ApiMigration_Sas_T_CustomEntity_EntityId", column: x => x.EntityId, - principalTable: "T_Sas_CustomEntity", + principalTable: "Sas_T_CustomEntity", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Sas_CustomEntityField", + name: "Sas_T_CustomEntityField", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3578,17 +3578,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_CustomEntityField", x => x.Id); + table.PrimaryKey("PK_Sas_T_CustomEntityField", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_CustomEntityField_T_Sas_CustomEntity_EntityId", + name: "FK_Sas_T_CustomEntityField_Sas_T_CustomEntity_EntityId", column: x => x.EntityId, - principalTable: "T_Sas_CustomEntity", + principalTable: "Sas_T_CustomEntity", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Sas_ReportTemplate", + name: "Sas_T_ReportTemplate", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3608,148 +3608,15 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ReportTemplate", x => x.Id); + table.PrimaryKey("PK_Sas_T_ReportTemplate", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_ReportTemplate_T_Sas_ReportCategory_CategoryId", + name: "FK_Sas_T_ReportTemplate_Sas_T_ReportCategory_CategoryId", column: x => x.CategoryId, - principalTable: "T_Sas_ReportCategory", + principalTable: "Sas_T_ReportCategory", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Partners", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(max)", nullable: true), - Name = table.Column(type: "nvarchar(max)", nullable: true), - SectorId = table.Column(type: "uniqueidentifier", nullable: true), - TaxNumber = table.Column(type: "bigint", nullable: false), - TaxOffice = table.Column(type: "nvarchar(max)", nullable: true), - Country = table.Column(type: "nvarchar(max)", nullable: true), - City = table.Column(type: "nvarchar(max)", nullable: true), - District = table.Column(type: "nvarchar(max)", nullable: true), - Street = table.Column(type: "nvarchar(max)", nullable: true), - Address1 = table.Column(type: "nvarchar(max)", nullable: true), - Address2 = table.Column(type: "nvarchar(max)", nullable: true), - PostalCode = table.Column(type: "nvarchar(max)", nullable: true), - Phone = table.Column(type: "nvarchar(max)", nullable: true), - Mobile = table.Column(type: "nvarchar(max)", nullable: true), - Fax = table.Column(type: "nvarchar(max)", nullable: true), - Email = table.Column(type: "nvarchar(max)", nullable: true), - Website = table.Column(type: "nvarchar(max)", nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: true), - CreditLimit = table.Column(type: "decimal(18,2)", nullable: false), - LastOrderDate = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Partners", x => x.Id); - table.ForeignKey( - name: "FK_Partners_P_Sas_Currency_CurrencyId", - column: x => x.CurrencyId, - principalTable: "P_Sas_Currency", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_Partners_T_Sas_Sector_SectorId", - column: x => x.SectorId, - principalTable: "T_Sas_Sector", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_Partners_T_Scp_PaymentTerm_PaymentTermId", - column: x => x.PaymentTermId, - principalTable: "T_Scp_PaymentTerm", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "T_Scp_Supply", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PartyType = table.Column(type: "int", nullable: false), - SupplierTypeId = table.Column(type: "uniqueidentifier", nullable: true), - CardNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplyCardTypeId = table.Column(type: "uniqueidentifier", nullable: true), - ValidFrom = table.Column(type: "datetime2", nullable: false), - ValidTo = table.Column(type: "datetime2", nullable: false), - CurrentBalance = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), - DiscountRate = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), - PerformanceMetricsJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(max)", nullable: true), - Name = table.Column(type: "nvarchar(max)", nullable: true), - SectorId = table.Column(type: "uniqueidentifier", nullable: true), - TaxNumber = table.Column(type: "bigint", nullable: false), - TaxOffice = table.Column(type: "nvarchar(max)", nullable: true), - Country = table.Column(type: "nvarchar(max)", nullable: true), - City = table.Column(type: "nvarchar(max)", nullable: true), - District = table.Column(type: "nvarchar(max)", nullable: true), - Street = table.Column(type: "nvarchar(max)", nullable: true), - Address1 = table.Column(type: "nvarchar(max)", nullable: true), - Address2 = table.Column(type: "nvarchar(max)", nullable: true), - PostalCode = table.Column(type: "nvarchar(max)", nullable: true), - Phone = table.Column(type: "nvarchar(max)", nullable: true), - Mobile = table.Column(type: "nvarchar(max)", nullable: true), - Fax = table.Column(type: "nvarchar(max)", nullable: true), - Email = table.Column(type: "nvarchar(max)", nullable: true), - Website = table.Column(type: "nvarchar(max)", nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: true), - CreditLimit = table.Column(type: "decimal(18,2)", nullable: false), - LastOrderDate = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Scp_Supply", x => x.Id); - table.ForeignKey( - name: "FK_T_Scp_Supply_P_Sas_Currency_CurrencyId", - column: x => x.CurrencyId, - principalTable: "P_Sas_Currency", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_T_Scp_Supply_T_Sas_Sector_SectorId", - column: x => x.SectorId, - principalTable: "T_Sas_Sector", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_T_Scp_Supply_T_Scp_PaymentTerm_PaymentTermId", - column: x => x.PaymentTermId, - principalTable: "T_Scp_PaymentTerm", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_T_Scp_Supply_T_Scp_SupplyCardType_SupplyCardTypeId", - column: x => x.SupplyCardTypeId, - principalTable: "T_Scp_SupplyCardType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_T_Scp_Supply_T_Scp_SupplyType_SupplierTypeId", - column: x => x.SupplierTypeId, - principalTable: "T_Scp_SupplyType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new @@ -3774,7 +3641,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "B_Crd_Class", + name: "Crd_B_Class", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3793,17 +3660,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_Class", x => x.Id); + table.PrimaryKey("PK_Crd_B_Class", x => x.Id); table.ForeignKey( - name: "FK_B_Crd_Class_B_Crd_ClassType_ClassTypeId", + name: "FK_Crd_B_Class_Crd_B_ClassType_ClassTypeId", column: x => x.ClassTypeId, - principalTable: "B_Crd_ClassType", + principalTable: "Crd_B_ClassType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "B_Crd_Level", + name: "Crd_B_Level", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3827,11 +3694,68 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_B_Crd_Level", x => x.Id); + table.PrimaryKey("PK_Crd_B_Level", x => x.Id); table.ForeignKey( - name: "FK_B_Crd_Level_B_Crd_ClassType_ClassTypeId", + name: "FK_Crd_B_Level_Crd_B_ClassType_ClassTypeId", column: x => x.ClassTypeId, - principalTable: "B_Crd_ClassType", + principalTable: "Crd_B_ClassType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Crd_T_QuestionOption", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Text = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + IsCorrect = table.Column(type: "bit", nullable: false, defaultValue: false), + QuestionPoolId = table.Column(type: "uniqueidentifier", nullable: false), + QuestionId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_T_QuestionOption", x => x.Id); + table.ForeignKey( + name: "FK_Crd_T_QuestionOption_Crd_T_Question_QuestionId", + column: x => x.QuestionId, + principalTable: "Crd_T_Question", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_SurveyQuestionOption", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + QuestionId = table.Column(type: "uniqueidentifier", nullable: false), + Text = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), + Order = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Hr_T_SurveyQuestionOption", x => x.Id); + table.ForeignKey( + name: "FK_Hr_T_SurveyQuestionOption_Hr_T_SurveyQuestion_QuestionId", + column: x => x.QuestionId, + principalTable: "Hr_T_SurveyQuestion", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -3900,7 +3824,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "P_Sas_City", + name: "Sas_P_City", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3919,16 +3843,16 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_City", x => x.Id); + table.PrimaryKey("PK_Sas_P_City", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_City_P_Sas_Country_CountryId", + name: "FK_Sas_P_City_Sas_P_Country_CountryId", column: x => x.CountryId, - principalTable: "P_Sas_Country", + principalTable: "Sas_P_Country", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "P_Sas_ForumPost", + name: "Sas_P_ForumPost", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3950,23 +3874,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ForumPost", x => x.Id); + table.PrimaryKey("PK_Sas_P_ForumPost", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ForumPost_P_Sas_ForumPost_ParentPostId", + name: "FK_Sas_P_ForumPost_Sas_P_ForumPost_ParentPostId", column: x => x.ParentPostId, - principalTable: "P_Sas_ForumPost", + principalTable: "Sas_P_ForumPost", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_P_Sas_ForumPost_P_Sas_ForumTopic_TopicId", + name: "FK_Sas_P_ForumPost_Sas_P_ForumTopic_TopicId", column: x => x.TopicId, - principalTable: "P_Sas_ForumTopic", + principalTable: "Sas_P_ForumTopic", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "P_Sas_ListFormImportExecute", + name: "Sas_P_ListFormImportExecute", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3988,74 +3912,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_ListFormImportExecute", x => x.Id); + table.PrimaryKey("PK_Sas_P_ListFormImportExecute", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_ListFormImportExecute_P_Sas_ListFormImport_ImportId", + name: "FK_Sas_P_ListFormImportExecute_Sas_P_ListFormImport_ImportId", column: x => x.ImportId, - principalTable: "P_Sas_ListFormImport", + principalTable: "Sas_P_ListFormImport", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Crd_QuestionOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Text = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - IsCorrect = table.Column(type: "bit", nullable: false, defaultValue: false), - QuestionPoolId = table.Column(type: "uniqueidentifier", nullable: false), - QuestionId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Crd_QuestionOption", x => x.Id); - table.ForeignKey( - name: "FK_T_Crd_QuestionOption_T_Crd_Question_QuestionId", - column: x => x.QuestionId, - principalTable: "T_Crd_Question", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Hr_SurveyQuestionOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - QuestionId = table.Column(type: "uniqueidentifier", nullable: false), - Text = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), - Order = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Hr_SurveyQuestionOption", x => x.Id); - table.ForeignKey( - name: "FK_T_Hr_SurveyQuestionOption_T_Hr_SurveyQuestion_QuestionId", - column: x => x.QuestionId, - principalTable: "T_Hr_SurveyQuestion", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "T_Sas_ReportGenerated", + name: "Sas_T_ReportGenerated", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4074,17 +3941,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ReportGenerated", x => x.Id); + table.PrimaryKey("PK_Sas_T_ReportGenerated", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_ReportGenerated_T_Sas_ReportTemplate_TemplateId", + name: "FK_Sas_T_ReportGenerated_Sas_T_ReportTemplate_TemplateId", column: x => x.TemplateId, - principalTable: "T_Sas_ReportTemplate", + principalTable: "Sas_T_ReportTemplate", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Sas_ReportParameter", + name: "Sas_T_ReportParameter", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4106,17 +3973,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Sas_ReportParameter", x => x.Id); + table.PrimaryKey("PK_Sas_T_ReportParameter", x => x.Id); table.ForeignKey( - name: "FK_T_Sas_ReportParameter_T_Sas_ReportTemplate_TemplateId", + name: "FK_Sas_T_ReportParameter_Sas_T_ReportTemplate_TemplateId", column: x => x.TemplateId, - principalTable: "T_Sas_ReportTemplate", + principalTable: "Sas_T_ReportTemplate", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "P_Sas_District", + name: "Sas_P_District", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4137,166 +4004,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_P_Sas_District", x => x.Id); + table.PrimaryKey("PK_Sas_P_District", x => x.Id); table.ForeignKey( - name: "FK_P_Sas_District_P_Sas_City_CityId", + name: "FK_Sas_P_District_Sas_P_City_CityId", column: x => x.CityId, - principalTable: "P_Sas_City", + principalTable: "Sas_P_City", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Adm_PartnerBank", + name: "Adm_T_Partner", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - PartnerId = table.Column(type: "uniqueidentifier", nullable: false), - BankName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - AccountNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Iban = table.Column(type: "nvarchar(34)", maxLength: 34, nullable: false), - SwiftCode = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), - AccountOwner = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - BranchName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - AccountType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), - Balance = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - OverdraftLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - DailyTransferLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - IsDefault = table.Column(type: "bit", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CustomerId = table.Column(type: "uniqueidentifier", nullable: true), - SupplyId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_PartnerBank", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_PartnerBank_P_Sas_Currency_CurrencyId", - column: x => x.CurrencyId, - principalTable: "P_Sas_Currency", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_T_Adm_PartnerBank_Partners_PartnerId", - column: x => x.PartnerId, - principalTable: "Partners", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_T_Adm_PartnerBank_T_Scp_Supply_SupplyId", - column: x => x.SupplyId, - principalTable: "T_Scp_Supply", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_PartnerCertificate", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - PartnerId = table.Column(type: "uniqueidentifier", nullable: false), - Certificate = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Issuer = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - IssueDate = table.Column(type: "datetime2", nullable: false), - ExpiryDate = table.Column(type: "datetime2", nullable: false), - CustomerId = table.Column(type: "uniqueidentifier", nullable: true), - SupplyId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_PartnerCertificate", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_PartnerCertificate_Partners_PartnerId", - column: x => x.PartnerId, - principalTable: "Partners", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_T_Adm_PartnerCertificate_T_Scp_Supply_SupplyId", - column: x => x.SupplyId, - principalTable: "T_Scp_Supply", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "T_Adm_PartnerContact", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - PartnerId = table.Column(type: "uniqueidentifier", nullable: false), - FullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Title = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Department = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Phone = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - Mobile = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - IsPrimary = table.Column(type: "bit", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CustomerId = table.Column(type: "uniqueidentifier", nullable: true), - SupplyId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_T_Adm_PartnerContact", x => x.Id); - table.ForeignKey( - name: "FK_T_Adm_PartnerContact_Partners_PartnerId", - column: x => x.PartnerId, - principalTable: "Partners", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_T_Adm_PartnerContact_T_Scp_Supply_SupplyId", - column: x => x.SupplyId, - principalTable: "T_Scp_Supply", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "T_Crm_Customer", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PartyType = table.Column(type: "int", nullable: false), - CustomerTypeId = table.Column(type: "uniqueidentifier", nullable: true), - CustomerSegmentId = table.Column(type: "uniqueidentifier", nullable: true), - AssignedEmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - TeamCode = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: true), - TotalRevenue = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), - AverageOrderValue = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), - LifetimeValue = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + PartyType = table.Column(type: "int", nullable: false), SectorId = table.Column(type: "uniqueidentifier", nullable: true), TaxNumber = table.Column(type: "bigint", nullable: false), TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -4314,44 +4038,186 @@ namespace Kurs.Platform.Migrations Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), PaymentTermId = table.Column(type: "uniqueidentifier", nullable: true), - CreditLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - LastOrderDate = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "int", nullable: false) + CreditLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + LastOrderDate = table.Column(type: "datetime2", nullable: true), + Status = table.Column(type: "int", nullable: false), + CustomerTypeId = table.Column(type: "uniqueidentifier", nullable: true), + CustomerSegmentId = table.Column(type: "uniqueidentifier", nullable: true), + AssignedEmployeeId = table.Column(type: "uniqueidentifier", nullable: true), + TeamCode = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: true), + TotalRevenue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + AverageOrderValue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + LifetimeValue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + SupplierTypeId = table.Column(type: "uniqueidentifier", nullable: true), + SupplyCardTypeId = table.Column(type: "uniqueidentifier", nullable: true), + CardNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ValidFrom = table.Column(type: "datetime2", nullable: true), + ValidTo = table.Column(type: "datetime2", nullable: true), + CurrentBalance = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + DiscountRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + PerformanceMetricsJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { - table.PrimaryKey("PK_T_Crm_Customer", x => x.Id); + table.PrimaryKey("PK_Adm_T_Partner", x => x.Id); table.ForeignKey( - name: "FK_T_Crm_Customer_P_Sas_Currency_CurrencyId", - column: x => x.CurrencyId, - principalTable: "P_Sas_Currency", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_T_Crm_Customer_T_Crm_CustomerSegment_CustomerSegmentId", + name: "FK_Adm_T_Partner_Crm_T_CustomerSegment_CustomerSegmentId", column: x => x.CustomerSegmentId, - principalTable: "T_Crm_CustomerSegment", + principalTable: "Crm_T_CustomerSegment", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Crm_Customer_T_Crm_CustomerType_CustomerTypeId", + name: "FK_Adm_T_Partner_Crm_T_CustomerType_CustomerTypeId", column: x => x.CustomerTypeId, - principalTable: "T_Crm_CustomerType", + principalTable: "Crm_T_CustomerType", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Crm_Customer_T_Sas_Sector_SectorId", - column: x => x.SectorId, - principalTable: "T_Sas_Sector", + name: "FK_Adm_T_Partner_Sas_P_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "Sas_P_Currency", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Crm_Customer_T_Scp_PaymentTerm_PaymentTermId", + name: "FK_Adm_T_Partner_Sas_T_Sector_SectorId", + column: x => x.SectorId, + principalTable: "Sas_T_Sector", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_Adm_T_Partner_Scp_T_PaymentTerm_PaymentTermId", column: x => x.PaymentTermId, - principalTable: "T_Scp_PaymentTerm", + principalTable: "Scp_T_PaymentTerm", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_Adm_T_Partner_Scp_T_SupplyCardType_SupplyCardTypeId", + column: x => x.SupplyCardTypeId, + principalTable: "Scp_T_SupplyCardType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Adm_T_Partner_Scp_T_SupplyType_SupplierTypeId", + column: x => x.SupplierTypeId, + principalTable: "Scp_T_SupplyType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_PartnerBank", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + PartnerId = table.Column(type: "uniqueidentifier", nullable: false), + BankName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + AccountNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Iban = table.Column(type: "nvarchar(34)", maxLength: 34, nullable: false), + SwiftCode = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), + AccountOwner = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + BranchName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + AccountType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: true), + Balance = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + OverdraftLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + DailyTransferLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + IsDefault = table.Column(type: "bit", nullable: false, defaultValue: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_PartnerBank", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_PartnerBank_Adm_T_Partner_PartnerId", + column: x => x.PartnerId, + principalTable: "Adm_T_Partner", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Adm_T_PartnerBank_Sas_P_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "Sas_P_Currency", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Hr_CostCenter", + name: "Adm_T_PartnerCertificate", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + PartnerId = table.Column(type: "uniqueidentifier", nullable: false), + Certificate = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Issuer = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IssueDate = table.Column(type: "datetime2", nullable: false), + ExpiryDate = table.Column(type: "datetime2", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_PartnerCertificate", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_PartnerCertificate_Adm_T_Partner_PartnerId", + column: x => x.PartnerId, + principalTable: "Adm_T_Partner", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_PartnerContact", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + PartnerId = table.Column(type: "uniqueidentifier", nullable: false), + FullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Title = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Department = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Phone = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + Mobile = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + IsPrimary = table.Column(type: "bit", nullable: false, defaultValue: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_PartnerContact", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_PartnerContact_Adm_T_Partner_PartnerId", + column: x => x.PartnerId, + principalTable: "Adm_T_Partner", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Hr_T_CostCenter", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4378,16 +4244,16 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_CostCenter", x => x.Id); + table.PrimaryKey("PK_Hr_T_CostCenter", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_CostCenter_T_Hr_CostCenter_ParentCostCenterId", + name: "FK_Hr_T_CostCenter_Hr_T_CostCenter_ParentCostCenterId", column: x => x.ParentCostCenterId, - principalTable: "T_Hr_CostCenter", + principalTable: "Hr_T_CostCenter", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Hr_Department", + name: "Hr_T_Department", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4410,23 +4276,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Department", x => x.Id); + table.PrimaryKey("PK_Hr_T_Department", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Department_T_Hr_CostCenter_CostCenterId", + name: "FK_Hr_T_Department_Hr_T_CostCenter_CostCenterId", column: x => x.CostCenterId, - principalTable: "T_Hr_CostCenter", + principalTable: "Hr_T_CostCenter", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Hr_Department_T_Hr_Department_ParentDepartmentId", + name: "FK_Hr_T_Department_Hr_T_Department_ParentDepartmentId", column: x => x.ParentDepartmentId, - principalTable: "T_Hr_Department", + principalTable: "Hr_T_Department", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Hr_JobPosition", + name: "Hr_T_JobPosition", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4453,16 +4319,16 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_JobPosition", x => x.Id); + table.PrimaryKey("PK_Hr_T_JobPosition", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_JobPosition_T_Hr_Department_DepartmentId", + name: "FK_Hr_T_JobPosition_Hr_T_Department_DepartmentId", column: x => x.DepartmentId, - principalTable: "T_Hr_Department", + principalTable: "Hr_T_Department", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Hr_Performance360", + name: "Hr_T_Performance360", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4485,23 +4351,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Performance360", x => x.Id); + table.PrimaryKey("PK_Hr_T_Performance360", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Performance360_T_Hr_Department_DepartmentId", + name: "FK_Hr_T_Performance360_Hr_T_Department_DepartmentId", column: x => x.DepartmentId, - principalTable: "T_Hr_Department", + principalTable: "Hr_T_Department", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Hr_Performance360_T_Hr_Template360_TemplateId", + name: "FK_Hr_T_Performance360_Hr_T_Template360_TemplateId", column: x => x.TemplateId, - principalTable: "T_Hr_Template360", + principalTable: "Hr_T_Template360", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Hr_Employee", + name: "Hr_T_Employee", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4550,42 +4416,42 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Employee", x => x.Id); + table.PrimaryKey("PK_Hr_T_Employee", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Acc_BankAccount_BankAccountId", + name: "FK_Hr_T_Employee_Acc_T_BankAccount_BankAccountId", column: x => x.BankAccountId, - principalTable: "T_Acc_BankAccount", + principalTable: "Acc_T_BankAccount", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_Badge_BadgeId", + name: "FK_Hr_T_Employee_Hr_T_Badge_BadgeId", column: x => x.BadgeId, - principalTable: "T_Hr_Badge", + principalTable: "Hr_T_Badge", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_Department_DepartmentId", + name: "FK_Hr_T_Employee_Hr_T_Department_DepartmentId", column: x => x.DepartmentId, - principalTable: "T_Hr_Department", + principalTable: "Hr_T_Department", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_Employee_ManagerId", + name: "FK_Hr_T_Employee_Hr_T_Employee_ManagerId", column: x => x.ManagerId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_EmploymentType_EmploymentTypeId", + name: "FK_Hr_T_Employee_Hr_T_EmploymentType_EmploymentTypeId", column: x => x.EmploymentTypeId, - principalTable: "T_Hr_EmploymentType", + principalTable: "Hr_T_EmploymentType", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Employee_T_Hr_JobPosition_JobPositionId", + name: "FK_Hr_T_Employee_Hr_T_JobPosition_JobPositionId", column: x => x.JobPositionId, - principalTable: "T_Hr_JobPosition", + principalTable: "Hr_T_JobPosition", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Hr_Expense", + name: "Hr_T_Expense", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4612,22 +4478,22 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Expense", x => x.Id); + table.PrimaryKey("PK_Hr_T_Expense", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Expense_T_Hr_Employee_ApproverId", + name: "FK_Hr_T_Expense_Hr_T_Employee_ApproverId", column: x => x.ApproverId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Hr_Expense_T_Hr_Employee_EmployeeId", + name: "FK_Hr_T_Expense_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Hr_Leave", + name: "Hr_T_Leave", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4655,17 +4521,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Leave", x => x.Id); + table.PrimaryKey("PK_Hr_T_Leave", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Leave_T_Hr_Employee_EmployeeId", + name: "FK_Hr_T_Leave_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Hr_Overtime", + name: "Hr_T_Overtime", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4692,17 +4558,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_Overtime", x => x.Id); + table.PrimaryKey("PK_Hr_T_Overtime", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_Overtime_T_Hr_Employee_EmployeeId", + name: "FK_Hr_T_Overtime_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Hr_SurveyResponse", + name: "Hr_T_SurveyResponse", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4720,23 +4586,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_SurveyResponse", x => x.Id); + table.PrimaryKey("PK_Hr_T_SurveyResponse", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_SurveyResponse_T_Hr_Employee_EmployeeId", + name: "FK_Hr_T_SurveyResponse_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Hr_SurveyResponse_T_Hr_Survey_SurveyId", + name: "FK_Hr_T_SurveyResponse_Hr_T_Survey_SurveyId", column: x => x.SurveyId, - principalTable: "T_Hr_Survey", + principalTable: "Hr_T_Survey", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_Announcement", + name: "Net_T_Announcement", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4763,17 +4629,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_Announcement", x => x.Id); + table.PrimaryKey("PK_Net_T_Announcement", x => x.Id); table.ForeignKey( - name: "FK_T_Net_Announcement_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_Announcement_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Net_Certificate", + name: "Net_T_Certificate", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4794,23 +4660,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_Certificate", x => x.Id); + table.PrimaryKey("PK_Net_T_Certificate", x => x.Id); table.ForeignKey( - name: "FK_T_Net_Certificate_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_Certificate_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Net_Certificate_T_Net_Training_TrainingId", + name: "FK_Net_T_Certificate_Net_T_Training_TrainingId", column: x => x.TrainingId, - principalTable: "T_Net_Training", + principalTable: "Net_T_Training", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_Event", + name: "Net_T_Event", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4836,29 +4702,29 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_Event", x => x.Id); + table.PrimaryKey("PK_Net_T_Event", x => x.Id); table.ForeignKey( - name: "FK_T_Net_Event_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_Event_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( - name: "FK_T_Net_Event_T_Net_EventCategory_CategoryId", + name: "FK_Net_T_Event_Net_T_EventCategory_CategoryId", column: x => x.CategoryId, - principalTable: "T_Net_EventCategory", + principalTable: "Net_T_EventCategory", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( - name: "FK_T_Net_Event_T_Net_EventType_TypeId", + name: "FK_Net_T_Event_Net_T_EventType_TypeId", column: x => x.TypeId, - principalTable: "T_Net_EventType", + principalTable: "Net_T_EventType", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Net_Reservation", + name: "Net_T_Reservation", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4882,17 +4748,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_Reservation", x => x.Id); + table.PrimaryKey("PK_Net_T_Reservation", x => x.Id); table.ForeignKey( - name: "FK_T_Net_Reservation_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_Reservation_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Net_SocialPost", + name: "Net_T_SocialPost", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4912,16 +4778,16 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialPost", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialPost", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialPost_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_SocialPost_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); }); migrationBuilder.CreateTable( - name: "T_Net_Visitor", + name: "Net_T_Visitor", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4948,17 +4814,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_Visitor", x => x.Id); + table.PrimaryKey("PK_Net_T_Visitor", x => x.Id); table.ForeignKey( - name: "FK_T_Net_Visitor_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_Visitor_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "T_Hr_SurveyAnswer", + name: "Hr_T_SurveyAnswer", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -4977,23 +4843,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Hr_SurveyAnswer", x => x.Id); + table.PrimaryKey("PK_Hr_T_SurveyAnswer", x => x.Id); table.ForeignKey( - name: "FK_T_Hr_SurveyAnswer_T_Hr_SurveyQuestion_QuestionId", + name: "FK_Hr_T_SurveyAnswer_Hr_T_SurveyQuestion_QuestionId", column: x => x.QuestionId, - principalTable: "T_Hr_SurveyQuestion", + principalTable: "Hr_T_SurveyQuestion", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_T_Hr_SurveyAnswer_T_Hr_SurveyResponse_ResponseId", + name: "FK_Hr_T_SurveyAnswer_Hr_T_SurveyResponse_ResponseId", column: x => x.ResponseId, - principalTable: "T_Hr_SurveyResponse", + principalTable: "Hr_T_SurveyResponse", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_EventComment", + name: "Net_T_EventComment", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5012,17 +4878,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_EventComment", x => x.Id); + table.PrimaryKey("PK_Net_T_EventComment", x => x.Id); table.ForeignKey( - name: "FK_T_Net_EventComment_T_Net_Event_EventId", + name: "FK_Net_T_EventComment_Net_T_Event_EventId", column: x => x.EventId, - principalTable: "T_Net_Event", + principalTable: "Net_T_Event", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_EventPhoto", + name: "Net_T_EventPhoto", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5039,17 +4905,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_EventPhoto", x => x.Id); + table.PrimaryKey("PK_Net_T_EventPhoto", x => x.Id); table.ForeignKey( - name: "FK_T_Net_EventPhoto_T_Net_Event_EventId", + name: "FK_Net_T_EventPhoto_Net_T_Event_EventId", column: x => x.EventId, - principalTable: "T_Net_Event", + principalTable: "Net_T_Event", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_SocialComment", + name: "Net_T_SocialComment", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5067,22 +4933,22 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialComment", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialComment", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialComment_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_SocialComment_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Net_SocialComment_T_Net_SocialPost_SocialPostId", + name: "FK_Net_T_SocialComment_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, - principalTable: "T_Net_SocialPost", + principalTable: "Net_T_SocialPost", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_SocialLike", + name: "Net_T_SocialLike", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5099,22 +4965,22 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialLike", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialLike", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialLike_T_Hr_Employee_EmployeeId", + name: "FK_Net_T_SocialLike_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); table.ForeignKey( - name: "FK_T_Net_SocialLike_T_Net_SocialPost_SocialPostId", + name: "FK_Net_T_SocialLike_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, - principalTable: "T_Net_SocialPost", + principalTable: "Net_T_SocialPost", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_SocialLocation", + name: "Net_T_SocialLocation", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5135,17 +5001,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialLocation", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialLocation", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialLocation_T_Net_SocialPost_SocialPostId", + name: "FK_Net_T_SocialLocation_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, - principalTable: "T_Net_SocialPost", + principalTable: "Net_T_SocialPost", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_SocialMedia", + name: "Net_T_SocialMedia", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5167,17 +5033,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialMedia", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialMedia", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialMedia_T_Net_SocialPost_SocialPostId", + name: "FK_Net_T_SocialMedia_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, - principalTable: "T_Net_SocialPost", + principalTable: "Net_T_SocialPost", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "T_Net_SocialPollOption", + name: "Net_T_SocialPollOption", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -5195,11 +5061,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Net_SocialPollOption", x => x.Id); + table.PrimaryKey("PK_Net_T_SocialPollOption", x => x.Id); table.ForeignKey( - name: "FK_T_Net_SocialPollOption_T_Net_SocialMedia_SocialMediaId", + name: "FK_Net_T_SocialPollOption_Net_T_SocialMedia_SocialMediaId", column: x => x.SocialMediaId, - principalTable: "T_Net_SocialMedia", + principalTable: "Net_T_SocialMedia", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -5423,30 +5289,429 @@ namespace Kurs.Platform.Migrations column: "UserName"); migrationBuilder.CreateIndex( - name: "IX_B_Crd_Class_ClassTypeId", - table: "B_Crd_Class", + name: "IX_Acc_T_BankAccount_BankId", + table: "Acc_T_BankAccount", + column: "BankId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_BlogCategory_Slug", + table: "Adm_T_BlogCategory", + column: "Slug"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_BlogPost_CategoryId", + table: "Adm_T_BlogPost", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_BlogPost_IsPublished", + table: "Adm_T_BlogPost", + column: "IsPublished"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_BlogPost_PublishedAt", + table: "Adm_T_BlogPost", + column: "PublishedAt"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_BlogPost_Slug", + table: "Adm_T_BlogPost", + column: "Slug"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_OrderItem_OrderId", + table: "Adm_T_OrderItem", + column: "OrderId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_AssignedEmployeeId", + table: "Adm_T_Partner", + column: "AssignedEmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_CurrencyId", + table: "Adm_T_Partner", + column: "CurrencyId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_CustomerSegmentId", + table: "Adm_T_Partner", + column: "CustomerSegmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_CustomerTypeId", + table: "Adm_T_Partner", + column: "CustomerTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_PaymentTermId", + table: "Adm_T_Partner", + column: "PaymentTermId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_SectorId", + table: "Adm_T_Partner", + column: "SectorId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_SupplierTypeId", + table: "Adm_T_Partner", + column: "SupplierTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Partner_SupplyCardTypeId", + table: "Adm_T_Partner", + column: "SupplyCardTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_PartnerBank_CurrencyId", + table: "Adm_T_PartnerBank", + column: "CurrencyId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_PartnerBank_PartnerId", + table: "Adm_T_PartnerBank", + column: "PartnerId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_PartnerCertificate_PartnerId", + table: "Adm_T_PartnerCertificate", + column: "PartnerId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_PartnerContact_PartnerId", + table: "Adm_T_PartnerContact", + column: "PartnerId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Skill_SkillTypeId", + table: "Adm_T_Skill", + column: "SkillTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SkillLevel_SkillTypeId", + table: "Adm_T_SkillLevel", + column: "SkillTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Uom_UomCategoryId", + table: "Adm_T_Uom", + column: "UomCategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_B_Class_ClassTypeId", + table: "Crd_B_Class", column: "ClassTypeId"); migrationBuilder.CreateIndex( - name: "IX_B_Crd_ClassType_RegistrationTypeId", - table: "B_Crd_ClassType", + name: "IX_Crd_B_ClassType_RegistrationTypeId", + table: "Crd_B_ClassType", column: "RegistrationTypeId"); migrationBuilder.CreateIndex( - name: "IX_B_Crd_Level_ClassTypeId", - table: "B_Crd_Level", + name: "IX_Crd_B_Level_ClassTypeId", + table: "Crd_B_Level", column: "ClassTypeId"); migrationBuilder.CreateIndex( - name: "IX_B_Crd_RegistrationMethod_RegistrationTypeId", - table: "B_Crd_RegistrationMethod", + name: "IX_Crd_B_RegistrationMethod_RegistrationTypeId", + table: "Crd_B_RegistrationMethod", column: "RegistrationTypeId"); migrationBuilder.CreateIndex( - name: "IX_B_Crd_ScheduleLesson_ScheduleId", - table: "B_Crd_ScheduleLesson", + name: "IX_Crd_B_ScheduleLesson_ScheduleId", + table: "Crd_B_ScheduleLesson", column: "ScheduleId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_T_Classroom_ScheduledStartTime", + table: "Crd_T_Classroom", + column: "ScheduledStartTime"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_Classroom_TeacherId", + table: "Crd_T_Classroom", + column: "TeacherId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomAttandance_JoinTime", + table: "Crd_T_ClassroomAttandance", + column: "JoinTime"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomAttandance_SessionId", + table: "Crd_T_ClassroomAttandance", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomAttandance_StudentId", + table: "Crd_T_ClassroomAttandance", + column: "StudentId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomChat_SenderId", + table: "Crd_T_ClassroomChat", + column: "SenderId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomChat_SessionId", + table: "Crd_T_ClassroomChat", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomChat_Timestamp", + table: "Crd_T_ClassroomChat", + column: "Timestamp"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomParticipant_SessionId", + table: "Crd_T_ClassroomParticipant", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomParticipant_SessionId_UserId", + table: "Crd_T_ClassroomParticipant", + columns: new[] { "SessionId", "UserId" }, + unique: true, + filter: "[UserId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_ClassroomParticipant_UserId", + table: "Crd_T_ClassroomParticipant", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_Question_QuestionPoolId", + table: "Crd_T_Question", + column: "QuestionPoolId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_T_QuestionOption_QuestionId", + table: "Crd_T_QuestionOption", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_CostCenter_DepartmentId", + table: "Hr_T_CostCenter", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_CostCenter_ParentCostCenterId", + table: "Hr_T_CostCenter", + column: "ParentCostCenterId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_CostCenter_ResponsibleEmployeeId", + table: "Hr_T_CostCenter", + column: "ResponsibleEmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Department_CostCenterId", + table: "Hr_T_Department", + column: "CostCenterId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Department_ManagerId", + table: "Hr_T_Department", + column: "ManagerId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Department_ParentDepartmentId", + table: "Hr_T_Department", + column: "ParentDepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_BadgeId", + table: "Hr_T_Employee", + column: "BadgeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_BankAccountId", + table: "Hr_T_Employee", + column: "BankAccountId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_DepartmentId", + table: "Hr_T_Employee", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_EmploymentTypeId", + table: "Hr_T_Employee", + column: "EmploymentTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_JobPositionId", + table: "Hr_T_Employee", + column: "JobPositionId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Employee_ManagerId", + table: "Hr_T_Employee", + column: "ManagerId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Expense_ApproverId", + table: "Hr_T_Expense", + column: "ApproverId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Expense_EmployeeId", + table: "Hr_T_Expense", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_JobPosition_DepartmentId", + table: "Hr_T_JobPosition", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Leave_EmployeeId", + table: "Hr_T_Leave", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Overtime_EmployeeId", + table: "Hr_T_Overtime", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_PayrollItem_PayrollItemId", + table: "Hr_T_PayrollItem", + column: "PayrollItemId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Performance360_DepartmentId", + table: "Hr_T_Performance360", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_Performance360_TemplateId", + table: "Hr_T_Performance360", + column: "TemplateId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyAnswer_QuestionId", + table: "Hr_T_SurveyAnswer", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyAnswer_ResponseId", + table: "Hr_T_SurveyAnswer", + column: "ResponseId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyQuestion_SurveyId", + table: "Hr_T_SurveyQuestion", + column: "SurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyQuestionOption_QuestionId", + table: "Hr_T_SurveyQuestionOption", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyResponse_EmployeeId", + table: "Hr_T_SurveyResponse", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Hr_T_SurveyResponse_SurveyId", + table: "Hr_T_SurveyResponse", + column: "SurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Announcement_EmployeeId", + table: "Net_T_Announcement", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Certificate_EmployeeId", + table: "Net_T_Certificate", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Certificate_TrainingId", + table: "Net_T_Certificate", + column: "TrainingId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Event_CategoryId", + table: "Net_T_Event", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Event_EmployeeId", + table: "Net_T_Event", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Event_TypeId", + table: "Net_T_Event", + column: "TypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_EventComment_EventId", + table: "Net_T_EventComment", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_EventPhoto_EventId", + table: "Net_T_EventPhoto", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Reservation_EmployeeId", + table: "Net_T_Reservation", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialComment_EmployeeId", + table: "Net_T_SocialComment", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialComment_SocialPostId", + table: "Net_T_SocialComment", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialLike_EmployeeId", + table: "Net_T_SocialLike", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialLike_SocialPostId", + table: "Net_T_SocialLike", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialLocation_SocialPostId", + table: "Net_T_SocialLocation", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialMedia_SocialPostId", + table: "Net_T_SocialMedia", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialPollOption_SocialMediaId", + table: "Net_T_SocialPollOption", + column: "SocialMediaId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_SocialPost_EmployeeId", + table: "Net_T_SocialPost", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Net_T_Visitor_EmployeeId", + table: "Net_T_Visitor", + column: "EmployeeId"); + migrationBuilder.CreateIndex( name: "IX_OpenIddictApplications_ClientId", table: "OpenIddictApplications", @@ -5515,644 +5780,164 @@ namespace Kurs.Platform.Migrations column: "NotificationRuleId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_City_Country_Code", - table: "P_Sas_City", + name: "IX_Sas_P_City_Country_Code", + table: "Sas_P_City", columns: new[] { "Country", "Code" }, unique: true, filter: "[Country] IS NOT NULL"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_City_CountryId", - table: "P_Sas_City", + name: "IX_Sas_P_City_CountryId", + table: "Sas_P_City", column: "CountryId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_Country_Code", - table: "P_Sas_Country", + name: "IX_Sas_P_Country_Code", + table: "Sas_P_Country", column: "Code", unique: true); migrationBuilder.CreateIndex( - name: "IX_P_Sas_Country_GroupName", - table: "P_Sas_Country", + name: "IX_Sas_P_Country_GroupName", + table: "Sas_P_Country", column: "GroupName"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_CountryGroup_Name", - table: "P_Sas_CountryGroup", + name: "IX_Sas_P_CountryGroup_Name", + table: "Sas_P_CountryGroup", column: "Name", unique: true); migrationBuilder.CreateIndex( - name: "IX_P_Sas_District_CityId", - table: "P_Sas_District", + name: "IX_Sas_P_District_CityId", + table: "Sas_P_District", column: "CityId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_District_Country_City_Name_Township_Street_ZipCode", - table: "P_Sas_District", + name: "IX_Sas_P_District_Country_City_Name_Township_Street_ZipCode", + table: "Sas_P_District", columns: new[] { "Country", "City", "Name", "Township", "Street", "ZipCode" }, unique: true, filter: "[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumCategory_DisplayOrder", - table: "P_Sas_ForumCategory", + name: "IX_Sas_P_ForumCategory_DisplayOrder", + table: "Sas_P_ForumCategory", column: "DisplayOrder"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumPost_ParentPostId", - table: "P_Sas_ForumPost", + name: "IX_Sas_P_ForumPost_ParentPostId", + table: "Sas_P_ForumPost", column: "ParentPostId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumPost_TopicId", - table: "P_Sas_ForumPost", + name: "IX_Sas_P_ForumPost_TopicId", + table: "Sas_P_ForumPost", column: "TopicId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumTopic_CategoryId", - table: "P_Sas_ForumTopic", + name: "IX_Sas_P_ForumTopic_CategoryId", + table: "Sas_P_ForumTopic", column: "CategoryId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumTopic_IsPinned", - table: "P_Sas_ForumTopic", + name: "IX_Sas_P_ForumTopic_IsPinned", + table: "Sas_P_ForumTopic", column: "IsPinned"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ForumTopic_LastPostDate", - table: "P_Sas_ForumTopic", + name: "IX_Sas_P_ForumTopic_LastPostDate", + table: "Sas_P_ForumTopic", column: "LastPostDate"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ListFormCustomization_ListFormCode", - table: "P_Sas_ListFormCustomization", + name: "IX_Sas_P_ListFormCustomization_ListFormCode", + table: "Sas_P_ListFormCustomization", column: "ListFormCode"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ListFormField_ListFormCode", - table: "P_Sas_ListFormField", + name: "IX_Sas_P_ListFormField_ListFormCode", + table: "Sas_P_ListFormField", column: "ListFormCode"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ListFormImport_ListFormCode", - table: "P_Sas_ListFormImport", + name: "IX_Sas_P_ListFormImport_ListFormCode", + table: "Sas_P_ListFormImport", column: "ListFormCode"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_ListFormImportExecute_ImportId", - table: "P_Sas_ListFormImportExecute", + name: "IX_Sas_P_ListFormImportExecute_ImportId", + table: "Sas_P_ListFormImportExecute", column: "ImportId"); migrationBuilder.CreateIndex( - name: "IX_P_Sas_Route_Key", - table: "P_Sas_Route", + name: "IX_Sas_P_Route_Key", + table: "Sas_P_Route", column: "Key", unique: true); migrationBuilder.CreateIndex( - name: "IX_Partners_CurrencyId", - table: "Partners", - column: "CurrencyId"); - - migrationBuilder.CreateIndex( - name: "IX_Partners_PaymentTermId", - table: "Partners", - column: "PaymentTermId"); - - migrationBuilder.CreateIndex( - name: "IX_Partners_SectorId", - table: "Partners", - column: "SectorId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Acc_BankAccount_BankId", - table: "T_Acc_BankAccount", - column: "BankId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_BlogCategory_Slug", - table: "T_Adm_BlogCategory", - column: "Slug"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_BlogPost_CategoryId", - table: "T_Adm_BlogPost", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_BlogPost_IsPublished", - table: "T_Adm_BlogPost", - column: "IsPublished"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_BlogPost_PublishedAt", - table: "T_Adm_BlogPost", - column: "PublishedAt"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_BlogPost_Slug", - table: "T_Adm_BlogPost", - column: "Slug"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_OrderItem_OrderId", - table: "T_Adm_OrderItem", - column: "OrderId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerBank_CurrencyId", - table: "T_Adm_PartnerBank", - column: "CurrencyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerBank_CustomerId", - table: "T_Adm_PartnerBank", - column: "CustomerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerBank_PartnerId", - table: "T_Adm_PartnerBank", - column: "PartnerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerBank_SupplyId", - table: "T_Adm_PartnerBank", - column: "SupplyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerCertificate_CustomerId", - table: "T_Adm_PartnerCertificate", - column: "CustomerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerCertificate_PartnerId", - table: "T_Adm_PartnerCertificate", - column: "PartnerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerCertificate_SupplyId", - table: "T_Adm_PartnerCertificate", - column: "SupplyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerContact_CustomerId", - table: "T_Adm_PartnerContact", - column: "CustomerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerContact_PartnerId", - table: "T_Adm_PartnerContact", - column: "PartnerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_PartnerContact_SupplyId", - table: "T_Adm_PartnerContact", - column: "SupplyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_Skill_SkillTypeId", - table: "T_Adm_Skill", - column: "SkillTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_SkillLevel_SkillTypeId", - table: "T_Adm_SkillLevel", - column: "SkillTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_Uom_UomCategoryId", - table: "T_Adm_Uom", - column: "UomCategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_Classroom_ScheduledStartTime", - table: "T_Crd_Classroom", - column: "ScheduledStartTime"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_Classroom_TeacherId", - table: "T_Crd_Classroom", - column: "TeacherId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomAttandance_JoinTime", - table: "T_Crd_ClassroomAttandance", - column: "JoinTime"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomAttandance_SessionId", - table: "T_Crd_ClassroomAttandance", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomAttandance_StudentId", - table: "T_Crd_ClassroomAttandance", - column: "StudentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomChat_SenderId", - table: "T_Crd_ClassroomChat", - column: "SenderId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomChat_SessionId", - table: "T_Crd_ClassroomChat", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomChat_Timestamp", - table: "T_Crd_ClassroomChat", - column: "Timestamp"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomParticipant_SessionId", - table: "T_Crd_ClassroomParticipant", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomParticipant_SessionId_UserId", - table: "T_Crd_ClassroomParticipant", - columns: new[] { "SessionId", "UserId" }, - unique: true, - filter: "[UserId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_ClassroomParticipant_UserId", - table: "T_Crd_ClassroomParticipant", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_Question_QuestionPoolId", - table: "T_Crd_Question", - column: "QuestionPoolId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crd_QuestionOption_QuestionId", - table: "T_Crd_QuestionOption", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_AssignedEmployeeId", - table: "T_Crm_Customer", - column: "AssignedEmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_CurrencyId", - table: "T_Crm_Customer", - column: "CurrencyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_CustomerSegmentId", - table: "T_Crm_Customer", - column: "CustomerSegmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_CustomerTypeId", - table: "T_Crm_Customer", - column: "CustomerTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_PaymentTermId", - table: "T_Crm_Customer", - column: "PaymentTermId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Crm_Customer_SectorId", - table: "T_Crm_Customer", - column: "SectorId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_CostCenter_DepartmentId", - table: "T_Hr_CostCenter", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_CostCenter_ParentCostCenterId", - table: "T_Hr_CostCenter", - column: "ParentCostCenterId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_CostCenter_ResponsibleEmployeeId", - table: "T_Hr_CostCenter", - column: "ResponsibleEmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Department_CostCenterId", - table: "T_Hr_Department", - column: "CostCenterId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Department_ManagerId", - table: "T_Hr_Department", - column: "ManagerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Department_ParentDepartmentId", - table: "T_Hr_Department", - column: "ParentDepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_BadgeId", - table: "T_Hr_Employee", - column: "BadgeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_BankAccountId", - table: "T_Hr_Employee", - column: "BankAccountId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_DepartmentId", - table: "T_Hr_Employee", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_EmploymentTypeId", - table: "T_Hr_Employee", - column: "EmploymentTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_JobPositionId", - table: "T_Hr_Employee", - column: "JobPositionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Employee_ManagerId", - table: "T_Hr_Employee", - column: "ManagerId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Expense_ApproverId", - table: "T_Hr_Expense", - column: "ApproverId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Expense_EmployeeId", - table: "T_Hr_Expense", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_JobPosition_DepartmentId", - table: "T_Hr_JobPosition", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Leave_EmployeeId", - table: "T_Hr_Leave", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Overtime_EmployeeId", - table: "T_Hr_Overtime", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_PayrollItem_PayrollItemId", - table: "T_Hr_PayrollItem", - column: "PayrollItemId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Performance360_DepartmentId", - table: "T_Hr_Performance360", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_Performance360_TemplateId", - table: "T_Hr_Performance360", - column: "TemplateId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyAnswer_QuestionId", - table: "T_Hr_SurveyAnswer", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyAnswer_ResponseId", - table: "T_Hr_SurveyAnswer", - column: "ResponseId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyQuestion_SurveyId", - table: "T_Hr_SurveyQuestion", - column: "SurveyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyQuestionOption_QuestionId", - table: "T_Hr_SurveyQuestionOption", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyResponse_EmployeeId", - table: "T_Hr_SurveyResponse", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Hr_SurveyResponse_SurveyId", - table: "T_Hr_SurveyResponse", - column: "SurveyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Announcement_EmployeeId", - table: "T_Net_Announcement", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Certificate_EmployeeId", - table: "T_Net_Certificate", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Certificate_TrainingId", - table: "T_Net_Certificate", - column: "TrainingId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Event_CategoryId", - table: "T_Net_Event", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Event_EmployeeId", - table: "T_Net_Event", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Event_TypeId", - table: "T_Net_Event", - column: "TypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_EventComment_EventId", - table: "T_Net_EventComment", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_EventPhoto_EventId", - table: "T_Net_EventPhoto", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Reservation_EmployeeId", - table: "T_Net_Reservation", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialComment_EmployeeId", - table: "T_Net_SocialComment", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialComment_SocialPostId", - table: "T_Net_SocialComment", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialLike_EmployeeId", - table: "T_Net_SocialLike", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialLike_SocialPostId", - table: "T_Net_SocialLike", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialLocation_SocialPostId", - table: "T_Net_SocialLocation", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialMedia_SocialPostId", - table: "T_Net_SocialMedia", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialPollOption_SocialMediaId", - table: "T_Net_SocialPollOption", - column: "SocialMediaId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_SocialPost_EmployeeId", - table: "T_Net_SocialPost", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Net_Visitor_EmployeeId", - table: "T_Net_Visitor", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Sas_ApiEndpoint_EntityId", - table: "T_Sas_ApiEndpoint", + name: "IX_Sas_T_ApiEndpoint_EntityId", + table: "Sas_T_ApiEndpoint", column: "EntityId"); migrationBuilder.CreateIndex( - name: "IX_T_Sas_ApiMigration_EntityId", - table: "T_Sas_ApiMigration", + name: "IX_Sas_T_ApiMigration_EntityId", + table: "Sas_T_ApiMigration", column: "EntityId"); migrationBuilder.CreateIndex( - name: "IX_T_Sas_CustomEntityField_EntityId", - table: "T_Sas_CustomEntityField", + name: "IX_Sas_T_CustomEntityField_EntityId", + table: "Sas_T_CustomEntityField", column: "EntityId"); migrationBuilder.CreateIndex( - name: "IX_T_Sas_ReportGenerated_TemplateId", - table: "T_Sas_ReportGenerated", + name: "IX_Sas_T_ReportGenerated_TemplateId", + table: "Sas_T_ReportGenerated", column: "TemplateId"); migrationBuilder.CreateIndex( - name: "IX_T_Sas_ReportParameter_TemplateId", - table: "T_Sas_ReportParameter", + name: "IX_Sas_T_ReportParameter_TemplateId", + table: "Sas_T_ReportParameter", column: "TemplateId"); migrationBuilder.CreateIndex( - name: "IX_T_Sas_ReportTemplate_CategoryId", - table: "T_Sas_ReportTemplate", + name: "IX_Sas_T_ReportTemplate_CategoryId", + table: "Sas_T_ReportTemplate", column: "CategoryId"); migrationBuilder.CreateIndex( - name: "IX_T_Scp_MaterialGroup_ParentGroupId", - table: "T_Scp_MaterialGroup", + name: "IX_Scp_T_MaterialGroup_ParentGroupId", + table: "Scp_T_MaterialGroup", column: "ParentGroupId"); - migrationBuilder.CreateIndex( - name: "IX_T_Scp_Supply_CurrencyId", - table: "T_Scp_Supply", - column: "CurrencyId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Scp_Supply_PaymentTermId", - table: "T_Scp_Supply", - column: "PaymentTermId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Scp_Supply_SectorId", - table: "T_Scp_Supply", - column: "SectorId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Scp_Supply_SupplierTypeId", - table: "T_Scp_Supply", - column: "SupplierTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Scp_Supply_SupplyCardTypeId", - table: "T_Scp_Supply", - column: "SupplyCardTypeId"); - migrationBuilder.AddForeignKey( - name: "FK_T_Adm_PartnerBank_T_Crm_Customer_CustomerId", - table: "T_Adm_PartnerBank", - column: "CustomerId", - principalTable: "T_Crm_Customer", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_T_Adm_PartnerCertificate_T_Crm_Customer_CustomerId", - table: "T_Adm_PartnerCertificate", - column: "CustomerId", - principalTable: "T_Crm_Customer", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_T_Adm_PartnerContact_T_Crm_Customer_CustomerId", - table: "T_Adm_PartnerContact", - column: "CustomerId", - principalTable: "T_Crm_Customer", - principalColumn: "Id"); - - migrationBuilder.AddForeignKey( - name: "FK_T_Crm_Customer_T_Hr_Employee_AssignedEmployeeId", - table: "T_Crm_Customer", + name: "FK_Adm_T_Partner_Hr_T_Employee_AssignedEmployeeId", + table: "Adm_T_Partner", column: "AssignedEmployeeId", - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( - name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId", - table: "T_Hr_CostCenter", + name: "FK_Hr_T_CostCenter_Hr_T_Department_DepartmentId", + table: "Hr_T_CostCenter", column: "DepartmentId", - principalTable: "T_Hr_Department", + principalTable: "Hr_T_Department", principalColumn: "Id"); migrationBuilder.AddForeignKey( - name: "FK_T_Hr_CostCenter_T_Hr_Employee_ResponsibleEmployeeId", - table: "T_Hr_CostCenter", + name: "FK_Hr_T_CostCenter_Hr_T_Employee_ResponsibleEmployeeId", + table: "Hr_T_CostCenter", column: "ResponsibleEmployeeId", - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id"); migrationBuilder.AddForeignKey( - name: "FK_T_Hr_Department_T_Hr_Employee_ManagerId", - table: "T_Hr_Department", + name: "FK_Hr_T_Department_Hr_T_Employee_ManagerId", + table: "Hr_T_Department", column: "ManagerId", - principalTable: "T_Hr_Employee", + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } @@ -6161,20 +5946,20 @@ namespace Kurs.Platform.Migrations protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( - name: "FK_T_Acc_BankAccount_T_Acc_Bank_BankId", - table: "T_Acc_BankAccount"); + name: "FK_Acc_T_BankAccount_Acc_T_Bank_BankId", + table: "Acc_T_BankAccount"); migrationBuilder.DropForeignKey( - name: "FK_T_Hr_CostCenter_T_Hr_Employee_ResponsibleEmployeeId", - table: "T_Hr_CostCenter"); + name: "FK_Hr_T_CostCenter_Hr_T_Employee_ResponsibleEmployeeId", + table: "Hr_T_CostCenter"); migrationBuilder.DropForeignKey( - name: "FK_T_Hr_Department_T_Hr_Employee_ManagerId", - table: "T_Hr_Department"); + name: "FK_Hr_T_Department_Hr_T_Employee_ManagerId", + table: "Hr_T_Department"); migrationBuilder.DropForeignKey( - name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId", - table: "T_Hr_CostCenter"); + name: "FK_Hr_T_CostCenter_Hr_T_Department_DepartmentId", + table: "Hr_T_CostCenter"); migrationBuilder.DropTable( name: "AbpAuditLogActions"); @@ -6249,22 +6034,169 @@ namespace Kurs.Platform.Migrations name: "AbpUserTokens"); migrationBuilder.DropTable( - name: "B_Crd_Class"); + name: "Adm_T_About"); migrationBuilder.DropTable( - name: "B_Crd_LessonPeriod"); + name: "Adm_T_Behavior"); migrationBuilder.DropTable( - name: "B_Crd_Level"); + name: "Adm_T_BlogPost"); migrationBuilder.DropTable( - name: "B_Crd_RegistrationMethod"); + name: "Adm_T_Contact"); migrationBuilder.DropTable( - name: "B_Crd_ScheduleLesson"); + name: "Adm_T_Demo"); migrationBuilder.DropTable( - name: "B_Net_Meal"); + name: "Adm_T_Disease"); + + migrationBuilder.DropTable( + name: "Adm_T_Document"); + + migrationBuilder.DropTable( + name: "Adm_T_EducationStatus"); + + migrationBuilder.DropTable( + name: "Adm_T_InstallmentOption"); + + migrationBuilder.DropTable( + name: "Adm_T_Lawyer"); + + migrationBuilder.DropTable( + name: "Adm_T_OrderItem"); + + migrationBuilder.DropTable( + name: "Adm_T_PartnerBank"); + + migrationBuilder.DropTable( + name: "Adm_T_PartnerCertificate"); + + migrationBuilder.DropTable( + name: "Adm_T_PartnerContact"); + + migrationBuilder.DropTable( + name: "Adm_T_PaymentMethod"); + + migrationBuilder.DropTable( + name: "Adm_T_Product"); + + migrationBuilder.DropTable( + name: "Adm_T_Psychologist"); + + migrationBuilder.DropTable( + name: "Adm_T_Service"); + + migrationBuilder.DropTable( + name: "Adm_T_Skill"); + + migrationBuilder.DropTable( + name: "Adm_T_SkillLevel"); + + migrationBuilder.DropTable( + name: "Adm_T_Uom"); + + migrationBuilder.DropTable( + name: "Adm_T_Vaccine"); + + migrationBuilder.DropTable( + name: "Adm_T_Vehicle"); + + migrationBuilder.DropTable( + name: "Adm_T_WorkHour"); + + migrationBuilder.DropTable( + name: "Crd_B_Class"); + + migrationBuilder.DropTable( + name: "Crd_B_LessonPeriod"); + + migrationBuilder.DropTable( + name: "Crd_B_Level"); + + migrationBuilder.DropTable( + name: "Crd_B_RegistrationMethod"); + + migrationBuilder.DropTable( + name: "Crd_B_ScheduleLesson"); + + migrationBuilder.DropTable( + name: "Crd_T_ClassCancellationReason"); + + migrationBuilder.DropTable( + name: "Crd_T_ClassroomAttandance"); + + migrationBuilder.DropTable( + name: "Crd_T_ClassroomChat"); + + migrationBuilder.DropTable( + name: "Crd_T_ClassroomParticipant"); + + migrationBuilder.DropTable( + name: "Crd_T_Program"); + + migrationBuilder.DropTable( + name: "Crd_T_QuestionOption"); + + migrationBuilder.DropTable( + name: "Crd_T_QuestionTag"); + + migrationBuilder.DropTable( + name: "Hr_T_Expense"); + + migrationBuilder.DropTable( + name: "Hr_T_Leave"); + + migrationBuilder.DropTable( + name: "Hr_T_Overtime"); + + migrationBuilder.DropTable( + name: "Hr_T_PayrollItem"); + + migrationBuilder.DropTable( + name: "Hr_T_Performance360"); + + migrationBuilder.DropTable( + name: "Hr_T_SurveyAnswer"); + + migrationBuilder.DropTable( + name: "Hr_T_SurveyQuestionOption"); + + migrationBuilder.DropTable( + name: "Net_B_Meal"); + + migrationBuilder.DropTable( + name: "Net_T_Announcement"); + + migrationBuilder.DropTable( + name: "Net_T_Certificate"); + + migrationBuilder.DropTable( + name: "Net_T_EventComment"); + + migrationBuilder.DropTable( + name: "Net_T_EventPhoto"); + + migrationBuilder.DropTable( + name: "Net_T_Reservation"); + + migrationBuilder.DropTable( + name: "Net_T_ShuttleRoute"); + + migrationBuilder.DropTable( + name: "Net_T_SocialComment"); + + migrationBuilder.DropTable( + name: "Net_T_SocialLike"); + + migrationBuilder.DropTable( + name: "Net_T_SocialLocation"); + + migrationBuilder.DropTable( + name: "Net_T_SocialPollOption"); + + migrationBuilder.DropTable( + name: "Net_T_Visitor"); migrationBuilder.DropTable( name: "OpenIddictScopes"); @@ -6272,12 +6204,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "OpenIddictTokens"); - migrationBuilder.DropTable( - name: "P_P_AiBot"); - - migrationBuilder.DropTable( - name: "P_P_BackgroundWorker"); - migrationBuilder.DropTable( name: "P_P_BackgroundWorker_MailQueueEvents"); @@ -6291,241 +6217,100 @@ namespace Kurs.Platform.Migrations name: "P_P_SettingDefinition"); migrationBuilder.DropTable( - name: "P_Sas_ContactTag"); + name: "Plat_P_AiBot"); migrationBuilder.DropTable( - name: "P_Sas_ContactTitle"); + name: "Plat_P_BackgroundWorker"); migrationBuilder.DropTable( - name: "P_Sas_DataSource"); + name: "Prt_T_Interesting"); migrationBuilder.DropTable( - name: "P_Sas_District"); + name: "Prt_T_MeetingMethod"); migrationBuilder.DropTable( - name: "P_Sas_ForumPost"); + name: "Prt_T_MeetingResult"); migrationBuilder.DropTable( - name: "P_Sas_ListFormCustomization"); + name: "Prt_T_NoteType"); migrationBuilder.DropTable( - name: "P_Sas_ListFormField"); + name: "Prt_T_SalesRejectionReason"); migrationBuilder.DropTable( - name: "P_Sas_ListFormImportExecute"); + name: "Prt_T_Source"); migrationBuilder.DropTable( - name: "P_Sas_Menu"); + name: "Sas_P_ContactTag"); migrationBuilder.DropTable( - name: "P_Sas_Route"); + name: "Sas_P_ContactTitle"); migrationBuilder.DropTable( - name: "T_Adm_About"); + name: "Sas_P_DataSource"); migrationBuilder.DropTable( - name: "T_Adm_Behavior"); + name: "Sas_P_District"); migrationBuilder.DropTable( - name: "T_Adm_BlogPost"); + name: "Sas_P_ForumPost"); migrationBuilder.DropTable( - name: "T_Adm_Contact"); + name: "Sas_P_ListFormCustomization"); migrationBuilder.DropTable( - name: "T_Adm_Demo"); + name: "Sas_P_ListFormField"); migrationBuilder.DropTable( - name: "T_Adm_Disease"); + name: "Sas_P_ListFormImportExecute"); migrationBuilder.DropTable( - name: "T_Adm_Document"); + name: "Sas_P_Menu"); migrationBuilder.DropTable( - name: "T_Adm_EducationStatus"); + name: "Sas_P_Route"); migrationBuilder.DropTable( - name: "T_Adm_InstallmentOption"); + name: "Sas_T_Activity"); migrationBuilder.DropTable( - name: "T_Adm_Lawyer"); + name: "Sas_T_ApiEndpoint"); migrationBuilder.DropTable( - name: "T_Adm_OrderItem"); + name: "Sas_T_ApiMigration"); migrationBuilder.DropTable( - name: "T_Adm_PartnerBank"); + name: "Sas_T_Branch"); migrationBuilder.DropTable( - name: "T_Adm_PartnerCertificate"); + name: "Sas_T_BranchUsers"); migrationBuilder.DropTable( - name: "T_Adm_PartnerContact"); + name: "Sas_T_CustomComponent"); migrationBuilder.DropTable( - name: "T_Adm_PaymentMethod"); + name: "Sas_T_CustomEndpoint"); migrationBuilder.DropTable( - name: "T_Adm_Product"); + name: "Sas_T_CustomEntityField"); migrationBuilder.DropTable( - name: "T_Adm_Psychologist"); + name: "Sas_T_GlobalSearch"); migrationBuilder.DropTable( - name: "T_Adm_Service"); + name: "Sas_T_IpRestriction"); migrationBuilder.DropTable( - name: "T_Adm_Skill"); + name: "Sas_T_ReportGenerated"); migrationBuilder.DropTable( - name: "T_Adm_SkillLevel"); + name: "Sas_T_ReportParameter"); migrationBuilder.DropTable( - name: "T_Adm_Uom"); + name: "Scp_T_MaterialGroup"); migrationBuilder.DropTable( - name: "T_Adm_Vaccine"); - - migrationBuilder.DropTable( - name: "T_Adm_Vehicle"); - - migrationBuilder.DropTable( - name: "T_Adm_WorkHour"); - - migrationBuilder.DropTable( - name: "T_Crd_ClassCancellationReason"); - - migrationBuilder.DropTable( - name: "T_Crd_ClassroomAttandance"); - - migrationBuilder.DropTable( - name: "T_Crd_ClassroomChat"); - - migrationBuilder.DropTable( - name: "T_Crd_ClassroomParticipant"); - - migrationBuilder.DropTable( - name: "T_Crd_Program"); - - migrationBuilder.DropTable( - name: "T_Crd_QuestionOption"); - - migrationBuilder.DropTable( - name: "T_Crd_QuestionTag"); - - migrationBuilder.DropTable( - name: "T_Hr_Expense"); - - migrationBuilder.DropTable( - name: "T_Hr_Leave"); - - migrationBuilder.DropTable( - name: "T_Hr_Overtime"); - - migrationBuilder.DropTable( - name: "T_Hr_PayrollItem"); - - migrationBuilder.DropTable( - name: "T_Hr_Performance360"); - - migrationBuilder.DropTable( - name: "T_Hr_SurveyAnswer"); - - migrationBuilder.DropTable( - name: "T_Hr_SurveyQuestionOption"); - - migrationBuilder.DropTable( - name: "T_Net_Announcement"); - - migrationBuilder.DropTable( - name: "T_Net_Certificate"); - - migrationBuilder.DropTable( - name: "T_Net_EventComment"); - - migrationBuilder.DropTable( - name: "T_Net_EventPhoto"); - - migrationBuilder.DropTable( - name: "T_Net_Reservation"); - - migrationBuilder.DropTable( - name: "T_Net_ShuttleRoute"); - - migrationBuilder.DropTable( - name: "T_Net_SocialComment"); - - migrationBuilder.DropTable( - name: "T_Net_SocialLike"); - - migrationBuilder.DropTable( - name: "T_Net_SocialLocation"); - - migrationBuilder.DropTable( - name: "T_Net_SocialPollOption"); - - migrationBuilder.DropTable( - name: "T_Net_Visitor"); - - migrationBuilder.DropTable( - name: "T_Prt_Interesting"); - - migrationBuilder.DropTable( - name: "T_Prt_MeetingMethod"); - - migrationBuilder.DropTable( - name: "T_Prt_MeetingResult"); - - migrationBuilder.DropTable( - name: "T_Prt_NoteType"); - - migrationBuilder.DropTable( - name: "T_Prt_SalesRejectionReason"); - - migrationBuilder.DropTable( - name: "T_Prt_Source"); - - migrationBuilder.DropTable( - name: "T_Sas_Activity"); - - migrationBuilder.DropTable( - name: "T_Sas_ApiEndpoint"); - - migrationBuilder.DropTable( - name: "T_Sas_ApiMigration"); - - migrationBuilder.DropTable( - name: "T_Sas_Branch"); - - migrationBuilder.DropTable( - name: "T_Sas_BranchUsers"); - - migrationBuilder.DropTable( - name: "T_Sas_CustomComponent"); - - migrationBuilder.DropTable( - name: "T_Sas_CustomEndpoint"); - - migrationBuilder.DropTable( - name: "T_Sas_CustomEntityField"); - - migrationBuilder.DropTable( - name: "T_Sas_GlobalSearch"); - - migrationBuilder.DropTable( - name: "T_Sas_IpRestriction"); - - migrationBuilder.DropTable( - name: "T_Sas_ReportGenerated"); - - migrationBuilder.DropTable( - name: "T_Sas_ReportParameter"); - - migrationBuilder.DropTable( - name: "T_Scp_MaterialGroup"); - - migrationBuilder.DropTable( - name: "T_Scp_MaterialType"); + name: "Scp_T_MaterialType"); migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -6543,10 +6328,52 @@ namespace Kurs.Platform.Migrations name: "AbpUsers"); migrationBuilder.DropTable( - name: "B_Crd_ClassType"); + name: "Adm_T_BlogCategory"); migrationBuilder.DropTable( - name: "B_Crd_Schedule"); + name: "Adm_T_Order"); + + migrationBuilder.DropTable( + name: "Adm_T_Partner"); + + migrationBuilder.DropTable( + name: "Adm_T_SkillType"); + + migrationBuilder.DropTable( + name: "Adm_T_UomCategory"); + + migrationBuilder.DropTable( + name: "Crd_B_ClassType"); + + migrationBuilder.DropTable( + name: "Crd_B_Schedule"); + + migrationBuilder.DropTable( + name: "Crd_T_Classroom"); + + migrationBuilder.DropTable( + name: "Crd_T_Question"); + + migrationBuilder.DropTable( + name: "Hr_T_Payroll"); + + migrationBuilder.DropTable( + name: "Hr_T_Template360"); + + migrationBuilder.DropTable( + name: "Hr_T_SurveyResponse"); + + migrationBuilder.DropTable( + name: "Hr_T_SurveyQuestion"); + + migrationBuilder.DropTable( + name: "Net_T_Training"); + + migrationBuilder.DropTable( + name: "Net_T_Event"); + + migrationBuilder.DropTable( + name: "Net_T_SocialMedia"); migrationBuilder.DropTable( name: "OpenIddictAuthorizations"); @@ -6564,73 +6391,61 @@ namespace Kurs.Platform.Migrations name: "P_P_NotificationRule"); migrationBuilder.DropTable( - name: "P_Sas_City"); + name: "Sas_P_City"); migrationBuilder.DropTable( - name: "P_Sas_ForumTopic"); + name: "Sas_P_ForumTopic"); migrationBuilder.DropTable( - name: "P_Sas_ListFormImport"); + name: "Sas_P_ListFormImport"); migrationBuilder.DropTable( - name: "T_Adm_BlogCategory"); + name: "Sas_T_CustomEntity"); migrationBuilder.DropTable( - name: "T_Adm_Order"); - - migrationBuilder.DropTable( - name: "Partners"); - - migrationBuilder.DropTable( - name: "T_Crm_Customer"); - - migrationBuilder.DropTable( - name: "T_Scp_Supply"); - - migrationBuilder.DropTable( - name: "T_Adm_SkillType"); - - migrationBuilder.DropTable( - name: "T_Adm_UomCategory"); - - migrationBuilder.DropTable( - name: "T_Crd_Classroom"); - - migrationBuilder.DropTable( - name: "T_Crd_Question"); - - migrationBuilder.DropTable( - name: "T_Hr_Payroll"); - - migrationBuilder.DropTable( - name: "T_Hr_Template360"); - - migrationBuilder.DropTable( - name: "T_Hr_SurveyResponse"); - - migrationBuilder.DropTable( - name: "T_Hr_SurveyQuestion"); - - migrationBuilder.DropTable( - name: "T_Net_Training"); - - migrationBuilder.DropTable( - name: "T_Net_Event"); - - migrationBuilder.DropTable( - name: "T_Net_SocialMedia"); - - migrationBuilder.DropTable( - name: "T_Sas_CustomEntity"); - - migrationBuilder.DropTable( - name: "T_Sas_ReportTemplate"); + name: "Sas_T_ReportTemplate"); migrationBuilder.DropTable( name: "AbpAuditLogs"); migrationBuilder.DropTable( - name: "B_Crd_RegistrationType"); + name: "Crm_T_CustomerSegment"); + + migrationBuilder.DropTable( + name: "Crm_T_CustomerType"); + + migrationBuilder.DropTable( + name: "Sas_P_Currency"); + + migrationBuilder.DropTable( + name: "Sas_T_Sector"); + + migrationBuilder.DropTable( + name: "Scp_T_PaymentTerm"); + + migrationBuilder.DropTable( + name: "Scp_T_SupplyCardType"); + + migrationBuilder.DropTable( + name: "Scp_T_SupplyType"); + + migrationBuilder.DropTable( + name: "Crd_B_RegistrationType"); + + migrationBuilder.DropTable( + name: "Crd_T_QuestionPool"); + + migrationBuilder.DropTable( + name: "Hr_T_Survey"); + + migrationBuilder.DropTable( + name: "Net_T_EventCategory"); + + migrationBuilder.DropTable( + name: "Net_T_EventType"); + + migrationBuilder.DropTable( + name: "Net_T_SocialPost"); migrationBuilder.DropTable( name: "OpenIddictApplications"); @@ -6639,79 +6454,43 @@ namespace Kurs.Platform.Migrations name: "P_P_BackgroundWorker_MailQueueTableFormat"); migrationBuilder.DropTable( - name: "P_Sas_Country"); + name: "Sas_P_Country"); migrationBuilder.DropTable( - name: "P_Sas_ForumCategory"); + name: "Sas_P_ForumCategory"); migrationBuilder.DropTable( - name: "P_Sas_ListForm"); + name: "Sas_P_ListForm"); migrationBuilder.DropTable( - name: "T_Crm_CustomerSegment"); + name: "Sas_T_ReportCategory"); migrationBuilder.DropTable( - name: "T_Crm_CustomerType"); + name: "Sas_P_CountryGroup"); migrationBuilder.DropTable( - name: "P_Sas_Currency"); + name: "Acc_T_Bank"); migrationBuilder.DropTable( - name: "T_Sas_Sector"); + name: "Hr_T_Employee"); migrationBuilder.DropTable( - name: "T_Scp_PaymentTerm"); + name: "Acc_T_BankAccount"); migrationBuilder.DropTable( - name: "T_Scp_SupplyCardType"); + name: "Hr_T_Badge"); migrationBuilder.DropTable( - name: "T_Scp_SupplyType"); + name: "Hr_T_EmploymentType"); migrationBuilder.DropTable( - name: "T_Crd_QuestionPool"); + name: "Hr_T_JobPosition"); migrationBuilder.DropTable( - name: "T_Hr_Survey"); + name: "Hr_T_Department"); migrationBuilder.DropTable( - name: "T_Net_EventCategory"); - - migrationBuilder.DropTable( - name: "T_Net_EventType"); - - migrationBuilder.DropTable( - name: "T_Net_SocialPost"); - - migrationBuilder.DropTable( - name: "T_Sas_ReportCategory"); - - migrationBuilder.DropTable( - name: "P_Sas_CountryGroup"); - - migrationBuilder.DropTable( - name: "T_Acc_Bank"); - - migrationBuilder.DropTable( - name: "T_Hr_Employee"); - - migrationBuilder.DropTable( - name: "T_Acc_BankAccount"); - - migrationBuilder.DropTable( - name: "T_Hr_Badge"); - - migrationBuilder.DropTable( - name: "T_Hr_EmploymentType"); - - migrationBuilder.DropTable( - name: "T_Hr_JobPosition"); - - migrationBuilder.DropTable( - name: "T_Hr_Department"); - - migrationBuilder.DropTable( - name: "T_Hr_CostCenter"); + name: "Hr_T_CostCenter"); } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index d270b2de..7e80b50f 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -619,7 +619,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_About", (string)null); + b.ToTable("Adm_T_About", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Activity", b => @@ -686,7 +686,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Activity", (string)null); + b.ToTable("Sas_T_Activity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -701,7 +701,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_P_AiBot", (string)null); + b.ToTable("Plat_P_AiBot", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b => @@ -796,7 +796,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Announcement", (string)null); + b.ToTable("Net_T_Announcement", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => @@ -872,7 +872,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_ApiEndpoint", (string)null); + b.ToTable("Sas_T_ApiEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => @@ -933,7 +933,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_ApiMigration", (string)null); + b.ToTable("Sas_T_ApiMigration", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => @@ -1006,7 +1006,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_P_BackgroundWorker", (string)null); + b.ToTable("Plat_P_BackgroundWorker", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Badge", b => @@ -1096,7 +1096,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Badge", (string)null); + b.ToTable("Hr_T_Badge", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Bank", b => @@ -1184,7 +1184,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Acc_Bank", (string)null); + b.ToTable("Acc_T_Bank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => @@ -1256,7 +1256,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("BankId"); - b.ToTable("T_Acc_BankAccount", (string)null); + b.ToTable("Acc_T_BankAccount", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => @@ -1305,7 +1305,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Behavior", (string)null); + b.ToTable("Adm_T_Behavior", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => @@ -1378,7 +1378,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("T_Adm_BlogCategory", (string)null); + b.ToTable("Adm_T_BlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1482,7 +1482,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("T_Adm_BlogPost", (string)null); + b.ToTable("Adm_T_BlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1596,7 +1596,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Branch", (string)null); + b.ToTable("Sas_T_Branch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => @@ -1616,7 +1616,7 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); - b.ToTable("T_Sas_BranchUsers", (string)null); + b.ToTable("Sas_T_BranchUsers", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => @@ -1683,7 +1683,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TrainingId"); - b.ToTable("T_Net_Certificate", (string)null); + b.ToTable("Net_T_Certificate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.City", b => @@ -1750,7 +1750,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL"); - b.ToTable("P_Sas_City", (string)null); + b.ToTable("Sas_P_City", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Class", b => @@ -1811,7 +1811,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("B_Crd_Class", (string)null); + b.ToTable("Crd_B_Class", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => @@ -1864,7 +1864,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_ClassCancellationReason", (string)null); + b.ToTable("Crd_T_ClassCancellationReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => @@ -1931,7 +1931,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("B_Crd_ClassType", (string)null); + b.ToTable("Crd_B_ClassType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => @@ -2027,7 +2027,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TeacherId"); - b.ToTable("T_Crd_Classroom", (string)null); + b.ToTable("Crd_T_Classroom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -2100,7 +2100,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("StudentId"); - b.ToTable("T_Crd_ClassroomAttandance", (string)null); + b.ToTable("Crd_T_ClassroomAttandance", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", b => @@ -2184,7 +2184,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Timestamp"); - b.ToTable("T_Crd_ClassroomChat", (string)null); + b.ToTable("Crd_T_ClassroomChat", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => @@ -2279,7 +2279,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[UserId] IS NOT NULL"); - b.ToTable("T_Crd_ClassroomParticipant", (string)null); + b.ToTable("Crd_T_ClassroomParticipant", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Contact", b => @@ -2352,7 +2352,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Contact", (string)null); + b.ToTable("Adm_T_Contact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => @@ -2401,7 +2401,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ContactTag", (string)null); + b.ToTable("Sas_P_ContactTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => @@ -2450,7 +2450,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ContactTitle", (string)null); + b.ToTable("Sas_P_ContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => @@ -2546,7 +2546,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResponsibleEmployeeId"); - b.ToTable("T_Hr_CostCenter", (string)null); + b.ToTable("Hr_T_CostCenter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2621,7 +2621,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("GroupName"); - b.ToTable("P_Sas_Country", (string)null); + b.ToTable("Sas_P_Country", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CountryGroup", b => @@ -2669,7 +2669,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Name") .IsUnique(); - b.ToTable("P_Sas_CountryGroup", (string)null); + b.ToTable("Sas_P_CountryGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Currency", b => @@ -2735,7 +2735,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_Currency", (string)null); + b.ToTable("Sas_P_Currency", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomComponent", b => @@ -2803,7 +2803,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomComponent", (string)null); + b.ToTable("Sas_T_CustomComponent", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEndpoint", b => @@ -2881,7 +2881,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomEndpoint", (string)null); + b.ToTable("Sas_T_CustomEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", b => @@ -2966,7 +2966,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_CustomEntity", (string)null); + b.ToTable("Sas_T_CustomEntity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => @@ -3041,181 +3041,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("T_Sas_CustomEntityField", (string)null); - }); - - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address1") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Address2") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("AssignedEmployeeId") - .HasColumnType("uniqueidentifier"); - - b.Property("AverageOrderValue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("City") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CreditLimit") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerSegmentId") - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("District") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Email") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Fax") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LastOrderDate") - .HasColumnType("datetime2"); - - b.Property("LifetimeValue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("Mobile") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PartyType") - .HasColumnType("int"); - - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); - - b.Property("Phone") - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("PostalCode") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); - - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Street") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TaxNumber") - .HasColumnType("bigint"); - - b.Property("TaxOffice") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TeamCode") - .HasMaxLength(95) - .HasColumnType("nvarchar(95)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TotalRevenue") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("Website") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("AssignedEmployeeId"); - - b.HasIndex("CurrencyId"); - - b.HasIndex("CustomerSegmentId"); - - b.HasIndex("CustomerTypeId"); - - b.HasIndex("PaymentTermId"); - - b.HasIndex("SectorId"); - - b.ToTable("T_Crm_Customer", (string)null); + b.ToTable("Sas_T_CustomEntityField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", b => @@ -3273,7 +3099,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crm_CustomerSegment", (string)null); + b.ToTable("Crm_T_CustomerSegment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", b => @@ -3331,7 +3157,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crm_CustomerType", (string)null); + b.ToTable("Crm_T_CustomerType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.DataSource", b => @@ -3383,7 +3209,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_DataSource", (string)null); + b.ToTable("Sas_P_DataSource", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Demo", b => @@ -3463,7 +3289,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Demo", (string)null); + b.ToTable("Adm_T_Demo", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Department", b => @@ -3547,7 +3373,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ParentDepartmentId"); - b.ToTable("T_Hr_Department", (string)null); + b.ToTable("Hr_T_Department", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => @@ -3596,7 +3422,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Disease", (string)null); + b.ToTable("Adm_T_Disease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -3671,7 +3497,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); - b.ToTable("P_Sas_District", (string)null); + b.ToTable("Sas_P_District", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Document", b => @@ -3720,7 +3546,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Document", (string)null); + b.ToTable("Adm_T_Document", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => @@ -3772,7 +3598,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_EducationStatus", (string)null); + b.ToTable("Adm_T_EducationStatus", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => @@ -3943,7 +3769,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ManagerId"); - b.ToTable("T_Hr_Employee", (string)null); + b.ToTable("Hr_T_Employee", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EmploymentType", b => @@ -3992,7 +3818,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_EmploymentType", (string)null); + b.ToTable("Hr_T_EmploymentType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Event", b => @@ -4082,7 +3908,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("T_Net_Event", (string)null); + b.ToTable("Net_T_Event", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => @@ -4131,7 +3957,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_EventCategory", (string)null); + b.ToTable("Net_T_EventCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b => @@ -4192,7 +4018,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Net_EventComment", (string)null); + b.ToTable("Net_T_EventComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b => @@ -4245,7 +4071,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Net_EventPhoto", (string)null); + b.ToTable("Net_T_EventPhoto", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => @@ -4294,7 +4120,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_EventType", (string)null); + b.ToTable("Net_T_EventType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Expense", b => @@ -4387,7 +4213,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Expense", (string)null); + b.ToTable("Hr_T_Expense", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => @@ -4425,7 +4251,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_GlobalSearch", (string)null); + b.ToTable("Sas_T_GlobalSearch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => @@ -4481,7 +4307,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_InstallmentOption", (string)null); + b.ToTable("Adm_T_InstallmentOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => @@ -4534,7 +4360,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_Interesting", (string)null); + b.ToTable("Prt_T_Interesting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -4592,7 +4418,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_IpRestriction", (string)null); + b.ToTable("Sas_T_IpRestriction", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => @@ -4684,7 +4510,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DepartmentId"); - b.ToTable("T_Hr_JobPosition", (string)null); + b.ToTable("Hr_T_JobPosition", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => @@ -4781,7 +4607,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Lawyer", (string)null); + b.ToTable("Adm_T_Lawyer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Leave", b => @@ -4873,7 +4699,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Leave", (string)null); + b.ToTable("Hr_T_Leave", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => @@ -4945,7 +4771,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_LessonPeriod", (string)null); + b.ToTable("Crd_B_LessonPeriod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Level", b => @@ -5023,7 +4849,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("B_Crd_Level", (string)null); + b.ToTable("Crd_B_Level", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => @@ -5315,7 +5141,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_ListForm", (string)null); + b.ToTable("Sas_P_ListForm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -5380,7 +5206,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormCustomization", (string)null); + b.ToTable("Sas_P_ListFormCustomization", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => @@ -5547,7 +5373,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormField", (string)null); + b.ToTable("Sas_P_ListFormField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => @@ -5607,7 +5433,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("P_Sas_ListFormImport", (string)null); + b.ToTable("Sas_P_ListFormImport", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => @@ -5677,7 +5503,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ImportId"); - b.ToTable("P_Sas_ListFormImportExecute", (string)null); + b.ToTable("Sas_P_ListFormImportExecute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b => @@ -5745,7 +5571,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ParentGroupId"); - b.ToTable("T_Scp_MaterialGroup", (string)null); + b.ToTable("Scp_T_MaterialGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MaterialType", b => @@ -5808,7 +5634,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_MaterialType", (string)null); + b.ToTable("Scp_T_MaterialType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => @@ -5870,7 +5696,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Net_Meal", (string)null); + b.ToTable("Net_B_Meal", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => @@ -5929,7 +5755,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_MeetingMethod", (string)null); + b.ToTable("Prt_T_MeetingMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => @@ -5986,7 +5812,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_MeetingResult", (string)null); + b.ToTable("Prt_T_MeetingResult", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => @@ -6082,7 +5908,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("P_Sas_Menu", (string)null); + b.ToTable("Sas_P_Menu", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => @@ -6131,7 +5957,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_NoteType", (string)null); + b.ToTable("Prt_T_NoteType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Order", b => @@ -6264,7 +6090,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Order", (string)null); + b.ToTable("Adm_T_Order", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -6329,7 +6155,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("T_Adm_OrderItem", (string)null); + b.ToTable("Adm_T_OrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Overtime", b => @@ -6418,83 +6244,153 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Hr_Overtime", (string)null); + b.ToTable("Hr_T_Overtime", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Address1") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Address2") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); - b.Property("City") - .HasColumnType("nvarchar(max)"); - - b.Property("Code") - .HasColumnType("nvarchar(max)"); - - b.Property("Country") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") + b.Property("AssignedEmployeeId") .HasColumnType("uniqueidentifier"); + b.Property("AverageOrderValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CardNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + b.Property("CreditLimit") - .HasColumnType("decimal(18,2)"); + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") + b.Property("CurrentBalance") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CustomerSegmentId") .HasColumnType("uniqueidentifier"); + b.Property("CustomerTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + b.Property("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiscountRate") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("District") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Email") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Fax") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("IsDeleted") - .HasColumnType("bit"); + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("LastOrderDate") + b.Property("LastOrderDate") .HasColumnType("datetime2"); + b.Property("LifetimeValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + b.Property("Mobile") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("Name") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PartyType") + .HasColumnType("int"); b.Property("PaymentTermId") .HasColumnType("uniqueidentifier"); + b.Property("PerformanceMetricsJson") + .HasColumnType("text"); + b.Property("Phone") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); b.Property("PostalCode") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); b.Property("SectorId") .HasColumnType("uniqueidentifier"); @@ -6503,29 +6399,65 @@ namespace Kurs.Platform.Migrations .HasColumnType("int"); b.Property("Street") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SupplierTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SupplyCardTypeId") + .HasColumnType("uniqueidentifier"); b.Property("TaxNumber") .HasColumnType("bigint"); b.Property("TaxOffice") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TeamCode") + .HasMaxLength(95) + .HasColumnType("nvarchar(95)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalRevenue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("ValidFrom") + .HasColumnType("datetime2"); + + b.Property("ValidTo") + .HasColumnType("datetime2"); b.Property("Website") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); + b.HasIndex("AssignedEmployeeId"); + b.HasIndex("CurrencyId"); + b.HasIndex("CustomerSegmentId"); + + b.HasIndex("CustomerTypeId"); + b.HasIndex("PaymentTermId"); b.HasIndex("SectorId"); - b.ToTable("Partners"); + b.HasIndex("SupplierTypeId"); + + b.HasIndex("SupplyCardTypeId"); + + b.ToTable("Adm_T_Partner", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => @@ -6548,8 +6480,10 @@ namespace Kurs.Platform.Migrations .HasColumnType("nvarchar(64)"); b.Property("Balance") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("BankName") .IsRequired() @@ -6571,12 +6505,11 @@ namespace Kurs.Platform.Migrations b.Property("CurrencyId") .HasColumnType("uniqueidentifier"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DailyTransferLimit") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -6616,15 +6549,14 @@ namespace Kurs.Platform.Migrations .HasColumnName("LastModifierId"); b.Property("OverdraftLimit") + .ValueGeneratedOnAdd() .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("SwiftCode") .HasMaxLength(11) .HasColumnType("nvarchar(11)"); @@ -6637,13 +6569,9 @@ namespace Kurs.Platform.Migrations b.HasIndex("CurrencyId"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerBank", (string)null); + b.ToTable("Adm_T_PartnerBank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => @@ -6664,9 +6592,6 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -6702,22 +6627,15 @@ namespace Kurs.Platform.Migrations b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.HasKey("Id"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerCertificate", (string)null); + b.ToTable("Adm_T_PartnerCertificate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", b => @@ -6733,9 +6651,6 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerId") - .HasColumnType("uniqueidentifier"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -6792,9 +6707,6 @@ namespace Kurs.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("SupplyId") - .HasColumnType("uniqueidentifier"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -6805,13 +6717,9 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CustomerId"); - b.HasIndex("PartnerId"); - b.HasIndex("SupplyId"); - - b.ToTable("T_Adm_PartnerContact", (string)null); + b.ToTable("Adm_T_PartnerContact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -6868,7 +6776,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_PaymentMethod", (string)null); + b.ToTable("Adm_T_PaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentTerm", b => @@ -6917,7 +6825,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_PaymentTerm", (string)null); + b.ToTable("Scp_T_PaymentTerm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b => @@ -7005,7 +6913,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Payroll", (string)null); + b.ToTable("Hr_T_Payroll", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b => @@ -7078,7 +6986,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("PayrollItemId"); - b.ToTable("T_Hr_PayrollItem", (string)null); + b.ToTable("Hr_T_PayrollItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => @@ -7155,7 +7063,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Hr_Performance360", (string)null); + b.ToTable("Hr_T_Performance360", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -7231,7 +7139,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Product", (string)null); + b.ToTable("Adm_T_Product", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Program", b => @@ -7284,7 +7192,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_Program", (string)null); + b.ToTable("Crd_T_Program", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => @@ -7349,7 +7257,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Psychologist", (string)null); + b.ToTable("Adm_T_Psychologist", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Question", b => @@ -7442,7 +7350,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionPoolId"); - b.ToTable("T_Crd_Question", (string)null); + b.ToTable("Crd_T_Question", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", b => @@ -7503,7 +7411,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("T_Crd_QuestionOption", (string)null); + b.ToTable("Crd_T_QuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", b => @@ -7560,7 +7468,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_QuestionPool", (string)null); + b.ToTable("Crd_T_QuestionPool", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b => @@ -7622,7 +7530,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Crd_QuestionTag", (string)null); + b.ToTable("Crd_T_QuestionTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => @@ -7682,7 +7590,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("B_Crd_RegistrationMethod", (string)null); + b.ToTable("Crd_B_RegistrationMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => @@ -7738,7 +7646,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_RegistrationType", (string)null); + b.ToTable("Crd_B_RegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -7795,7 +7703,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_ReportCategory", (string)null); + b.ToTable("Sas_T_ReportCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => @@ -7857,7 +7765,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Sas_ReportGenerated", (string)null); + b.ToTable("Sas_T_ReportGenerated", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => @@ -7930,7 +7838,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("T_Sas_ReportParameter", (string)null); + b.ToTable("Sas_T_ReportParameter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => @@ -7996,7 +7904,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CategoryId"); - b.ToTable("T_Sas_ReportTemplate", (string)null); + b.ToTable("Sas_T_ReportTemplate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b => @@ -8078,7 +7986,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Reservation", (string)null); + b.ToTable("Net_T_Reservation", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Route", b => @@ -8143,7 +8051,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("P_Sas_Route", (string)null); + b.ToTable("Sas_P_Route", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => @@ -8200,7 +8108,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_SalesRejectionReason", (string)null); + b.ToTable("Prt_T_SalesRejectionReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => @@ -8304,7 +8212,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("B_Crd_Schedule", (string)null); + b.ToTable("Crd_B_Schedule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => @@ -8377,7 +8285,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ScheduleId"); - b.ToTable("B_Crd_ScheduleLesson", (string)null); + b.ToTable("Crd_B_ScheduleLesson", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => @@ -8426,7 +8334,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Sas_Sector", (string)null); + b.ToTable("Sas_T_Sector", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Service", b => @@ -8489,7 +8397,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Service", (string)null); + b.ToTable("Adm_T_Service", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ShuttleRoute", b => @@ -8564,7 +8472,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_ShuttleRoute", (string)null); + b.ToTable("Net_T_ShuttleRoute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -8618,7 +8526,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("T_Adm_Skill", (string)null); + b.ToTable("Adm_T_Skill", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => @@ -8682,7 +8590,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("T_Adm_SkillLevel", (string)null); + b.ToTable("Adm_T_SkillLevel", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => @@ -8731,7 +8639,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_SkillType", (string)null); + b.ToTable("Adm_T_SkillType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialComment", b => @@ -8790,7 +8698,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("T_Net_SocialComment", (string)null); + b.ToTable("Net_T_SocialComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialLike", b => @@ -8844,7 +8752,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("T_Net_SocialLike", (string)null); + b.ToTable("Net_T_SocialLike", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialLocation", b => @@ -8913,7 +8821,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("T_Net_SocialLocation", (string)null); + b.ToTable("Net_T_SocialLocation", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialMedia", b => @@ -8984,7 +8892,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("T_Net_SocialMedia", (string)null); + b.ToTable("Net_T_SocialMedia", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialPollOption", b => @@ -9041,7 +8949,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SocialMediaId"); - b.ToTable("T_Net_SocialPollOption", (string)null); + b.ToTable("Net_T_SocialPollOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SocialPost", b => @@ -9110,7 +9018,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_SocialPost", (string)null); + b.ToTable("Net_T_SocialPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Source", b => @@ -9163,150 +9071,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Prt_Source", (string)null); - }); - - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Address1") - .HasColumnType("nvarchar(max)"); - - b.Property("Address2") - .HasColumnType("nvarchar(max)"); - - b.Property("CardNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("City") - .HasColumnType("nvarchar(max)"); - - b.Property("Code") - .HasColumnType("nvarchar(max)"); - - b.Property("Country") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreditLimit") - .HasColumnType("decimal(18,2)"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("CurrentBalance") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DiscountRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,2)") - .HasDefaultValue(0m); - - b.Property("District") - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasColumnType("nvarchar(max)"); - - b.Property("Fax") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LastOrderDate") - .HasColumnType("datetime2"); - - b.Property("Mobile") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PartyType") - .HasColumnType("int"); - - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); - - b.Property("PerformanceMetricsJson") - .HasColumnType("text"); - - b.Property("Phone") - .HasColumnType("nvarchar(max)"); - - b.Property("PostalCode") - .HasColumnType("nvarchar(max)"); - - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Street") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("SupplyCardTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TaxNumber") - .HasColumnType("bigint"); - - b.Property("TaxOffice") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ValidFrom") - .HasColumnType("datetime2"); - - b.Property("ValidTo") - .HasColumnType("datetime2"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CurrencyId"); - - b.HasIndex("PaymentTermId"); - - b.HasIndex("SectorId"); - - b.HasIndex("SupplierTypeId"); - - b.HasIndex("SupplyCardTypeId"); - - b.ToTable("T_Scp_Supply", (string)null); + b.ToTable("Prt_T_Source", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", b => @@ -9364,7 +9129,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_SupplyCardType", (string)null); + b.ToTable("Scp_T_SupplyCardType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", b => @@ -9422,7 +9187,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Scp_SupplyType", (string)null); + b.ToTable("Scp_T_SupplyType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => @@ -9491,7 +9256,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Survey", (string)null); + b.ToTable("Hr_T_Survey", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", b => @@ -9554,7 +9319,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResponseId"); - b.ToTable("T_Hr_SurveyAnswer", (string)null); + b.ToTable("Hr_T_SurveyAnswer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestion", b => @@ -9619,7 +9384,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SurveyId"); - b.ToTable("T_Hr_SurveyQuestion", (string)null); + b.ToTable("Hr_T_SurveyQuestion", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestionOption", b => @@ -9676,7 +9441,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("T_Hr_SurveyQuestionOption", (string)null); + b.ToTable("Hr_T_SurveyQuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SurveyResponse", b => @@ -9733,7 +9498,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SurveyId"); - b.ToTable("T_Hr_SurveyResponse", (string)null); + b.ToTable("Hr_T_SurveyResponse", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => @@ -9798,7 +9563,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Hr_Template360", (string)null); + b.ToTable("Hr_T_Template360", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Training", b => @@ -9901,7 +9666,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Net_Training", (string)null); + b.ToTable("Net_T_Training", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => @@ -9971,7 +9736,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("UomCategoryId"); - b.ToTable("T_Adm_Uom", (string)null); + b.ToTable("Adm_T_Uom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => @@ -10020,7 +9785,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_UomCategory", (string)null); + b.ToTable("Adm_T_UomCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => @@ -10069,7 +9834,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Vaccine", (string)null); + b.ToTable("Adm_T_Vaccine", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => @@ -10161,7 +9926,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_Vehicle", (string)null); + b.ToTable("Adm_T_Vehicle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Visitor", b => @@ -10252,7 +10017,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("T_Net_Visitor", (string)null); + b.ToTable("Net_T_Visitor", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => @@ -10332,7 +10097,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("T_Adm_WorkHour", (string)null); + b.ToTable("Adm_T_WorkHour", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => @@ -10422,7 +10187,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("P_Sas_ForumCategory", (string)null); + b.ToTable("Sas_P_ForumCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => @@ -10492,7 +10257,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("P_Sas_ForumPost", (string)null); + b.ToTable("Sas_P_ForumPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => @@ -10591,7 +10356,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("P_Sas_ForumTopic", (string)null); + b.ToTable("Sas_P_ForumTopic", (string)null); }); modelBuilder.Entity("Kurs.Settings.Entities.SettingDefinition", b => @@ -12745,49 +12510,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Entity"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.HasOne("Kurs.Platform.Entities.Employee", "AssignedEmployee") - .WithMany() - .HasForeignKey("AssignedEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Kurs.Platform.Entities.Currency", "Currency") - .WithMany() - .HasForeignKey("CurrencyId"); - - b.HasOne("Kurs.Platform.Entities.CustomerSegment", "CustomerSegment") - .WithMany("Customers") - .HasForeignKey("CustomerSegmentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.CustomerType", "CustomerType") - .WithMany("Customers") - .HasForeignKey("CustomerTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") - .WithMany() - .HasForeignKey("PaymentTermId"); - - b.HasOne("Kurs.Platform.Entities.Sector", "Sector") - .WithMany() - .HasForeignKey("SectorId"); - - b.Navigation("AssignedEmployee"); - - b.Navigation("Currency"); - - b.Navigation("CustomerSegment"); - - b.Navigation("CustomerType"); - - b.Navigation("PaymentTerm"); - - b.Navigation("Sector"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.Department", b => { b.HasOne("Kurs.Platform.Entities.CostCenter", "CostCenter") @@ -13029,10 +12751,25 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => { + b.HasOne("Kurs.Platform.Entities.Employee", "AssignedEmployee") + .WithMany("Partners") + .HasForeignKey("AssignedEmployeeId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") .WithMany() .HasForeignKey("CurrencyId"); + b.HasOne("Kurs.Platform.Entities.CustomerSegment", "CustomerSegment") + .WithMany("Partners") + .HasForeignKey("CustomerSegmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.CustomerType", "CustomerType") + .WithMany("Partners") + .HasForeignKey("CustomerTypeId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") .WithMany() .HasForeignKey("PaymentTermId"); @@ -13041,11 +12778,31 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("SectorId"); + b.HasOne("Kurs.Platform.Entities.SupplyType", "SupplierType") + .WithMany("Partners") + .HasForeignKey("SupplierTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.SupplyCardType", "SupplyCardType") + .WithMany("Partners") + .HasForeignKey("SupplyCardTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AssignedEmployee"); + b.Navigation("Currency"); + b.Navigation("CustomerSegment"); + + b.Navigation("CustomerType"); + b.Navigation("PaymentTerm"); b.Navigation("Sector"); + + b.Navigation("SupplierType"); + + b.Navigation("SupplyCardType"); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => @@ -13054,20 +12811,12 @@ namespace Kurs.Platform.Migrations .WithMany() .HasForeignKey("CurrencyId"); - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Banks") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Banks") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Banks") - .HasForeignKey("SupplyId"); - b.Navigation("Currency"); b.Navigation("Partner"); @@ -13075,39 +12824,23 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => { - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Certificates") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Certificates") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Certificates") - .HasForeignKey("SupplyId"); - b.Navigation("Partner"); }); modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", b => { - b.HasOne("Kurs.Platform.Entities.Customer", null) - .WithMany("Contacts") - .HasForeignKey("CustomerId"); - b.HasOne("Kurs.Platform.Entities.Partner", "Partner") .WithMany("Contacts") .HasForeignKey("PartnerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Kurs.Platform.Entities.Supply", null) - .WithMany("Contacts") - .HasForeignKey("SupplyId"); - b.Navigation("Partner"); }); @@ -13324,41 +13057,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.HasOne("Kurs.Platform.Entities.Currency", "Currency") - .WithMany() - .HasForeignKey("CurrencyId"); - - b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") - .WithMany() - .HasForeignKey("PaymentTermId"); - - b.HasOne("Kurs.Platform.Entities.Sector", "Sector") - .WithMany() - .HasForeignKey("SectorId"); - - b.HasOne("Kurs.Platform.Entities.SupplyType", "SupplierType") - .WithMany("Supplies") - .HasForeignKey("SupplierTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Kurs.Platform.Entities.SupplyCardType", "SupplyCardType") - .WithMany("Supplies") - .HasForeignKey("SupplyCardTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Currency"); - - b.Navigation("PaymentTerm"); - - b.Navigation("Sector"); - - b.Navigation("SupplierType"); - - b.Navigation("SupplyCardType"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", b => { b.HasOne("Kurs.Platform.Entities.SurveyQuestion", "Question") @@ -13671,23 +13369,14 @@ namespace Kurs.Platform.Migrations b.Navigation("Fields"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Customer", b => - { - b.Navigation("Banks"); - - b.Navigation("Certificates"); - - b.Navigation("Contacts"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", b => { - b.Navigation("Customers"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", b => { - b.Navigation("Customers"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.Department", b => @@ -13709,6 +13398,8 @@ namespace Kurs.Platform.Migrations b.Navigation("Overtimes"); + b.Navigation("Partners"); + b.Navigation("Reservations"); b.Navigation("SurveyResponses"); @@ -13814,23 +13505,14 @@ namespace Kurs.Platform.Migrations b.Navigation("Media"); }); - modelBuilder.Entity("Kurs.Platform.Entities.Supply", b => - { - b.Navigation("Banks"); - - b.Navigation("Certificates"); - - b.Navigation("Contacts"); - }); - modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", b => { - b.Navigation("Supplies"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", b => { - b.Navigation("Supplies"); + b.Navigation("Partners"); }); modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs index ec77f119..8a4290f4 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs @@ -83,7 +83,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency + COALESCE(lvl4.Name, '''') + CASE WHEN lvl4.Name IS NOT NULL THEN N'' -> '' ELSE N'''' END + lvl5.Name AS HierarchyPath - FROM T_Scp_MaterialGroup lvl5 + FROM {fullTableName} lvl5 LEFT JOIN {fullTableName} lvl4 ON lvl5.ParentGroupId = lvl4.Id LEFT JOIN {fullTableName} lvl3 ON lvl4.ParentGroupId = lvl3.Id LEFT JOIN {fullTableName} lvl2 ON lvl3.ParentGroupId = lvl2.Id