From cceba7bc9299297e06020e1bdb3596d67740b052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Mon, 20 Oct 2025 14:32:41 +0300 Subject: [PATCH] TableNameResolver --- .../LanguagesDbProperties.cs | 14 +- .../ILanguagesDbContext.cs | 2 +- .../EntityFrameworkCore/LanguagesDbContext.cs | 2 +- ...nguagesDbContextModelCreatingExtensions.cs | 7 +- .../Domain/MailQueueDbProperties.cs | 14 +- .../IMailQueueDbContext.cs | 2 +- .../EntityFrameworkCore/MailQueueDbContext.cs | 2 +- ...ilQueueDbContextModelCreatingExtensions.cs | 13 +- .../NotificationDbProperties.cs | 14 +- .../INotificationDbContext.cs | 2 +- .../NotificationDbContext.cs | 2 +- ...icationDbContextModelCreatingExtensions.cs | 4 +- .../SettingsDbProperties.cs | 14 +- .../EntityFrameworkCore/ISettingsDbContext.cs | 2 +- .../EntityFrameworkCore/SettingsDbContext.cs | 2 +- ...ettingsDbContextModelCreatingExtensions.cs | 2 +- .../Seeds/ListFormsSeeder.cs | 320 +- .../Enums/LookUpQueryValues.cs | 221 + .../Enums/MenuPrefixEnum.cs | 44 + .../Enums/TableNameEnum.cs | 106 + .../PlatformConsts.cs | 199 +- .../TableNameResolver.cs | 137 + .../EntityFrameworkCore/PlatformDbContext.cs | 275 +- ....cs => 20251020111635_Initial.Designer.cs} | 202 +- ...0_Initial.cs => 20251020111635_Initial.cs} | 4012 ++++++++--------- .../PlatformDbContextModelSnapshot.cs | 200 +- api/src/Kurs.Platform.HttpApi.Host/Program.cs | 4 +- ui/src/views/intranet/Announcement.tsx | 2 +- ui/src/views/intranet/Birthday.tsx | 2 +- ui/src/views/intranet/Cafeteria.tsx | 2 +- ui/src/views/intranet/Dashboard.tsx | 2 +- ui/src/views/intranet/Document.tsx | 2 +- ui/src/views/intranet/Event.tsx | 2 +- .../views/intranet/HR/ExpenseManagement.tsx | 2 +- ui/src/views/intranet/HR/LeaveManagement.tsx | 8 +- .../views/intranet/HR/OvertimeManagement.tsx | 76 +- ui/src/views/intranet/Reservation.tsx | 2 +- ui/src/views/intranet/Survey.tsx | 2 +- ui/src/views/intranet/Training.tsx | 2 +- ui/src/views/intranet/Visitor.tsx | 2 +- 40 files changed, 3147 insertions(+), 2777 deletions(-) create mode 100644 api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs create mode 100644 api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs create mode 100644 api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs create mode 100644 api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251018150230_Initial.Designer.cs => 20251020111635_Initial.Designer.cs} (98%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251018150230_Initial.cs => 20251020111635_Initial.cs} (89%) diff --git a/api/modules/Kurs.Languages/Kurs.Languages.Domain/LanguagesDbProperties.cs b/api/modules/Kurs.Languages/Kurs.Languages.Domain/LanguagesDbProperties.cs index d9079bbd..379223a1 100644 --- a/api/modules/Kurs.Languages/Kurs.Languages.Domain/LanguagesDbProperties.cs +++ b/api/modules/Kurs.Languages/Kurs.Languages.Domain/LanguagesDbProperties.cs @@ -1,10 +1,18 @@ namespace Kurs.Languages; -public static class LanguagesDbProperties +public static class Prefix { - public static string DbTablePrefix { get; set; } = "P"; - + public static string DbTablePlatform { get; set; } = "P"; + public static string MenuPlatform { get; set; } = "P"; public static string? DbSchema { get; set; } = null; public const string ConnectionStringName = "Languages"; } + +public static class TablePrefix +{ + public static string ByName(string tableName) + { + return $"{Prefix.DbTablePlatform}_{Prefix.MenuPlatform}_{tableName}"; + } +} diff --git a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/ILanguagesDbContext.cs b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/ILanguagesDbContext.cs index 2ca2fc2b..eb65f012 100644 --- a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/ILanguagesDbContext.cs +++ b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/ILanguagesDbContext.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Languages.EntityFrameworkCore; -[ConnectionStringName(LanguagesDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public interface ILanguagesDbContext : IEfCoreDbContext { /* Add DbSet for each Aggregate Root here. Example: diff --git a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContext.cs b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContext.cs index 67180fb0..aeca7368 100644 --- a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContext.cs +++ b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContext.cs @@ -5,7 +5,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Languages.EntityFrameworkCore; -[ConnectionStringName(LanguagesDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public class LanguagesDbContext : AbpDbContext, ILanguagesDbContext { public DbSet Languages { get; set; } diff --git a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContextModelCreatingExtensions.cs b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContextModelCreatingExtensions.cs index 50fec8c4..53ce1d36 100644 --- a/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContextModelCreatingExtensions.cs +++ b/api/modules/Kurs.Languages/Kurs.Languages.EntityFrameworkCore/EntityFrameworkCore/LanguagesDbContextModelCreatingExtensions.cs @@ -14,7 +14,7 @@ public static class LanguagesDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(LanguagesDbProperties.DbTablePrefix + nameof(Language), LanguagesDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(Language)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.CultureName).HasMaxLength(10).IsRequired(); @@ -31,13 +31,12 @@ public static class LanguagesDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(LanguagesDbProperties.DbTablePrefix + nameof(LanguageKey), LanguagesDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(LanguageKey)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Key).HasMaxLength(100).IsRequired(); b.Property(a => a.ResourceName).HasMaxLength(50).IsRequired(); - // LanguageKey → LanguageText (ResourceName + Key üzerinden) b.HasMany(a => a.Texts) .WithOne(t => t.LanguageKey) .HasForeignKey(t => new { t.ResourceName, t.Key }) @@ -50,7 +49,7 @@ public static class LanguagesDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(LanguagesDbProperties.DbTablePrefix + nameof(LanguageText), LanguagesDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(LanguageText)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.CultureName).HasMaxLength(10).IsRequired(); diff --git a/api/modules/Kurs.MailQueue/Domain/MailQueueDbProperties.cs b/api/modules/Kurs.MailQueue/Domain/MailQueueDbProperties.cs index ec0df935..bb9e148b 100644 --- a/api/modules/Kurs.MailQueue/Domain/MailQueueDbProperties.cs +++ b/api/modules/Kurs.MailQueue/Domain/MailQueueDbProperties.cs @@ -1,10 +1,18 @@ namespace Kurs.MailQueue.Domain; -public static class MailQueueDbProperties +public static class Prefix { - public static string DbTablePrefix { get; set; } = "P"; - + public static string DbTablePlatform { get; set; } = "P"; + public static string MenuPlatform { get; set; } = "P"; public static string? DbSchema { get; set; } = null; public const string ConnectionStringName = "Default"; } + +public static class TablePrefix +{ + public static string ByName(string tableName) + { + return $"{Prefix.DbTablePlatform}_{Prefix.MenuPlatform}_{tableName}"; + } +} \ No newline at end of file diff --git a/api/modules/Kurs.MailQueue/EntityFrameworkCore/IMailQueueDbContext.cs b/api/modules/Kurs.MailQueue/EntityFrameworkCore/IMailQueueDbContext.cs index 776a1711..91751b29 100644 --- a/api/modules/Kurs.MailQueue/EntityFrameworkCore/IMailQueueDbContext.cs +++ b/api/modules/Kurs.MailQueue/EntityFrameworkCore/IMailQueueDbContext.cs @@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.MailQueue.EntityFrameworkCore; -[ConnectionStringName(MailQueueDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public interface IMailQueueDbContext : IEfCoreDbContext { /* Add DbSet for each Aggregate Root here. Example: diff --git a/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContext.cs b/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContext.cs index b8d68f9b..d02cd9cd 100644 --- a/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContext.cs +++ b/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContext.cs @@ -5,7 +5,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.MailQueue.EntityFrameworkCore; -[ConnectionStringName(MailQueueDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public class MailQueueDbContext : AbpDbContext, IMailQueueDbContext { public DbSet MailQueue { get; set; } diff --git a/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContextModelCreatingExtensions.cs b/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContextModelCreatingExtensions.cs index e1e9603a..d547c67f 100644 --- a/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContextModelCreatingExtensions.cs +++ b/api/modules/Kurs.MailQueue/EntityFrameworkCore/MailQueueDbContextModelCreatingExtensions.cs @@ -1,4 +1,5 @@ using Kurs.MailQueue.Domain; +using Kurs.MailQueue.Domain.Entities; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -11,9 +12,9 @@ public static class MailQueueDbContextModelCreatingExtensions { Check.NotNull(builder, nameof(builder)); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(MailQueueDbProperties.DbTablePrefix + nameof(Domain.Entities.BackgroundWorker_MailQueue), MailQueueDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueue)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.From).IsRequired().HasMaxLength(100); @@ -41,9 +42,9 @@ public static class MailQueueDbContextModelCreatingExtensions .OnDelete(DeleteBehavior.Cascade); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(MailQueueDbProperties.DbTablePrefix + nameof(Domain.Entities.BackgroundWorker_MailQueueEvents), MailQueueDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueEvents)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.AwsMessageId).IsRequired().HasMaxLength(100); @@ -51,9 +52,9 @@ public static class MailQueueDbContextModelCreatingExtensions b.Property(x => x.MailAddress).HasMaxLength(100); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(MailQueueDbProperties.DbTablePrefix + nameof(Domain.Entities.BackgroundWorker_MailQueueTableFormat), MailQueueDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(BackgroundWorker_MailQueueTableFormat)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.TableName).IsRequired().HasMaxLength(100); diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.Domain/NotificationDbProperties.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.Domain/NotificationDbProperties.cs index 7a823b17..4909b434 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.Domain/NotificationDbProperties.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.Domain/NotificationDbProperties.cs @@ -1,10 +1,18 @@ namespace Kurs.Notifications.Domain; -public static class NotificationDbProperties +public static class Prefix { - public static string DbTablePrefix { get; set; } = "P"; - + public static string DbTablePlatform { get; set; } = "P"; + public static string MenuPlatform { get; set; } = "P"; public static string? DbSchema { get; set; } = null; public const string ConnectionStringName = "Notifications"; } + +public static class TablePrefix +{ + public static string ByName(string tableName) + { + return $"{Prefix.DbTablePlatform}_{Prefix.MenuPlatform}_{tableName}"; + } +} \ No newline at end of file diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/INotificationDbContext.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/INotificationDbContext.cs index 25550e29..7bde10a8 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/INotificationDbContext.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/INotificationDbContext.cs @@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Notifications.EntityFrameworkCore; -[ConnectionStringName(NotificationDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public interface INotificationDbContext : IEfCoreDbContext { /* Add DbSet for each Aggregate Root here. Example: diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContext.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContext.cs index 13ffb391..61c0f929 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContext.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContext.cs @@ -6,7 +6,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Notifications.EntityFrameworkCore; -[ConnectionStringName(NotificationDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public class NotificationDbContext : AbpDbContext, INotificationDbContext { /* Add DbSet for each Aggregate Root here. Example: diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContextModelCreatingExtensions.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContextModelCreatingExtensions.cs index 713aada2..9ca6117d 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContextModelCreatingExtensions.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.EntityFrameworkCore/EntityFrameworkCore/NotificationDbContextModelCreatingExtensions.cs @@ -15,7 +15,7 @@ public static class NotificationDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(NotificationDbProperties.DbTablePrefix + nameof(NotificationRule), NotificationDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(NotificationRule)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.NotificationType).IsRequired().HasMaxLength(100); @@ -32,7 +32,7 @@ public static class NotificationDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(NotificationDbProperties.DbTablePrefix + nameof(Notification), NotificationDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(Notification)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.NotificationChannel).IsRequired().HasMaxLength(50); diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Domain/SettingsDbProperties.cs b/api/modules/Kurs.Settings/Kurs.Settings.Domain/SettingsDbProperties.cs index 96ab945d..dfbac43d 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Domain/SettingsDbProperties.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Domain/SettingsDbProperties.cs @@ -1,10 +1,18 @@ namespace Kurs.Settings; -public static class SettingsDbProperties +public static class Prefix { - public static string DbTablePrefix { get; set; } = "P"; - + public static string DbTablePlatform { get; set; } = "P"; + public static string MenuPlatform { get; set; } = "P"; public static string? DbSchema { get; set; } = null; public const string ConnectionStringName = "Settings"; } + +public static class TablePrefix +{ + public static string ByName(string tableName) + { + return $"{Prefix.DbTablePlatform}_{Prefix.MenuPlatform}_{tableName}"; + } +} \ No newline at end of file diff --git a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/ISettingsDbContext.cs b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/ISettingsDbContext.cs index e3906c17..c04150d4 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/ISettingsDbContext.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/ISettingsDbContext.cs @@ -3,7 +3,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Settings.EntityFrameworkCore; -[ConnectionStringName(SettingsDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public interface ISettingsDbContext : IEfCoreDbContext { /* Add DbSet for each Aggregate Root here. Example: diff --git a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContext.cs b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContext.cs index cd861ac7..44aaf6da 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContext.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContext.cs @@ -6,7 +6,7 @@ using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace Kurs.Settings.EntityFrameworkCore; -[ConnectionStringName(SettingsDbProperties.ConnectionStringName)] +[ConnectionStringName(Prefix.ConnectionStringName)] public class SettingsDbContext : AbpDbContext, ISettingsDbContext { public DbSet Settings { get; set; } diff --git a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs index e8d97fdb..add26ef6 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs @@ -20,7 +20,7 @@ public static class SettingsDbContextModelCreatingExtensions builder.Entity(b => { - b.ToTable(SettingsDbProperties.DbTablePrefix + nameof(SettingDefinition), SettingsDbProperties.DbSchema); + b.ToTable(TablePrefix.ByName(nameof(SettingDefinition)), Prefix.DbSchema); b.ConfigureByConvention(); var valueComparerDict = new ValueComparer>( diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 28cb1585..daf1e631 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -87,7 +87,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Languages.Language, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Language"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Language)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -102,7 +102,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Languages.Language + ".Import", A = AppCodes.Languages.Language + ".Activity" }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Language\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Language))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -397,7 +397,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.SkillType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("SkillType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -412,7 +412,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.SkillType + ".Import", A = AppCodes.Definitions.SkillType + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -574,7 +574,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.UomCategory, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -589,7 +589,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.UomCategory + ".Import", A = AppCodes.Definitions.UomCategory + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -755,7 +755,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Accounting.Bank, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Bank"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -770,7 +770,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Accounting.Bank + ".Import", A = AppCodes.Accounting.Bank + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -2139,7 +2139,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.QuestionPool, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("QuestionPool", Prefix.DbTableCoordinator), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionPool)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -2172,7 +2172,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.QuestionPool + ".Import", A = AppCodes.Definitions.QuestionPool + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("QuestionPool", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionPool))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -3286,7 +3286,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Branches, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Branch"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Branch)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -3386,7 +3386,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Branch\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Branch))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -5419,7 +5419,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Languages.Language, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Language"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Language)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -5464,7 +5464,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Languages.Language + ".Import", A = AppCodes.Languages.Language + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Language\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Language))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -5757,7 +5757,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Languages.LanguageText, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("LanguageText"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.LanguageText)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -5802,7 +5802,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Languages.LanguageText + ".Import", A = AppCodes.Languages.LanguageText + ".Activity" }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}LanguageText\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.LanguageText))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -6106,7 +6106,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Menus.Menu, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Menu"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -6151,7 +6151,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Menus.Menu + ".Import", A = AppCodes.Menus.Menu + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Menu\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -6463,7 +6463,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"Code\" AS \"Key\", \"DisplayName\" AS \"Name\" FROM \"{Prefix.DbTableDefault}Menu\" WHERE \"IsDeleted\" = 'false' AND \"IsDisabled\" = 'false' ORDER BY \"ParentCode\", \"Order\"" + LookupQuery = $"SELECT \"Code\" AS \"Key\", \"DisplayName\" AS \"Name\" FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" WHERE \"IsDeleted\" = 'false' AND \"IsDisabled\" = 'false' ORDER BY \"ParentCode\", \"Order\"" }), ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { @@ -6682,7 +6682,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Listforms.Listform, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ListForm"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListForm)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -6719,7 +6719,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency AllowColumnReordering = true, ColumnResizingMode = "widget", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}ListForm\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ListForm)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { FieldName = "DeleterId", @@ -7656,7 +7656,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Settings.SettingDefinitions, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("SettingDefinition"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SettingDefinition)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -7701,7 +7701,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Settings.SettingDefinitions + ".Import", A = AppCodes.Settings.SettingDefinitions + ".Activity" }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}SettingDefinition\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { FieldName = "DeleterId", @@ -8405,7 +8405,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Listforms.DataSource, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("DataSource"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.DataSource)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -8450,7 +8450,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Listforms.DataSource + ".Import", A = AppCodes.Listforms.DataSource + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}DataSource\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { FieldName = "DeleterId", @@ -8693,7 +8693,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.BackgroundWorkers, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("BackgroundWorker"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.BackgroundWorker)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -8761,7 +8761,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.BackgroundWorkers + ".Import", A = AppCodes.BackgroundWorkers + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}BackgroundWorker\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -9143,7 +9143,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Notifications.NotificationRules, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("NotificationRule"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.NotificationRule)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -9188,7 +9188,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Notifications.NotificationRules + ".Import", A = AppCodes.Notifications.NotificationRules + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}NotificationRule\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -9609,7 +9609,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Notifications.Notification, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Notification"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Notification)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -9654,7 +9654,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Notifications.Notification + ".Import", A = AppCodes.Notifications.Notification + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Notification\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -10000,7 +10000,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.IdentityManagement.IpRestrictions, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("IpRestriction"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.IpRestriction)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -10045,7 +10045,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.IdentityManagement.IpRestrictions + ".Import", A = AppCodes.IdentityManagement.IpRestrictions + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}IpRestriction\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.IpRestriction)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -10290,7 +10290,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.CustomEndpoints, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("CustomEndpoint"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomEndpoint)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -10344,7 +10344,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.CustomEndpoints + ".Import", A = AppCodes.CustomEndpoints + ".Activity", }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}CustomEndpoint\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.CustomEndpoint)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -10614,7 +10614,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}DataSource\".\"Code\" AS \"Key\", \"{Prefix.DbTableDefault}DataSource\".\"Code\" AS \"Name\" FROM \"{Prefix.DbTableDefault}DataSource\"", + LookupQuery = LookUpQueryValues.DataSourceValues, }), PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { @@ -10746,7 +10746,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Settings.GlobalSearch, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("GlobalSearch"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.GlobalSearch)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Int32, SortMode = GridOptions.SortModeSingle, @@ -11873,7 +11873,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Routes, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Route"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Route)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -11906,7 +11906,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Routes + ".Import", A = AppCodes.Routes + ".Activity" }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}Route\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -12204,7 +12204,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Reports.Categories, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ReportCategory"), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportCategory)), KeyFieldName = "Id", DefaultFilter = "\"IsDeleted\" = 'false'", KeyFieldDbSourceType = DbType.Int32, @@ -12279,7 +12279,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{Prefix.DbTableDefault}ReportCategory\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ReportCategory)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -12462,7 +12462,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.About, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("About", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.About)), KeyFieldName = "Id", DefaultFilter = "\"IsDeleted\" = 'false'", KeyFieldDbSourceType = DbType.Guid, @@ -12537,7 +12537,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("About", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.About))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -12723,7 +12723,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Services, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Service", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Service)), KeyFieldName = "Id", DefaultFilter = "\"IsDeleted\" = 'false'", KeyFieldDbSourceType = DbType.Guid, @@ -12800,7 +12800,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Service", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Service))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -13069,7 +13069,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Orders.Products, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Product", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Product)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -13102,7 +13102,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Orders.Products + ".Import", A = AppCodes.Orders.Products + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Product", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Product))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -13467,7 +13467,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Orders.PaymentMethods, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentMethod)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.String, SortMode = GridOptions.SortModeSingle, @@ -13541,7 +13541,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentMethod))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -13710,7 +13710,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Orders.InstallmentOptions, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.InstallmentOption)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, @@ -13784,7 +13784,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.InstallmentOption))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -13953,7 +13953,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Orders.PurchaseOrders, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Order", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Order)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -13986,7 +13986,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Orders.PurchaseOrders + ".Import", A = AppCodes.Orders.PurchaseOrders + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Order", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Order))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -14669,7 +14669,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.BlogManagement.BlogCategory, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogCategory)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -14702,7 +14702,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.BlogManagement.BlogCategory + ".Import", A = AppCodes.BlogManagement.BlogCategory + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogCategory))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -15036,7 +15036,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.BlogManagement.BlogPosts, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("BlogPost", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogPost)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -15069,7 +15069,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.BlogManagement.BlogPosts + ".Import", A = AppCodes.BlogManagement.BlogPosts + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("BlogPosts", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogPost))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -15374,7 +15374,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb)}\".\"Id\" AS \"Key\", \"{SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb)}\" ORDER BY \"{SelectCommandByTableName("BlogCategory", Prefix.DbTableWeb)}\".\"Name\"" + LookupQuery = LookUpQueryValues.BlogCategoryValues }), ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { @@ -15604,7 +15604,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Demos, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Demo", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Demo)), KeyFieldName = "Id", DefaultFilter = "\"IsDeleted\" = 'false'", KeyFieldDbSourceType = DbType.Guid, @@ -15684,7 +15684,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Demo", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Demo))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -16001,7 +16001,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Contact, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Contact", Prefix.DbTableWeb), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Contact)), KeyFieldName = "Id", DefaultFilter = "\"IsDeleted\" = 'false'", KeyFieldDbSourceType = DbType.Guid, @@ -16081,7 +16081,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ] } }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Contact", Prefix.DbTableWeb)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Contact))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -16425,7 +16425,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.ContactTag, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ContactTag", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTag)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -16458,7 +16458,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.ContactTag + ".Import", A = AppCodes.Parameters.ContactTag + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("ContactTag", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTag))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -16672,7 +16672,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.ContactTitle, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ContactTitle", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTitle)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -16705,7 +16705,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.ContactTitle + ".Import", A = AppCodes.Parameters.ContactTitle + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("ContactTitle", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTitle))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -16919,7 +16919,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.Currency, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Currency", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -16952,7 +16952,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.Currency + ".Import", A = AppCodes.Parameters.Currency + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Currency", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -17269,7 +17269,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.CountryGroup, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CountryGroup)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -17302,7 +17302,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.CountryGroup + ".Import", A = AppCodes.Parameters.CountryGroup + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.CountryGroup))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -17475,7 +17475,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.Country, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Country", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -17508,7 +17508,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.Country + ".Import", A = AppCodes.Parameters.Country + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -17696,7 +17696,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\" GROUP BY \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\".\"Name\" ORDER BY \"{SelectCommandByTableName("CountryGroup", Prefix.DbTableDefinition)}\".\"Name\"" + LookupQuery = LookUpQueryValues.CountryGroupValues, }), ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { @@ -17873,7 +17873,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.City, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("City", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.City)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -17906,7 +17906,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.City + ".Import", A = AppCodes.Parameters.City + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.City))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -18179,7 +18179,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Parameters.District, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("District", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.District)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -18213,7 +18213,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Parameters.City + ".Import", A = AppCodes.Parameters.City + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.District))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -18560,7 +18560,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Sector, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Sector", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Sector)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -18594,7 +18594,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Sector + ".Import", A = AppCodes.Definitions.Sector + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Sector", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Sector))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -18769,7 +18769,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.SkillType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("SkillType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -18803,7 +18803,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.SkillType + ".Import", A = AppCodes.Definitions.SkillType + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -18985,7 +18985,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.SkillLevel, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("SkillLevel", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillLevel)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -19030,7 +19030,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.SkillLevel + ".Import", A = AppCodes.Definitions.SkillLevel + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("SkillLevel", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillLevel))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -19263,7 +19263,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\" ORDER BY \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = LookUpQueryValues.SkillTypeValues, }), ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} @@ -19318,7 +19318,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Skill, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Skill", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Skill)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -19363,7 +19363,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Skill + ".Import", A = AppCodes.Definitions.Skill + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Skill", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Skill))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { FieldName = "DeleterId", @@ -19522,7 +19522,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\" ORDER BY \"{SelectCommandByTableName("SkillType", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = LookUpQueryValues.SkillTypeValues, }), ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} @@ -19577,7 +19577,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.UomCategory, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -19610,7 +19610,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.UomCategory + ".Import", A = AppCodes.Definitions.UomCategory + ".Activity" }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { new FieldsDefaultValue @@ -19792,7 +19792,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Uom, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Uom", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Uom)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -19837,7 +19837,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Uom + ".Import", A = AppCodes.Definitions.Uom + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Uom", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Uom))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -20115,7 +20115,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\" ORDER BY \"{SelectCommandByTableName("UomCategory", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = LookUpQueryValues.UomCategoryValues, }), ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} @@ -20170,7 +20170,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Behavior, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Behavior", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Behavior)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -20203,7 +20203,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Behavior + ".Import", A = AppCodes.Definitions.Behavior + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Behavior", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Behavior))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -20373,7 +20373,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Disease, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Disease", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Disease)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -20406,7 +20406,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Disease + ".Import", A = AppCodes.Definitions.Disease + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Disease", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Disease))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -20575,7 +20575,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Document, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Document", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Document)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -20608,7 +20608,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Document + ".Import", A = AppCodes.Definitions.Document + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Document", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Document))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -20777,7 +20777,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.EducationStatus, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("EducationStatus", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EducationStatus)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -20810,7 +20810,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.EducationStatus + ".Import", A = AppCodes.Definitions.EducationStatus + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EducationStatus", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.EducationStatus))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -21011,7 +21011,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.EventType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("EventType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -21044,7 +21044,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.EventType + ".Import", A = AppCodes.Definitions.EventType + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EventType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -21213,7 +21213,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.EventCategory, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("EventCategory", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventCategory)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -21246,7 +21246,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.EventCategory + ".Import", A = AppCodes.Definitions.EventCategory + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EventCategory", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventCategory))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -21415,7 +21415,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Event, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Event", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Event)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -21448,7 +21448,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Event + ".Import", A = AppCodes.Definitions.Event + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Event", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Event))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -21782,7 +21782,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.MeetingMethod, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("MeetingMethod", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -21815,7 +21815,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.MeetingMethod + ".Import", A = AppCodes.Definitions.MeetingMethod + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("MeetingMethod", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -22077,7 +22077,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.MeetingResult, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("MeetingResult", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -22110,7 +22110,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.MeetingResult + ".Import", A = AppCodes.Definitions.MeetingResult + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("MeetingResult", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -22361,7 +22361,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Program, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Program", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Program)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -22394,7 +22394,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Program + ".Import", A = AppCodes.Definitions.Program + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Program", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Program))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -22614,7 +22614,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Interesting, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Interesting", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -22647,7 +22647,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Interesting + ".Import", A = AppCodes.Definitions.Interesting + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Interesting", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -22867,7 +22867,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.SalesRejectionReason, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("SalesRejectionReason", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -22900,7 +22900,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.SalesRejectionReason + ".Import", A = AppCodes.Definitions.SalesRejectionReason + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("SalesRejectionReason", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -23163,7 +23163,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Source, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Source", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -23196,7 +23196,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Source + ".Import", A = AppCodes.Definitions.Source + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Source", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -23416,7 +23416,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Vaccine, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Vaccine", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vaccine)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -23449,7 +23449,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Vaccine + ".Import", A = AppCodes.Definitions.Vaccine + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Vaccine", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vaccine))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -23619,7 +23619,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.NoteType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("NoteType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -23652,7 +23652,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.NoteType + ".Import", A = AppCodes.Definitions.NoteType + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("NoteType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -23822,7 +23822,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.ClassCancellationReason, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ClassCancellationReason", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassCancellationReason)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -23855,7 +23855,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.ClassCancellationReason + ".Import", A = AppCodes.Definitions.ClassCancellationReason + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("ClassCancellationReason", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassCancellationReason))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -24075,7 +24075,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.WorkHour, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("WorkHour", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkHour)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -24108,7 +24108,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.WorkHour + ".Import", A = AppCodes.Definitions.WorkHour + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("WorkHour", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkHour))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -24587,7 +24587,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Vehicle, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Vehicle", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vehicle)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -24620,7 +24620,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Vehicle + ".Import", A = AppCodes.Definitions.Vehicle + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Vehicle", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vehicle))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -25115,7 +25115,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Psychologist, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Psychologist", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Psychologist)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -25148,7 +25148,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Psychologist + ".Import", A = AppCodes.Definitions.Psychologist + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Psychologist", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Psychologist))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() @@ -25467,7 +25467,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Lawyer, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Lawyer", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Lawyer)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -25500,7 +25500,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Lawyer + ".Import", A = AppCodes.Definitions.Lawyer + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Lawyer", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Lawyer))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -26041,7 +26041,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.RegistrationType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -26074,7 +26074,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.RegistrationType + ".Import", A = AppCodes.Definitions.RegistrationType + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -26314,7 +26314,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.RegistrationMethod, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("RegistrationMethod", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationMethod)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -26347,7 +26347,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.RegistrationMethod + ".Import", A = AppCodes.Definitions.RegistrationMethod + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("RegistrationMethod", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationMethod))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -26624,7 +26624,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.ClassType, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("ClassType", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassType)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -26657,7 +26657,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.ClassType + ".Import", A = AppCodes.Definitions.ClassType + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -26991,7 +26991,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Class, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Class", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Class)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -27024,7 +27024,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Class + ".Import", A = AppCodes.Definitions.Class + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Class", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Class))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -27301,7 +27301,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Level, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Level", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Level)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -27334,7 +27334,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Level + ".Import", A = AppCodes.Definitions.Level + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Level", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Level))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -27769,7 +27769,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.LessonPeriod, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("LessonPeriod", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.LessonPeriod)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -27802,7 +27802,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.LessonPeriod + ".Import", A = AppCodes.Definitions.LessonPeriod + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("LessonPeriod", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.LessonPeriod))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -28189,7 +28189,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Schedule, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Schedule", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Schedule)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -28222,7 +28222,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Schedule + ".Import", A = AppCodes.Definitions.Schedule + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Schedule", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Schedule))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -28952,7 +28952,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Meal, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Meal", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Meal)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -28985,7 +28985,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Meal + ".Import", A = AppCodes.Definitions.Meal + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Meal", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Meal))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() @@ -29294,7 +29294,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Accounting.Bank, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Bank", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -29339,7 +29339,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Accounting.Bank + ".Import", A = AppCodes.Accounting.Bank + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -29886,7 +29886,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Accounting.BankAccount, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("BankAccount", Prefix.DbTableDefinition), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.BankAccount)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -29931,7 +29931,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Accounting.BankAccount + ".Import", A = AppCodes.Accounting.BankAccount + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("BankAccount", Prefix.DbTableDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BankAccount))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -30062,7 +30062,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\" ORDER BY \"{SelectCommandByTableName("Bank", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = LookUpQueryValues.BankValues }), ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { @@ -30171,7 +30171,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}Currency\".\"Id\" AS \"Key\", \"{Prefix.DbTableDefault}Currency\".\"Code\" as \"Name\" FROM \"{Prefix.DbTableDefault}Currency\" ORDER BY \"{Prefix.DbTableDefault}Currency\".\"Name\"", + LookupQuery = LookUpQueryValues.CurrencyValues, }), ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { @@ -30255,7 +30255,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.QuestionTag, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionTag)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -30288,7 +30288,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.QuestionTag + ".Import", A = AppCodes.Definitions.QuestionTag + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionTag))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -30522,7 +30522,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.QuestionPool, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("QuestionPool", Prefix.DbTableCoordinator), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionPool)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -30555,7 +30555,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.QuestionPool + ".Import", A = AppCodes.Definitions.QuestionPool + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("QuestionPool", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionPool))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", @@ -30805,7 +30805,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsOrganizationUnit = false, Description = AppCodes.Definitions.Question, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Question", Prefix.DbTableCoordinator), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Question)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", @@ -30838,7 +30838,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency I = AppCodes.Definitions.Question + ".Import", A = AppCodes.Definitions.Question + ".Activity", }), - DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Question", Prefix.DbTableCoordinator)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Question))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs new file mode 100644 index 00000000..51c401a5 --- /dev/null +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs @@ -0,0 +1,221 @@ +using Kurs.Platform.Enums; +using static Kurs.Platform.PlatformConsts; + +namespace Kurs.Platform; + +public static class LookUpQueryValues +{ + public static string LanguageKeyValues = + $"SELECT " + + $"\"{FullNameTable(TableNameEnum.LanguageKey)}\".\"Key\", " + + $"CONCAT(" + + $"\"{FullNameTable(TableNameEnum.LanguageKey)}\".\"Key\", " + + $"' (', " + + $"\"{FullNameTable(TableNameEnum.LanguageText)}\".\"Value\", " + + $"')'" + + $") AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.LanguageKey)}\" " + + $"LEFT OUTER JOIN \"{FullNameTable(TableNameEnum.LanguageText)}\" " + + $"ON \"{FullNameTable(TableNameEnum.LanguageKey)}\".\"Key\" = \"{FullNameTable(TableNameEnum.LanguageText)}\".\"Key\" " + + $"AND \"{FullNameTable(TableNameEnum.LanguageKey)}\".\"ResourceName\" = \"{FullNameTable(TableNameEnum.LanguageText)}\".\"ResourceName\" " + + $"WHERE " + + $"\"{FullNameTable(TableNameEnum.LanguageKey)}\".\"IsDeleted\" = 'false' " + + $"AND \"{FullNameTable(TableNameEnum.LanguageText)}\".\"IsDeleted\" = 'false' " + + $"AND \"{FullNameTable(TableNameEnum.LanguageText)}\".\"CultureName\" = 'tr' " + + $"ORDER BY \"{FullNameTable(TableNameEnum.LanguageKey)}\".\"Key\";"; + + public static string CultureValues = + $"SELECT " + + $"\"CultureName\" AS \"Key\", " + + $"\"DisplayName\" AS \"Name\", " + + $"\"CreationTime\" " + + $"FROM \"{FullNameTable(TableNameEnum.Language)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"AND \"IsDeleted\" = 'false';"; + + public static string CountryGroupValues = + $"SELECT " + + $"\"Name\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.CountryGroup)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"GROUP BY \"Name\" " + + $"ORDER BY \"Name\";"; + + public static string DataSourceValues = + $"SELECT " + + $"\"Code\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.DataSource)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string BlogCategoryValues = + $"SELECT " + + $"\"Code\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.BlogCategory)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string CountryValues = + $"SELECT " + + $"\"Code\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.Country)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string CityValues = + $"SELECT " + + $"\"Code\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.City)}\" " + + $"WHERE " + + $"(\"Country\" = @param0 OR @param0 IS NULL) " + + $"AND \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string DistrictValues = + $"SELECT " + + $"\"Name\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.District)}\" " + + $"WHERE " + + $"(\"Country\" = @param0 OR @param0 IS NULL) " + + $"AND (\"City\" = @param1 OR @param1 IS NULL) " + + $"AND \"IsDeleted\" = 'false' " + + $"GROUP BY \"Name\" " + + $"ORDER BY \"Name\";"; + + public static string StreetValues = + $"SELECT " + + $"\"Street\" AS \"Key\", " + + $"\"Street\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.District)}\" " + + $"WHERE " + + $"(\"Country\" = @param0 OR @param0 IS NULL) " + + $"AND (\"City\" = @param1 OR @param1 IS NULL) " + + $"AND (\"Name\" = @param2 OR @param2 IS NULL) " + + $"AND \"IsDeleted\" = 'false' " + + $"GROUP BY \"Street\" " + + $"ORDER BY \"Street\";"; + + public static string TenantValues = + $"SELECT * FROM (" + + $"SELECT NULL AS \"Key\", 'Host' AS \"Name\" " + + $"UNION ALL " + + $"SELECT " + + $"\"AbpTenants\".\"Id\" AS \"Key\", " + + $"\"AbpTenants\".\"Name\" AS \"Name\" " + + $"FROM \"AbpTenants\"" + + $") AS \"List\" " + + $"ORDER BY \"Name\""; + + public static string BranchValues = + $"SELECT \"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"KURS\".\"dbo\".\"{FullNameTable(TableNameEnum.Branch)}\" " + + $"WHERE " + + $"\"TenantId\" = @TENANTID " + + $"AND \"IsDeleted\" = 'false' " + + $"AND \"Id\" IN ( " + + $"SELECT \"BranchId\" " + + $"FROM \"{FullNameTable(TableNameEnum.BranchUsers)}\" " + + $"WHERE \"UserId\" = @USERID " + + $") " + + $"ORDER BY \"Name\";"; + + public static string RegistrationTypeValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.RegistrationType)}\" " + + $"WHERE " + + $"(\"BranchId\" = @param0 OR @param0 IS NULL) " + + $"AND \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string SkillTypeValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.SkillType)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string ClassTypeValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.ClassType)}\" " + + $"WHERE " + + $"(\"BranchId\" = @param0 OR @param0 IS NULL) " + + $"AND \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string PaymentMethodValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.PaymentMethod)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string InstallmentValues = + $"SELECT " + + $"\"Installment\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.InstallmentOption)}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Installment\";"; + + public static string QuestionPoolValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.QuestionPool)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string QuestionTagValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.QuestionTag)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string EventCategoryValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.EventCategory)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string EventTypeValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.EventType)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string UomCategoryValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.UomCategory)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string BankValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.Bank)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; + + public static string CurrencyValues = + $"SELECT " + + $"\"Id\" AS \"Key\", " + + $"\"Name\" AS \"Name\" " + + $"FROM \"{FullNameTable(TableNameEnum.Currency)}\" " + + $"WHERE \"IsDeleted\" = 'false' "; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs new file mode 100644 index 00000000..75b96dd5 --- /dev/null +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs @@ -0,0 +1,44 @@ +using System; + +namespace Kurs.Platform.Enums; + +public enum MenuPrefix +{ + Platform, + Saas, + Administration, + Participant, + Coordinator, + Crm, + Supplychain, + Maintenance, + Warehouse, + Project, + Hr, + Mrp, + Accounting +} + +public static class MenuPrefixExtensions +{ + public static string ToPrefix(this MenuPrefix menu) + { + return menu switch + { + MenuPrefix.Platform => "P", + MenuPrefix.Saas => "Sas", + MenuPrefix.Administration => "Adm", + MenuPrefix.Participant => "Prt", + MenuPrefix.Coordinator => "Crd", + MenuPrefix.Crm => "Crm", + MenuPrefix.Supplychain => "Scp", + MenuPrefix.Maintenance => "Mnt", + MenuPrefix.Warehouse => "Wh", + MenuPrefix.Project => "Prj", + MenuPrefix.Hr => "Hr", + MenuPrefix.Mrp => "Mrp", + MenuPrefix.Accounting => "Acc", + _ => throw new ArgumentOutOfRangeException(nameof(menu), menu, null) + }; + } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs new file mode 100644 index 00000000..0e7b632d --- /dev/null +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -0,0 +1,106 @@ +namespace Kurs.Platform.Enums; + +public enum TableNameEnum +{ + Language, + LanguageKey, + LanguageText, + SettingDefinition, + Notification, + NotificationRule, + BackgroundWorker_MailQueue, + BackgroundWorker_MailQueueEvents, + BackgroundWorker_MailQueueTableFormat, + LogEntry, + AiBot, + Branch, + BranchUsers, + GlobalSearch, + Route, + Menu, + DataSource, + ListForm, + ListFormField, + ListFormCustomization, + ListFormImport, + ListFormImportExecute, + Activity, + BackgroundWorker, + ForumCategory, + ForumTopic, + ForumPost, + CustomEntity, + CustomEntityField, + ApiMigration, + ApiEndpoint, + CustomEndpoint, + CustomComponent, + ReportCategory, + ReportTemplate, + ReportParameter, + ReportGenerated, + IpRestriction, + Sector, + ContactTag, + ContactTitle, + Currency, + CountryGroup, + Country, + City, + District, + SkillType, + Skill, + SkillLevel, + UomCategory, + Uom, + Bank, + BankAccount, + Schedule, + ScheduleLesson, + Program, + RegistrationType, + RegistrationMethod, + ClassType, + Class, + Level, + Interesting, + Source, + NoteType, + Behavior, + EducationStatus, + EventCategory, + EventType, + Event, + SalesRejectionReason, + ClassCancellationReason, + LessonPeriod, + MeetingMethod, + MeetingResult, + Disease, + Psychologist, + Vaccine, + Lawyer, + Meal, + Document, + Vehicle, + WorkHour, + About, + Service, + Product, + PaymentMethod, + InstallmentOption, + Order, + OrderItem, + BlogCategory, + BlogPost, + Demo, + Contact, + Classroom, + ClassroomParticipant, + ClassroomAttandance, + ClassroomChat, + QuestionTag, + QuestionPool, + Question, + QuestionOption +} \ 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 2eed5e3d..8158c596 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using System.Linq; using Kurs.Languages.Languages; +using Kurs.Platform.Enums; using Volo.Abp.Localization; using Volo.Abp.Reflection; @@ -23,177 +24,42 @@ public static class PlatformConsts public static string PhoneEditorOptions = "{\"format\": \"phoneGlobal\", \"mask\":\"(000) 000-0000\", \"maskInvalidMessage\":\"Lütfen geçerli bir telefon numarası girin\", \"useMaskedValue\":false, \"maskRules\": { \"X\": \"[1-9]\" }, \"placeholder\": \"(555) 123-4567\" }"; } - public static class LookUpQueryValues - { - public static string LanguageKeyValues = - $"SELECT " + - $"\"{SelectCommandByTableName("LanguageKey")}\".\"Key\", " + - $"CONCAT(" + - $"\"{SelectCommandByTableName("LanguageKey")}\".\"Key\", " + - $"' (', " + - $"\"{SelectCommandByTableName("LanguageText")}\".\"Value\", " + - $"')'" + - $") AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("LanguageKey")}\" " + - $"LEFT OUTER JOIN \"{SelectCommandByTableName("LanguageText")}\" " + - $"ON \"{SelectCommandByTableName("LanguageKey")}\".\"Key\" = \"{SelectCommandByTableName("LanguageText")}\".\"Key\" " + - $"AND \"{SelectCommandByTableName("LanguageKey")}\".\"ResourceName\" = \"{SelectCommandByTableName("LanguageText")}\".\"ResourceName\" " + - $"WHERE " + - $"\"{SelectCommandByTableName("LanguageKey")}\".\"IsDeleted\" = 'false' " + - $"AND \"{SelectCommandByTableName("LanguageText")}\".\"IsDeleted\" = 'false' " + - $"AND \"{SelectCommandByTableName("LanguageText")}\".\"CultureName\" = 'tr' " + - $"ORDER BY \"{SelectCommandByTableName("LanguageKey")}\".\"Key\";"; - - public static string CultureValues = - $"SELECT " + - $"\"CultureName\" AS \"Key\", " + - $"\"DisplayName\" AS \"Name\", " + - $"\"CreationTime\" " + - $"FROM \"{SelectCommandByTableName("Language")}\" " + - $"WHERE " + - $"\"IsEnabled\" = 'true' " + - $"AND \"IsDeleted\" = 'false';"; - - public static string CountryValues = - $"SELECT " + - $"\"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Code\" AS \"Key\", " + - $"\"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\" " + - $"ORDER BY \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Name\";"; - - public static string CityValues = - $"SELECT " + - $"\"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\".\"Code\" AS \"Key\", " + - $"\"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"\"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\".\"Country\" = @param0 " + - $"OR @param0 IS NULL " + - $"ORDER BY \"{SelectCommandByTableName("City", Prefix.DbTableDefinition)}\".\"Name\";"; - - public static string DistrictValues = - $"SELECT " + - $"\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", " + - $"\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"(\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) " + - $"AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"City\" = @param1 OR @param1 IS NULL) " + - $"GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" " + - $"ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\";"; - - public static string StreetValues = - $"SELECT " + - $"\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Street\" AS \"Key\", " + - $"\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Street\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"(\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) " + - $"AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"City\" = @param1 OR @param1 IS NULL) " + - $"AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" = @param2 OR @param2 IS NULL) " + - $"GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Street\" " + - $"ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Street\";"; - - public static string TenantValues = - $"SELECT * FROM (" + - $"SELECT NULL AS \"Key\", 'Host' AS \"Name\" " + - $"UNION ALL " + - $"SELECT " + - $"\"AbpTenants\".\"Id\" AS \"Key\", " + - $"\"AbpTenants\".\"Name\" AS \"Name\" " + - $"FROM \"AbpTenants\"" + - $") AS \"List\" " + - $"ORDER BY \"Name\""; - - - public static string BranchValues = - $"SELECT \"{SelectCommandByTableName("Branch")}\".\"Id\" AS \"Key\", " + - $"\"{SelectCommandByTableName("Branch")}\".\"Name\" as \"Name\" " + - $"FROM \"KURS\".\"dbo\".\"{SelectCommandByTableName("Branch")}\" " + - $"WHERE \"{SelectCommandByTableName("Branch")}\".\"TenantId\" = '@TENANTID' " + - $"AND \"{SelectCommandByTableName("Branch")}\".\"Id\" IN ( " + - $"SELECT [BranchId] " + - $"FROM [PBranchUsers] " + - $"WHERE [UserId] = '@USERID' " + - $") " + - $"ORDER BY \"{SelectCommandByTableName("Branch")}\".\"Name\""; - - public static string RegistrationTypeValues = - $"SELECT " + - $"\"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", " + - $"\"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"(\"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\".\"BranchId\" = @param0 OR @param0 IS NULL) " + - $"ORDER BY \"{SelectCommandByTableName("RegistrationType", Prefix.DbTableDefinition)}\".\"Name\";"; - - public static string ClassTypeValues = - $"SELECT " + - $"\"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\".\"Id\" AS \"Key\", " + - $"\"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"(\"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\".\"BranchId\" = @param0 OR @param0 IS NULL) " + - $"ORDER BY \"{SelectCommandByTableName("ClassType", Prefix.DbTableDefinition)}\".\"Name\";"; - - public static string PaymentMethodValues = - $"SELECT " + - $"\"{SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb)}\".\"Id\" AS \"Key\", " + - $"\"{SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb)}\" " + - $"ORDER BY \"{SelectCommandByTableName("PaymentMethod", Prefix.DbTableWeb)}\".\"Name\";"; - - public static string InstallmentValues = - $"SELECT " + - $"\"{SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb)}\".\"Installment\" AS \"Key\", " + - $"\"{SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb)}\".\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb)}\" " + - $"ORDER BY \"{SelectCommandByTableName("InstallmentOption", Prefix.DbTableWeb)}\".\"Installment\";"; - - public static string QuestionPoolValues = - $"SELECT " + - $"\"Id\" AS \"Key\", " + - $"\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("QuestionPool", Prefix.DbTableCoordinator)}\" " + - $"WHERE " + - $"\"IsDeleted\" = 'false' "; - - public static string QuestionTagValues = - $"SELECT " + - $"\"Id\" AS \"Key\", " + - $"\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("QuestionTag", Prefix.DbTableCoordinator)}\" " + - $"WHERE " + - $"\"IsDeleted\" = 'false' "; - - public static string EventCategoryValues = - $"SELECT " + - $"\"Id\" AS \"Key\", " + - $"\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("EventCategory", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"\"IsDeleted\" = 'false' "; - - public static string EventTypeValues = - $"SELECT " + - $"\"Id\" AS \"Key\", " + - $"\"Name\" AS \"Name\" " + - $"FROM \"{SelectCommandByTableName("EventType", Prefix.DbTableDefinition)}\" " + - $"WHERE " + - $"\"IsDeleted\" = 'false' "; - } - public static class Prefix { public const string App = "App"; public const string Abp = "Abp"; - public const string DbTableDefault = "P"; - public const string DbTableDefinition = "D"; - public const string DbTableWeb = "W"; - public const string DbTableCoordinator = "C"; public const string DbSchema = null; } + public static string FullNameTable(TableNameEnum TableName) + { + return TableNameResolver.GetFullTableName($"{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"; @@ -1559,9 +1425,4 @@ public static class PlatformConsts return ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); } } - - public static string SelectCommandByTableName(string TableName, string prefix = Prefix.DbTableDefault) - { - return prefix + TableName; - } } diff --git a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs new file mode 100644 index 00000000..4b66a6df --- /dev/null +++ b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections.Generic; + +namespace Kurs.Platform.Enums; + +public static class TableNameResolver +{ + // 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) + { + // 🔹 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) }, + + // 🔹 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) }, + + // 🔹 TENANT TABLOLARI (GENEL) + { 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.Activity), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Platform) }, + { 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) }, + + // 🔹 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.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Event), (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.Meal), (PlatformConsts.TablePrefix.BranchByName, 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) }, + + // 🔹 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) }, + + // 🔹 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) }, + + // 🔹 ACCOUNTING + { nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, + { nameof(TableNameEnum.BankAccount), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, + }; + + public static string GetFullTableName(string tableName) + { + if (!Enum.TryParse(tableName, out var tableEnum)) + throw new ArgumentException($"'{tableName}' geçerli bir TableNameEnum değil."); + + if (!_map.TryGetValue(tableName, out var entry)) + throw new KeyNotFoundException($"'{tableName}' için tablo eşlemesi bulunamadı."); + + return entry.Method(entry.PrefixGroup, tableEnum); + } +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 8de2167c..711bb9d2 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -25,6 +25,7 @@ using System.Text.Json; using static Kurs.Platform.PlatformConsts; using static Kurs.Settings.SettingsConsts; +using Kurs.Platform.Enums; namespace Kurs.Platform.EntityFrameworkCore; @@ -216,7 +217,7 @@ public class PlatformDbContext : //Saas builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(AiBot), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.AiBot)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.BotName).IsRequired().HasMaxLength(128); @@ -224,7 +225,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Branch), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Branch)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Code).IsRequired().HasMaxLength(64); @@ -248,7 +249,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(BranchUsers), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BranchUsers)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new { x.UserId, x.BranchId }); @@ -259,7 +260,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(GlobalSearch), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.GlobalSearch)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.System).HasMaxLength(50); @@ -271,7 +272,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Route), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Route)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasIndex(x => x.Key).IsUnique(); @@ -295,7 +296,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Menu), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Code).IsRequired().HasMaxLength(100); @@ -314,7 +315,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(DataSource), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.DataSource)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Code).IsRequired().HasMaxLength(100); @@ -324,7 +325,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ListForm), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListForm)), Prefix.DbSchema); b.ConfigureByConvention(); // base class props // Anahtar @@ -409,7 +410,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ListFormField), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListFormField)), Prefix.DbSchema); b.ConfigureByConvention(); // Anahtar @@ -457,7 +458,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ListFormCustomization), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListFormCustomization)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.ListFormCode).IsRequired().HasMaxLength(64); @@ -470,7 +471,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ListFormImport), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListFormImport)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.ListFormCode).IsRequired().HasMaxLength(64); @@ -482,7 +483,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ListFormImportExecute), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ListFormImportExecute)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.ImportId).IsRequired(); @@ -493,7 +494,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Activity), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Activity)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Type).IsRequired(); @@ -503,7 +504,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(BackgroundWorker), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BackgroundWorker)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Name).IsRequired().HasMaxLength(100); @@ -518,7 +519,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ForumCategory), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ForumCategory)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -536,7 +537,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ForumTopic), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ForumTopic)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(256); @@ -556,7 +557,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ForumPost), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ForumPost)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Content).IsRequired(); @@ -577,7 +578,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(CustomEntity), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomEntity)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -596,7 +597,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(CustomEntityField), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomEntityField)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -608,7 +609,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ApiMigration), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ApiMigration)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -626,7 +627,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ApiEndpoint), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ApiEndpoint)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -644,7 +645,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(CustomEndpoint), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomEndpoint)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.Name).IsRequired().HasMaxLength(128); @@ -659,7 +660,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(CustomComponent), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomComponent)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -672,7 +673,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportCategory), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportCategory)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(256); @@ -688,7 +689,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportTemplate), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportTemplate)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(256); @@ -709,7 +710,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportParameter), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportParameter)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.TemplateId).IsRequired(); @@ -723,7 +724,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportGenerated), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportGenerated)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.TemplateId).IsRequired(false); @@ -735,7 +736,7 @@ public class PlatformDbContext : //Administration builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(IpRestriction), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.IpRestriction)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(a => a.ResourceType).IsRequired().HasMaxLength(10); @@ -746,7 +747,7 @@ public class PlatformDbContext : // Definitions builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Sector), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Sector)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -754,7 +755,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ContactTag), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTag)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -763,7 +764,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ContactTitle), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTitle)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(128); @@ -772,7 +773,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Currency), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(8); @@ -785,7 +786,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(CountryGroup), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CountryGroup)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -794,7 +795,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Country), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(8); @@ -806,12 +807,6 @@ public class PlatformDbContext : b.HasIndex(x => x.Code).IsUnique(); b.HasIndex(x => x.GroupName); - // b.HasMany(x => x.Cities) - // .WithOne(x => x.Country) - // .HasForeignKey(x => x.CountryCode) - // .HasPrincipalKey(x => x.Code) - // .OnDelete(DeleteBehavior.Cascade); - b.HasOne() .WithMany() .HasPrincipalKey(x => x.Name) @@ -821,7 +816,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(City), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.City)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Country).HasMaxLength(8); @@ -830,17 +825,11 @@ public class PlatformDbContext : b.Property(x => x.PlateCode).HasMaxLength(20); b.HasIndex(x => new { x.Country, x.Code }).IsUnique(); - - // b.HasMany(x => x.Districts) - // .WithOne(x => x.City) - // .HasForeignKey(x => new { x.CountryCode, x.CityCode }) - // .HasPrincipalKey(x => new { x.Country, x.Code }) - // .OnDelete(DeleteBehavior.Cascade); }); builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(District), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.District)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Country).HasMaxLength(8); @@ -855,7 +844,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(SkillType), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -875,7 +864,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Skill), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Skill)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -884,7 +873,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(SkillLevel), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillLevel)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -895,7 +884,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(UomCategory), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -904,7 +893,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Uom), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Uom)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(64); @@ -920,52 +909,10 @@ public class PlatformDbContext : .OnDelete(DeleteBehavior.Restrict); }); - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefinition + nameof(Bank), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.IdentifierCode).HasMaxLength(64); - b.Property(x => x.AddressLine1).HasMaxLength(256); - b.Property(x => x.AddressLine2).HasMaxLength(256); - b.Property(x => x.District).HasMaxLength(128); - b.Property(x => x.City).HasMaxLength(128); - b.Property(x => x.PostalCode).HasMaxLength(16); - b.Property(x => x.Country).HasMaxLength(128); - b.Property(x => x.Phone).HasMaxLength(64); - b.Property(x => x.Email).HasMaxLength(128); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefinition + nameof(BankAccount), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.AccountNumber).IsRequired().HasMaxLength(64); - b.Property(x => x.AccountOwner).IsRequired().HasMaxLength(256); - b.Property(x => x.Company).HasMaxLength(256); - - b.Property(x => x.BankId).IsRequired(); - b.Property(x => x.CurrencyId); - - b.HasOne(x => x.Bank) - .WithMany() - .HasPrincipalKey(x => x.Id) - .HasForeignKey(x => x.BankId) - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne(x => x.Currency) - .WithMany() - .HasPrincipalKey(x => x.Id) - .HasForeignKey(x => x.CurrencyId) - .OnDelete(DeleteBehavior.Restrict); - }); - // School Management builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Schedule), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Schedule)), Prefix.DbSchema); b.ConfigureByConvention(); // Properties @@ -986,7 +933,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ScheduleLesson), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ScheduleLesson)), Prefix.DbSchema); b.ConfigureByConvention(); // Properties @@ -997,7 +944,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Program), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Program)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(100).IsRequired(); @@ -1006,7 +953,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(RegistrationType), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationType)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1027,7 +974,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(RegistrationMethod), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.RegistrationMethod)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50); @@ -1036,7 +983,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ClassType), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassType)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1057,7 +1004,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Class), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Class)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(64); @@ -1066,7 +1013,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Level), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Level)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.LevelType).HasMaxLength(15); @@ -1077,7 +1024,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Interesting), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1086,7 +1033,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Source), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1095,7 +1042,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(NoteType), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1103,7 +1050,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Behavior), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Behavior)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1111,7 +1058,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(EducationStatus), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EducationStatus)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1119,7 +1066,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(EventCategory), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventCategory)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1127,7 +1074,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(EventType), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventType)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1135,7 +1082,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Event), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Event)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(200); @@ -1158,7 +1105,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(SalesRejectionReason), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1168,7 +1115,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ClassCancellationReason), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassCancellationReason)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1177,7 +1124,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(LessonPeriod), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LessonPeriod)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1191,7 +1138,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(MeetingMethod), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1201,7 +1148,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(MeetingResult), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1211,7 +1158,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Disease), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Disease)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1219,7 +1166,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Psychologist), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Psychologist)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(100).IsRequired(); @@ -1231,7 +1178,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Vaccine), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vaccine)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(100).IsRequired(); @@ -1239,7 +1186,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Lawyer), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Lawyer)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(100).IsRequired(); @@ -1261,7 +1208,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Meal), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Meal)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Date).IsRequired(); @@ -1272,7 +1219,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Document), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Document)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(80).IsRequired(); @@ -1280,7 +1227,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Vehicle), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vehicle)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Plate).HasMaxLength(10).IsRequired(); @@ -1302,7 +1249,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(WorkHour), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkHour)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); @@ -1321,7 +1268,7 @@ public class PlatformDbContext : //Web Site builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(About), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.About)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.StatsJson).HasColumnType("text"); @@ -1331,7 +1278,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(Service), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Service)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(128); @@ -1355,7 +1302,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(Product), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Product)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -1369,7 +1316,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(PaymentMethod), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentMethod)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -1380,7 +1327,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(InstallmentOption), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.InstallmentOption)), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -1390,7 +1337,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(Order), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Order)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(o => o.Name).HasMaxLength(64); @@ -1421,7 +1368,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(OrderItem), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.OrderItem)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(i => i.ProductName).IsRequired().HasMaxLength(128); @@ -1431,7 +1378,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(BlogCategory), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogCategory)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); @@ -1444,7 +1391,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(BlogPost), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogPost)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(256); @@ -1467,7 +1414,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(Demo), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Demo)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.OrganizationName).IsRequired().HasMaxLength(256); @@ -1482,7 +1429,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableWeb + nameof(Contact), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Contact)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Address).HasMaxLength(500); @@ -1499,7 +1446,7 @@ public class PlatformDbContext : //Coordinator builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(Classroom), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Classroom)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(200); @@ -1528,7 +1475,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(ClassroomParticipant), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassroomParticipant)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.UserName).IsRequired().HasMaxLength(100); @@ -1543,7 +1490,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(ClassroomAttandance), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassroomAttandance)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.StudentName).IsRequired().HasMaxLength(100); @@ -1555,7 +1502,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(ClassroomChat), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ClassroomChat)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.SenderName).IsRequired().HasMaxLength(100); @@ -1568,7 +1515,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(QuestionTag), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionTag)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(100); @@ -1579,7 +1526,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(QuestionPool), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionPool)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(100); @@ -1589,7 +1536,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(Question), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Question)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.QuestionType).IsRequired().HasMaxLength(100); @@ -1606,11 +1553,53 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableCoordinator + nameof(QuestionOption), Prefix.DbSchema); + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuestionOption)), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Text).HasMaxLength(100); b.Property(x => x.IsCorrect).HasDefaultValue(false); }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.IdentifierCode).HasMaxLength(64); + b.Property(x => x.AddressLine1).HasMaxLength(256); + b.Property(x => x.AddressLine2).HasMaxLength(256); + b.Property(x => x.District).HasMaxLength(128); + b.Property(x => x.City).HasMaxLength(128); + b.Property(x => x.PostalCode).HasMaxLength(16); + b.Property(x => x.Country).HasMaxLength(128); + b.Property(x => x.Phone).HasMaxLength(64); + b.Property(x => x.Email).HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BankAccount)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.AccountNumber).IsRequired().HasMaxLength(64); + b.Property(x => x.AccountOwner).IsRequired().HasMaxLength(256); + b.Property(x => x.Company).HasMaxLength(256); + + b.Property(x => x.BankId).IsRequired(); + b.Property(x => x.CurrencyId); + + b.HasOne(x => x.Bank) + .WithMany() + .HasPrincipalKey(x => x.Id) + .HasForeignKey(x => x.BankId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Currency) + .WithMany() + .HasPrincipalKey(x => x.Id) + .HasForeignKey(x => x.CurrencyId) + .OnDelete(DeleteBehavior.Restrict); + }); } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.Designer.cs similarity index 98% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.Designer.cs index 13243638..8568cc5d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251018150230_Initial")] + [Migration("20251020111635_Initial")] partial class Initial { /// @@ -86,7 +86,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PLanguage", (string)null); + b.ToTable("P_P_Language", (string)null); }); modelBuilder.Entity("Kurs.Languages.Entities.LanguageKey", b => @@ -140,7 +140,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResourceName", "Key") .IsUnique(); - b.ToTable("PLanguageKey", (string)null); + b.ToTable("P_P_LanguageKey", (string)null); }); modelBuilder.Entity("Kurs.Languages.Entities.LanguageText", b => @@ -203,7 +203,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResourceName", "Key"); - b.ToTable("PLanguageText", (string)null); + b.ToTable("P_P_LanguageText", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", b => @@ -294,7 +294,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TableName"); - b.ToTable("PBackgroundWorker_MailQueue", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueue", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueEvents", b => @@ -356,7 +356,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("AwsMessageId"); - b.ToTable("PBackgroundWorker_MailQueueEvents", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueueEvents", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueTableFormat", b => @@ -422,7 +422,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasDatabaseName("IX_MailQueueTableFormat"); - b.ToTable("PBackgroundWorker_MailQueueTableFormat", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueueTableFormat", (string)null); }); modelBuilder.Entity("Kurs.Notifications.Entities.Notification", b => @@ -500,7 +500,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("NotificationRuleId"); - b.ToTable("PNotification", (string)null); + b.ToTable("P_P_Notification", (string)null); }); modelBuilder.Entity("Kurs.Notifications.Entities.NotificationRule", b => @@ -569,7 +569,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PNotificationRule", (string)null); + b.ToTable("P_P_NotificationRule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.About", b => @@ -622,7 +622,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WAbout", (string)null); + b.ToTable("T_Adm_About", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Activity", b => @@ -689,7 +689,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PActivity", (string)null); + b.ToTable("T_P_Activity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -704,7 +704,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PAiBot", (string)null); + b.ToTable("P_P_AiBot", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => @@ -780,7 +780,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PApiEndpoint", (string)null); + b.ToTable("T_Sas_ApiEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => @@ -841,7 +841,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PApiMigration", (string)null); + b.ToTable("T_Sas_ApiMigration", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => @@ -914,7 +914,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PBackgroundWorker", (string)null); + b.ToTable("P_P_BackgroundWorker", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Bank", b => @@ -1002,7 +1002,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DBank", (string)null); + b.ToTable("T_Acc_Bank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => @@ -1076,7 +1076,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CurrencyId"); - b.ToTable("DBankAccount", (string)null); + b.ToTable("T_Acc_BankAccount", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => @@ -1125,7 +1125,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DBehavior", (string)null); + b.ToTable("T_Adm_Behavior", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => @@ -1198,7 +1198,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("WBlogCategory", (string)null); + b.ToTable("T_Adm_BlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1302,7 +1302,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("WBlogPost", (string)null); + b.ToTable("T_Adm_BlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1416,7 +1416,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PBranch", (string)null); + b.ToTable("T_Sas_Branch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => @@ -1436,7 +1436,7 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); - b.ToTable("PBranchUsers", (string)null); + b.ToTable("T_Sas_BranchUsers", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.City", b => @@ -1503,7 +1503,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL"); - b.ToTable("DCity", (string)null); + b.ToTable("P_Sas_City", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Class", b => @@ -1564,7 +1564,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("DClass", (string)null); + b.ToTable("B_Crd_Class", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => @@ -1617,7 +1617,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DClassCancellationReason", (string)null); + b.ToTable("T_Crd_ClassCancellationReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => @@ -1684,7 +1684,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("DClassType", (string)null); + b.ToTable("B_Crd_ClassType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => @@ -1780,7 +1780,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TeacherId"); - b.ToTable("CClassroom", (string)null); + b.ToTable("T_Crd_Classroom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -1853,7 +1853,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("StudentId"); - b.ToTable("CClassroomAttandance", (string)null); + b.ToTable("T_Crd_ClassroomAttandance", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", b => @@ -1937,7 +1937,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Timestamp"); - b.ToTable("CClassroomChat", (string)null); + b.ToTable("T_Crd_ClassroomChat", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => @@ -2032,7 +2032,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[UserId] IS NOT NULL"); - b.ToTable("CClassroomParticipant", (string)null); + b.ToTable("T_Crd_ClassroomParticipant", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Contact", b => @@ -2105,7 +2105,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WContact", (string)null); + b.ToTable("T_Adm_Contact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => @@ -2154,7 +2154,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DContactTag", (string)null); + b.ToTable("P_Sas_ContactTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => @@ -2203,7 +2203,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DContactTitle", (string)null); + b.ToTable("P_Sas_ContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2279,7 +2279,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("GroupName"); - b.ToTable("DCountry", (string)null); + b.ToTable("P_Sas_Country", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CountryGroup", b => @@ -2327,7 +2327,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Name") .IsUnique(); - b.ToTable("DCountryGroup", (string)null); + b.ToTable("P_Sas_CountryGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Currency", b => @@ -2393,7 +2393,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DCurrency", (string)null); + b.ToTable("P_Sas_Currency", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomComponent", b => @@ -2461,7 +2461,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomComponent", (string)null); + b.ToTable("T_Sas_CustomComponent", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEndpoint", b => @@ -2539,7 +2539,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomEndpoint", (string)null); + b.ToTable("T_Sas_CustomEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", b => @@ -2624,7 +2624,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomEntity", (string)null); + b.ToTable("T_Sas_CustomEntity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => @@ -2696,7 +2696,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PCustomEntityField", (string)null); + b.ToTable("T_Sas_CustomEntityField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.DataSource", b => @@ -2748,7 +2748,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PDataSource", (string)null); + b.ToTable("P_Sas_DataSource", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Demo", b => @@ -2828,7 +2828,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WDemo", (string)null); + b.ToTable("T_Adm_Demo", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => @@ -2877,7 +2877,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DDisease", (string)null); + b.ToTable("T_Adm_Disease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -2952,7 +2952,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("DDistrict", (string)null); + b.ToTable("P_Sas_District", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Document", b => @@ -3001,7 +3001,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DDocument", (string)null); + b.ToTable("T_Adm_Document", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => @@ -3053,7 +3053,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEducationStatus", (string)null); + b.ToTable("T_Adm_EducationStatus", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Event", b => @@ -3124,7 +3124,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("DEvent", (string)null); + b.ToTable("T_Adm_Event", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => @@ -3173,7 +3173,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEventCategory", (string)null); + b.ToTable("T_Adm_EventCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => @@ -3222,7 +3222,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEventType", (string)null); + b.ToTable("T_Adm_EventType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => @@ -3260,7 +3260,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PGlobalSearch", (string)null); + b.ToTable("T_Sas_GlobalSearch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => @@ -3316,7 +3316,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WInstallmentOption", (string)null); + b.ToTable("T_Adm_InstallmentOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => @@ -3369,7 +3369,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DInteresting", (string)null); + b.ToTable("T_Prt_Interesting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -3427,7 +3427,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PIpRestriction", (string)null); + b.ToTable("T_Sas_IpRestriction", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => @@ -3524,7 +3524,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DLawyer", (string)null); + b.ToTable("T_Adm_Lawyer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => @@ -3596,7 +3596,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DLessonPeriod", (string)null); + b.ToTable("B_Crd_LessonPeriod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Level", b => @@ -3674,7 +3674,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("DLevel", (string)null); + b.ToTable("B_Crd_Level", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => @@ -3966,7 +3966,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PListForm", (string)null); + b.ToTable("P_Sas_ListForm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -4031,7 +4031,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormCustomization", (string)null); + b.ToTable("P_Sas_ListFormCustomization", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => @@ -4198,7 +4198,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormField", (string)null); + b.ToTable("P_Sas_ListFormField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => @@ -4258,7 +4258,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormImport", (string)null); + b.ToTable("P_Sas_ListFormImport", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => @@ -4328,7 +4328,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ImportId"); - b.ToTable("PListFormImportExecute", (string)null); + b.ToTable("P_Sas_ListFormImportExecute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => @@ -4390,7 +4390,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeal", (string)null); + b.ToTable("B_Adm_Meal", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => @@ -4449,7 +4449,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeetingMethod", (string)null); + b.ToTable("T_Prt_MeetingMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => @@ -4506,7 +4506,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeetingResult", (string)null); + b.ToTable("T_Prt_MeetingResult", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => @@ -4602,7 +4602,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PMenu", (string)null); + b.ToTable("P_Sas_Menu", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => @@ -4651,7 +4651,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DNoteType", (string)null); + b.ToTable("T_Prt_NoteType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Order", b => @@ -4784,7 +4784,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WOrder", (string)null); + b.ToTable("T_Adm_Order", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -4849,7 +4849,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("WOrderItem", (string)null); + b.ToTable("T_Adm_OrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -4906,7 +4906,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WPaymentMethod", (string)null); + b.ToTable("T_Adm_PaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -4982,7 +4982,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WProduct", (string)null); + b.ToTable("T_Adm_Product", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Program", b => @@ -5035,7 +5035,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DProgram", (string)null); + b.ToTable("T_Crd_Program", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => @@ -5100,7 +5100,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DPsychologist", (string)null); + b.ToTable("T_Adm_Psychologist", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Question", b => @@ -5193,7 +5193,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionPoolId"); - b.ToTable("CQuestion", (string)null); + b.ToTable("T_Crd_Question", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", b => @@ -5254,7 +5254,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("CQuestionOption", (string)null); + b.ToTable("T_Crd_QuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", b => @@ -5311,7 +5311,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("CQuestionPool", (string)null); + b.ToTable("T_Crd_QuestionPool", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b => @@ -5373,7 +5373,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("CQuestionTag", (string)null); + b.ToTable("T_Crd_QuestionTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => @@ -5433,7 +5433,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("DRegistrationMethod", (string)null); + b.ToTable("B_Crd_RegistrationMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => @@ -5489,7 +5489,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DRegistrationType", (string)null); + b.ToTable("B_Crd_RegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -5546,7 +5546,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PReportCategory", (string)null); + b.ToTable("T_Sas_ReportCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => @@ -5608,7 +5608,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("PReportGenerated", (string)null); + b.ToTable("T_Sas_ReportGenerated", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => @@ -5681,7 +5681,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("PReportParameter", (string)null); + b.ToTable("T_Sas_ReportParameter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => @@ -5747,7 +5747,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CategoryId"); - b.ToTable("PReportTemplate", (string)null); + b.ToTable("T_Sas_ReportTemplate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Route", b => @@ -5812,7 +5812,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("PRoute", (string)null); + b.ToTable("P_Sas_Route", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => @@ -5869,7 +5869,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSalesRejectionReason", (string)null); + b.ToTable("T_Prt_SalesRejectionReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => @@ -5973,7 +5973,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSchedule", (string)null); + b.ToTable("B_Crd_Schedule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => @@ -6046,7 +6046,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ScheduleId"); - b.ToTable("DScheduleLesson", (string)null); + b.ToTable("B_Crd_ScheduleLesson", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => @@ -6095,7 +6095,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSector", (string)null); + b.ToTable("T_Sas_Sector", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Service", b => @@ -6158,7 +6158,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WService", (string)null); + b.ToTable("T_Adm_Service", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -6212,7 +6212,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("DSkill", (string)null); + b.ToTable("T_Adm_Skill", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => @@ -6276,7 +6276,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("DSkillLevel", (string)null); + b.ToTable("T_Adm_SkillLevel", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => @@ -6325,7 +6325,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSkillType", (string)null); + b.ToTable("T_Adm_SkillType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Source", b => @@ -6378,7 +6378,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSource", (string)null); + b.ToTable("T_Prt_Source", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => @@ -6448,7 +6448,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("UomCategoryId"); - b.ToTable("DUom", (string)null); + b.ToTable("T_Adm_Uom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => @@ -6497,7 +6497,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DUomCategory", (string)null); + b.ToTable("T_Adm_UomCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => @@ -6546,7 +6546,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DVaccine", (string)null); + b.ToTable("T_Adm_Vaccine", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => @@ -6638,7 +6638,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DVehicle", (string)null); + b.ToTable("T_Adm_Vehicle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => @@ -6718,7 +6718,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DWorkHour", (string)null); + b.ToTable("T_Adm_WorkHour", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => @@ -6808,7 +6808,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("PForumCategory", (string)null); + b.ToTable("P_Sas_ForumCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => @@ -6878,7 +6878,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("PForumPost", (string)null); + b.ToTable("P_Sas_ForumPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => @@ -6977,7 +6977,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("PForumTopic", (string)null); + b.ToTable("P_Sas_ForumTopic", (string)null); }); modelBuilder.Entity("Kurs.Settings.Entities.SettingDefinition", b => @@ -7074,7 +7074,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PSettingDefinition", (string)null); + b.ToTable("P_P_SettingDefinition", (string)null); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.cs similarity index 89% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.cs index 34021f47..a960c830 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251018150230_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251020111635_Initial.cs @@ -435,25 +435,16 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "CClassroom", + name: "B_Adm_Meal", 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), + Date = table.Column(type: "datetime2", nullable: false), + Breakfast = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Lunch = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Snack = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -464,365 +455,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_CClassroom", x => x.Id); + table.PrimaryKey("PK_B_Adm_Meal", x => x.Id); }); migrationBuilder.CreateTable( - name: "CQuestionPool", - 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_CQuestionPool", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CQuestionTag", - 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_CQuestionTag", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DBank", - 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), - AddressLine1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - AddressLine2 = 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_DBank", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DBehavior", - 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_DBehavior", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DClassCancellationReason", - 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_DClassCancellationReason", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DContactTag", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Category = 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_DContactTag", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DContactTitle", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Abbreviation = table.Column(type: "nvarchar(64)", maxLength: 64, 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_DContactTitle", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DCountryGroup", - columns: table => new - { - Id = 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_DCountryGroup", x => x.Id); - table.UniqueConstraint("AK_DCountryGroup_Name", x => x.Name); - }); - - migrationBuilder.CreateTable( - name: "DCurrency", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - Symbol = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Rate = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - LastUpdated = 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_DCurrency", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DDisease", - 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_DDisease", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DDocument", - 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_DDocument", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DEducationStatus", - 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_DEducationStatus", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DEventCategory", - 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_DEventCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DEventType", - 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_DEventType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DInteresting", - 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_DInteresting", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DLawyer", - 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_DLawyer", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DLessonPeriod", + name: "B_Crd_LessonPeriod", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -844,144 +481,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DLessonPeriod", x => x.Id); + table.PrimaryKey("PK_B_Crd_LessonPeriod", x => x.Id); }); migrationBuilder.CreateTable( - name: "DMeal", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Date = table.Column(type: "datetime2", nullable: false), - Breakfast = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Lunch = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Snack = table.Column(type: "nvarchar(200)", maxLength: 200, 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_DMeal", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DMeetingMethod", - 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_DMeetingMethod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DMeetingResult", - 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_DMeetingResult", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DNoteType", - 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_DNoteType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DProgram", - 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_DProgram", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DPsychologist", - 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_DPsychologist", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DRegistrationType", + name: "B_Crd_RegistrationType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -999,33 +503,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DRegistrationType", x => x.Id); + table.PrimaryKey("PK_B_Crd_RegistrationType", x => x.Id); }); migrationBuilder.CreateTable( - name: "DSalesRejectionReason", - 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_DSalesRejectionReason", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DSchedule", + name: "B_Crd_Schedule", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1058,168 +540,7 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DSchedule", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DSector", - 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_DSector", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DSkillType", - 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_DSkillType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DSource", - 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_DSource", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DUomCategory", - 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_DUomCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DVaccine", - 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_DVaccine", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DVehicle", - 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_DVehicle", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DWorkHour", - 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_DWorkHour", x => x.Id); + table.PrimaryKey("PK_B_Crd_Schedule", x => x.Id); }); migrationBuilder.CreateTable( @@ -1286,32 +607,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "PActivity", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityName = table.Column(type: "nvarchar(max)", nullable: true), - EntityId = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "nvarchar(max)", nullable: false), - Subject = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), - FilesJson = 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_PActivity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PAiBot", + name: "P_P_AiBot", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1319,11 +615,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PAiBot", x => x.Id); + table.PrimaryKey("PK_P_P_AiBot", x => x.Id); }); migrationBuilder.CreateTable( - name: "PBackgroundWorker", + name: "P_P_BackgroundWorker", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1345,11 +641,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PBackgroundWorker", x => x.Id); + table.PrimaryKey("PK_P_P_BackgroundWorker", x => x.Id); }); migrationBuilder.CreateTable( - name: "PBackgroundWorker_MailQueueTableFormat", + name: "P_P_BackgroundWorker_MailQueueTableFormat", columns: table => new { Id = table.Column(type: "int", nullable: false) @@ -1370,33 +666,20 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PBackgroundWorker_MailQueueTableFormat", x => x.Id); - table.UniqueConstraint("AK_PBackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName); + table.PrimaryKey("PK_P_P_BackgroundWorker_MailQueueTableFormat", x => x.Id); + table.UniqueConstraint("AK_P_P_BackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName); }); migrationBuilder.CreateTable( - name: "PBranch", + name: "P_P_Language", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - VknTckn = table.Column(type: "bigint", nullable: false), - TaxOffice = 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), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Street = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Mobile = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Fax = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - IsActive = table.Column(type: "bit", nullable: true, defaultValue: true), + CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + UiCultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + DisplayName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + IsEnabled = table.Column(type: "bit", nullable: false), + TwoLetterISOLanguageName = 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), @@ -1407,35 +690,43 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PBranch", x => x.Id); + table.PrimaryKey("PK_P_P_Language", x => x.Id); + table.UniqueConstraint("AK_P_P_Language_CultureName", x => x.CultureName); }); migrationBuilder.CreateTable( - name: "PBranchUsers", - columns: table => new - { - BranchId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Id = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PBranchUsers", x => new { x.UserId, x.BranchId }); - }); - - migrationBuilder.CreateTable( - name: "PCustomComponent", + name: "P_P_LanguageKey", 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), - Code = table.Column(type: "nvarchar(max)", nullable: false), - Props = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Key = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + ResourceName = 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_P_P_LanguageKey", x => x.Id); + table.UniqueConstraint("AK_P_P_LanguageKey_ResourceName_Key", x => new { x.ResourceName, x.Key }); + }); + + migrationBuilder.CreateTable( + name: "P_P_NotificationRule", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + NotificationType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + RecipientType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + RecipientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Channel = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), IsActive = table.Column(type: "bit", nullable: false), - Dependencies = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + IsFixed = table.Column(type: "bit", nullable: false), + IsCustomized = 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), @@ -1446,23 +737,48 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PCustomComponent", x => x.Id); + table.PrimaryKey("PK_P_P_NotificationRule", x => x.Id); }); migrationBuilder.CreateTable( - name: "PCustomEndpoint", + name: "P_P_SettingDefinition", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + NameKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DescriptionKey = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + DefaultValue = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), + IsVisibleToClients = table.Column(type: "bit", nullable: false), + Providers = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsInherited = table.Column(type: "bit", nullable: false), + IsEncrypted = table.Column(type: "bit", nullable: false), + MainGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + SubGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DataType = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + SelectOptions = table.Column(type: "nvarchar(max)", nullable: true), + 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_P_P_SettingDefinition", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "P_Sas_ContactTag", 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(512)", maxLength: 512, nullable: true), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - DataSourceCode = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Sql = table.Column(type: "nvarchar(max)", nullable: false), - ParametersJson = table.Column(type: "text", nullable: true), - PermissionsJson = table.Column(type: "text", nullable: true), + Category = 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), @@ -1473,25 +789,16 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PCustomEndpoint", x => x.Id); + table.PrimaryKey("PK_P_Sas_ContactTag", x => x.Id); }); migrationBuilder.CreateTable( - name: "PCustomEntity", + name: "P_Sas_ContactTitle", 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), - DisplayName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - TableName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - IsActive = table.Column(type: "bit", nullable: false), - HasAuditFields = table.Column(type: "bit", nullable: false), - HasSoftDelete = table.Column(type: "bit", nullable: false), - MigrationStatus = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - MigrationId = table.Column(type: "uniqueidentifier", nullable: true), - EndpointStatus = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Abbreviation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -1502,11 +809,55 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PCustomEntity", x => x.Id); + table.PrimaryKey("PK_P_Sas_ContactTitle", x => x.Id); }); migrationBuilder.CreateTable( - name: "PDataSource", + name: "P_Sas_CountryGroup", + columns: table => new + { + Id = 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_P_Sas_CountryGroup", x => x.Id); + table.UniqueConstraint("AK_P_Sas_CountryGroup_Name", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "P_Sas_Currency", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Symbol = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Rate = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + LastUpdated = 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_P_Sas_Currency", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "P_Sas_DataSource", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1523,11 +874,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PDataSource", x => x.Id); + table.PrimaryKey("PK_P_Sas_DataSource", x => x.Id); }); migrationBuilder.CreateTable( - name: "PForumCategory", + name: "P_Sas_ForumCategory", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1555,96 +906,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PForumCategory", x => x.Id); + table.PrimaryKey("PK_P_Sas_ForumCategory", x => x.Id); }); migrationBuilder.CreateTable( - name: "PGlobalSearch", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - System = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Group = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Term = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Weight = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Url = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PGlobalSearch", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PIpRestriction", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ResourceType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - ResourceId = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - IP = table.Column(type: "nvarchar(32)", maxLength: 32, 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_PIpRestriction", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PLanguage", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - UiCultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - DisplayName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - IsEnabled = table.Column(type: "bit", nullable: false), - TwoLetterISOLanguageName = 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_PLanguage", x => x.Id); - table.UniqueConstraint("AK_PLanguage_CultureName", x => x.CultureName); - }); - - migrationBuilder.CreateTable( - name: "PLanguageKey", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - ResourceName = 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_PLanguageKey", x => x.Id); - table.UniqueConstraint("AK_PLanguageKey_ResourceName_Key", x => new { x.ResourceName, x.Key }); - }); - - migrationBuilder.CreateTable( - name: "PListForm", + name: "P_Sas_ListForm", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1736,12 +1002,12 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PListForm", x => x.Id); - table.UniqueConstraint("AK_PListForm_ListFormCode", x => x.ListFormCode); + table.PrimaryKey("PK_P_Sas_ListForm", x => x.Id); + table.UniqueConstraint("AK_P_Sas_ListForm_ListFormCode", x => x.ListFormCode); }); migrationBuilder.CreateTable( - name: "PMenu", + name: "P_Sas_Menu", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1769,58 +1035,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PMenu", x => x.Id); + table.PrimaryKey("PK_P_Sas_Menu", x => x.Id); }); migrationBuilder.CreateTable( - name: "PNotificationRule", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - NotificationType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - RecipientType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - RecipientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Channel = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - IsFixed = table.Column(type: "bit", nullable: false), - IsCustomized = 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_PNotificationRule", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PReportCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, 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_PReportCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PRoute", + name: "P_Sas_Route", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1839,28 +1058,26 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PRoute", x => x.Id); + table.PrimaryKey("PK_P_Sas_Route", x => x.Id); }); migrationBuilder.CreateTable( - name: "PSettingDefinition", + name: "T_Acc_Bank", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - NameKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DescriptionKey = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - DefaultValue = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - IsVisibleToClients = table.Column(type: "bit", nullable: false), - Providers = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsInherited = table.Column(type: "bit", nullable: false), - IsEncrypted = table.Column(type: "bit", nullable: false), - MainGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SubGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DataType = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), - SelectOptions = table.Column(type: "nvarchar(max)", nullable: true), - Order = table.Column(type: "int", 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), + AddressLine1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + AddressLine2 = 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), @@ -1871,11 +1088,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PSettingDefinition", x => x.Id); + table.PrimaryKey("PK_T_Acc_Bank", x => x.Id); }); migrationBuilder.CreateTable( - name: "WAbout", + name: "T_Adm_About", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1893,11 +1110,31 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WAbout", x => x.Id); + table.PrimaryKey("PK_T_Adm_About", x => x.Id); }); migrationBuilder.CreateTable( - name: "WBlogCategory", + 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), @@ -1919,11 +1156,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WBlogCategory", x => x.Id); + table.PrimaryKey("PK_T_Adm_BlogCategory", x => x.Id); }); migrationBuilder.CreateTable( - name: "WContact", + name: "T_Adm_Contact", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1946,11 +1183,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WContact", x => x.Id); + table.PrimaryKey("PK_T_Adm_Contact", x => x.Id); }); migrationBuilder.CreateTable( - name: "WDemo", + name: "T_Adm_Demo", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1973,11 +1210,112 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WDemo", x => x.Id); + table.PrimaryKey("PK_T_Adm_Demo", x => x.Id); }); migrationBuilder.CreateTable( - name: "WInstallmentOption", + 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_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_Adm_EventCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Adm_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_Adm_EventType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Adm_InstallmentOption", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -1995,11 +1333,43 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WInstallmentOption", x => x.Id); + table.PrimaryKey("PK_T_Adm_InstallmentOption", x => x.Id); }); migrationBuilder.CreateTable( - name: "WOrder", + 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), @@ -2038,11 +1408,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WOrder", x => x.Id); + table.PrimaryKey("PK_T_Adm_Order", x => x.Id); }); migrationBuilder.CreateTable( - name: "WPaymentMethod", + name: "T_Adm_PaymentMethod", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2060,11 +1430,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WPaymentMethod", x => x.Id); + table.PrimaryKey("PK_T_Adm_PaymentMethod", x => x.Id); }); migrationBuilder.CreateTable( - name: "WProduct", + name: "T_Adm_Product", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2087,11 +1457,35 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WProduct", x => x.Id); + table.PrimaryKey("PK_T_Adm_Product", x => x.Id); }); migrationBuilder.CreateTable( - name: "WService", + 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), @@ -2111,7 +1505,613 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WService", x => x.Id); + 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_P_Activity", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityName = table.Column(type: "nvarchar(max)", nullable: true), + EntityId = table.Column(type: "nvarchar(max)", nullable: true), + Type = table.Column(type: "nvarchar(max)", nullable: false), + Subject = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Content = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), + FilesJson = 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_P_Activity", 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_Branch", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + VknTckn = table.Column(type: "bigint", nullable: false), + TaxOffice = 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), + District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Street = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Mobile = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Fax = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + IsActive = table.Column(type: "bit", nullable: true, 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_Sas_Branch", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_BranchUsers", + columns: table => new + { + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Id = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_T_Sas_BranchUsers", x => new { x.UserId, x.BranchId }); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_CustomComponent", + 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), + Code = table.Column(type: "nvarchar(max)", nullable: false), + Props = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + Dependencies = table.Column(type: "nvarchar(2000)", maxLength: 2000, 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_Sas_CustomComponent", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_CustomEndpoint", + 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(512)", maxLength: 512, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + DataSourceCode = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Sql = table.Column(type: "nvarchar(max)", nullable: false), + ParametersJson = table.Column(type: "text", nullable: true), + PermissionsJson = 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_Sas_CustomEndpoint", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_CustomEntity", + 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), + DisplayName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + TableName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + HasAuditFields = table.Column(type: "bit", nullable: false), + HasSoftDelete = table.Column(type: "bit", nullable: false), + MigrationStatus = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + MigrationId = table.Column(type: "uniqueidentifier", nullable: true), + EndpointStatus = 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_Sas_CustomEntity", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_GlobalSearch", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + System = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Group = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Term = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Weight = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Url = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_T_Sas_GlobalSearch", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_IpRestriction", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ResourceType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + ResourceId = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + IP = table.Column(type: "nvarchar(32)", maxLength: 32, 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_Sas_IpRestriction", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_ReportCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Icon = table.Column(type: "nvarchar(64)", maxLength: 64, 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_Sas_ReportCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_Sector", + 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_Sas_Sector", x => x.Id); }); migrationBuilder.CreateTable( @@ -2347,254 +2347,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "CClassroomAttandance", - 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_CClassroomAttandance", x => x.Id); - table.ForeignKey( - name: "FK_CClassroomAttandance_CClassroom_SessionId", - column: x => x.SessionId, - principalTable: "CClassroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "CClassroomChat", - 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_CClassroomChat", x => x.Id); - table.ForeignKey( - name: "FK_CClassroomChat_CClassroom_SessionId", - column: x => x.SessionId, - principalTable: "CClassroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "CClassroomParticipant", - 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_CClassroomParticipant", x => x.Id); - table.ForeignKey( - name: "FK_CClassroomParticipant_CClassroom_SessionId", - column: x => x.SessionId, - principalTable: "CClassroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "CQuestion", - 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_CQuestion", x => x.Id); - table.ForeignKey( - name: "FK_CQuestion_CQuestionPool_QuestionPoolId", - column: x => x.QuestionPoolId, - principalTable: "CQuestionPool", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DCountry", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - CurrencyCode = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), - PhoneCode = table.Column(type: "int", nullable: false), - TaxLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ZipRequired = table.Column(type: "bit", nullable: false), - StateRequired = 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_DCountry", x => x.Id); - table.ForeignKey( - name: "FK_DCountry_DCountryGroup_GroupName", - column: x => x.GroupName, - principalTable: "DCountryGroup", - principalColumn: "Name", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "DBankAccount", - 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_DBankAccount", x => x.Id); - table.ForeignKey( - name: "FK_DBankAccount_DBank_BankId", - column: x => x.BankId, - principalTable: "DBank", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_DBankAccount_DCurrency_CurrencyId", - column: x => x.CurrencyId, - principalTable: "DCurrency", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "DEvent", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - TypeId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Place = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, 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_DEvent", x => x.Id); - table.ForeignKey( - name: "FK_DEvent_DEventCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "DEventCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_DEvent_DEventType_TypeId", - column: x => x.TypeId, - principalTable: "DEventType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "DClassType", + name: "B_Crd_ClassType", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2615,17 +2368,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DClassType", x => x.Id); + table.PrimaryKey("PK_B_Crd_ClassType", x => x.Id); table.ForeignKey( - name: "FK_DClassType_DRegistrationType_RegistrationTypeId", + name: "FK_B_Crd_ClassType_B_Crd_RegistrationType_RegistrationTypeId", column: x => x.RegistrationTypeId, - principalTable: "DRegistrationType", + principalTable: "B_Crd_RegistrationType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "DRegistrationMethod", + name: "B_Crd_RegistrationMethod", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2644,17 +2397,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DRegistrationMethod", x => x.Id); + table.PrimaryKey("PK_B_Crd_RegistrationMethod", x => x.Id); table.ForeignKey( - name: "FK_DRegistrationMethod_DRegistrationType_RegistrationTypeId", + name: "FK_B_Crd_RegistrationMethod_B_Crd_RegistrationType_RegistrationTypeId", column: x => x.RegistrationTypeId, - principalTable: "DRegistrationType", + principalTable: "B_Crd_RegistrationType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "DScheduleLesson", + name: "B_Crd_ScheduleLesson", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2677,102 +2430,15 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DScheduleLesson", x => x.Id); + table.PrimaryKey("PK_B_Crd_ScheduleLesson", x => x.Id); table.ForeignKey( - name: "FK_DScheduleLesson_DSchedule_ScheduleId", + name: "FK_B_Crd_ScheduleLesson_B_Crd_Schedule_ScheduleId", column: x => x.ScheduleId, - principalTable: "DSchedule", + principalTable: "B_Crd_Schedule", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "DSkill", - 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_DSkill", x => x.Id); - table.ForeignKey( - name: "FK_DSkill_DSkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "DSkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DSkillLevel", - 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_DSkillLevel", x => x.Id); - table.ForeignKey( - name: "FK_DSkillLevel_DSkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "DSkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DUom", - 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_DUom", x => x.Id); - table.ForeignKey( - name: "FK_DUom_DUomCategory_UomCategoryId", - column: x => x.UomCategoryId, - principalTable: "DUomCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "OpenIddictAuthorizations", columns: table => new @@ -2799,7 +2465,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "PBackgroundWorker_MailQueue", + name: "P_P_BackgroundWorker_MailQueue", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2825,29 +2491,25 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PBackgroundWorker_MailQueue", x => x.Id); - table.UniqueConstraint("AK_PBackgroundWorker_MailQueue_AwsMessageId", x => x.AwsMessageId); + table.PrimaryKey("PK_P_P_BackgroundWorker_MailQueue", x => x.Id); + table.UniqueConstraint("AK_P_P_BackgroundWorker_MailQueue_AwsMessageId", x => x.AwsMessageId); table.ForeignKey( - name: "FK_PBackgroundWorker_MailQueue_PBackgroundWorker_MailQueueTableFormat_TableName", + name: "FK_P_P_BackgroundWorker_MailQueue_P_P_BackgroundWorker_MailQueueTableFormat_TableName", column: x => x.TableName, - principalTable: "PBackgroundWorker_MailQueueTableFormat", + principalTable: "P_P_BackgroundWorker_MailQueueTableFormat", principalColumn: "TableName", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PApiEndpoint", + name: "P_P_LanguageText", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - Path = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - OperationType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - CsharpCode = table.Column(type: "nvarchar(max)", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - EntityId = table.Column(type: "uniqueidentifier", nullable: false), + CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + Key = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ResourceName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -2858,78 +2520,88 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PApiEndpoint", x => x.Id); + table.PrimaryKey("PK_P_P_LanguageText", x => x.Id); table.ForeignKey( - name: "FK_PApiEndpoint_PCustomEntity_EntityId", - column: x => x.EntityId, - principalTable: "PCustomEntity", + name: "FK_P_P_LanguageText_P_P_LanguageKey_ResourceName_Key", + columns: x => new { x.ResourceName, x.Key }, + principalTable: "P_P_LanguageKey", + principalColumns: new[] { "ResourceName", "Key" }, + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_P_P_LanguageText_P_P_Language_CultureName", + column: x => x.CultureName, + principalTable: "P_P_Language", + principalColumn: "CultureName", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "P_P_Notification", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + NotificationRuleId = table.Column(type: "uniqueidentifier", nullable: false), + NotificationChannel = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + NotificationType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Identifier = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), + IsSent = table.Column(type: "bit", nullable: false), + IsRead = table.Column(type: "bit", nullable: false), + ReadTime = 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_P_P_Notification", x => x.Id); + table.ForeignKey( + name: "FK_P_P_Notification_P_P_NotificationRule_NotificationRuleId", + column: x => x.NotificationRuleId, + principalTable: "P_P_NotificationRule", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PApiMigration", + name: "P_Sas_Country", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityId = table.Column(type: "uniqueidentifier", nullable: false), - EntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - FileName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - SqlScript = table.Column(type: "nvarchar(max)", nullable: false), - Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - AppliedAt = table.Column(type: "datetime2", nullable: true), - ErrorMessage = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + CurrencyCode = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), + PhoneCode = table.Column(type: "int", nullable: false), + TaxLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ZipRequired = table.Column(type: "bit", nullable: false), + StateRequired = 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) + 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_PApiMigration", x => x.Id); + table.PrimaryKey("PK_P_Sas_Country", x => x.Id); table.ForeignKey( - name: "FK_PApiMigration_PCustomEntity_EntityId", - column: x => x.EntityId, - principalTable: "PCustomEntity", - principalColumn: "Id", + name: "FK_P_Sas_Country_P_Sas_CountryGroup_GroupName", + column: x => x.GroupName, + principalTable: "P_Sas_CountryGroup", + principalColumn: "Name", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "PCustomEntityField", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - EntityId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - IsRequired = table.Column(type: "bit", nullable: false), - MaxLength = table.Column(type: "int", nullable: true), - IsUnique = table.Column(type: "bit", nullable: false), - DefaultValue = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Description = 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_PCustomEntityField", x => x.Id); - table.ForeignKey( - name: "FK_PCustomEntityField_PCustomEntity_EntityId", - column: x => x.EntityId, - principalTable: "PCustomEntity", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "PForumTopic", + name: "P_Sas_ForumTopic", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -2959,51 +2631,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PForumTopic", x => x.Id); + table.PrimaryKey("PK_P_Sas_ForumTopic", x => x.Id); table.ForeignKey( - name: "FK_PForumTopic_PForumCategory_CategoryId", + name: "FK_P_Sas_ForumTopic_P_Sas_ForumCategory_CategoryId", column: x => x.CategoryId, - principalTable: "PForumCategory", + principalTable: "P_Sas_ForumCategory", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "PLanguageText", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - Key = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ResourceName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, 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_PLanguageText", x => x.Id); - table.ForeignKey( - name: "FK_PLanguageText_PLanguageKey_ResourceName_Key", - columns: x => new { x.ResourceName, x.Key }, - principalTable: "PLanguageKey", - principalColumns: new[] { "ResourceName", "Key" }, - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_PLanguageText_PLanguage_CultureName", - column: x => x.CultureName, - principalTable: "PLanguage", - principalColumn: "CultureName", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "PListFormCustomization", + name: "P_Sas_ListFormCustomization", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3023,17 +2661,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PListFormCustomization", x => x.Id); + table.PrimaryKey("PK_P_Sas_ListFormCustomization", x => x.Id); table.ForeignKey( - name: "FK_PListFormCustomization_PListForm_ListFormCode", + name: "FK_P_Sas_ListFormCustomization_P_Sas_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "PListForm", + principalTable: "P_Sas_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PListFormField", + name: "P_Sas_ListFormField", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3080,17 +2718,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PListFormField", x => x.Id); + table.PrimaryKey("PK_P_Sas_ListFormField", x => x.Id); table.ForeignKey( - name: "FK_PListFormField_PListForm_ListFormCode", + name: "FK_P_Sas_ListFormField_P_Sas_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "PListForm", + principalTable: "P_Sas_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PListFormImport", + name: "P_Sas_ListFormImport", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3108,59 +2746,28 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PListFormImport", x => x.Id); + table.PrimaryKey("PK_P_Sas_ListFormImport", x => x.Id); table.ForeignKey( - name: "FK_PListFormImport_PListForm_ListFormCode", + name: "FK_P_Sas_ListFormImport_P_Sas_ListForm_ListFormCode", column: x => x.ListFormCode, - principalTable: "PListForm", + principalTable: "P_Sas_ListForm", principalColumn: "ListFormCode", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PNotification", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - NotificationRuleId = table.Column(type: "uniqueidentifier", nullable: false), - NotificationChannel = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - NotificationType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Identifier = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), - IsSent = table.Column(type: "bit", nullable: false), - IsRead = table.Column(type: "bit", nullable: false), - ReadTime = 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_PNotification", x => x.Id); - table.ForeignKey( - name: "FK_PNotification_PNotificationRule_NotificationRuleId", - column: x => x.NotificationRuleId, - principalTable: "PNotificationRule", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "PReportTemplate", + name: "T_Acc_BankAccount", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - HtmlContent = table.Column(type: "nvarchar(max)", nullable: false), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - Tags = table.Column(type: "nvarchar(2000)", maxLength: 2000, 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), @@ -3171,17 +2778,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PReportTemplate", x => x.Id); + table.PrimaryKey("PK_T_Acc_BankAccount", x => x.Id); table.ForeignKey( - name: "FK_PReportTemplate_PReportCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "PReportCategory", + name: "FK_T_Acc_BankAccount_P_Sas_Currency_CurrencyId", + column: x => x.CurrencyId, + principalTable: "P_Sas_Currency", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); + 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: "WBlogPost", + name: "T_Adm_BlogPost", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3210,17 +2823,54 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WBlogPost", x => x.Id); + table.PrimaryKey("PK_T_Adm_BlogPost", x => x.Id); table.ForeignKey( - name: "FK_WBlogPost_WBlogCategory_CategoryId", + name: "FK_T_Adm_BlogPost_T_Adm_BlogCategory_CategoryId", column: x => x.CategoryId, - principalTable: "WBlogCategory", + principalTable: "T_Adm_BlogCategory", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "WOrderItem", + name: "T_Adm_Event", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + TypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Place = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, 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_Event", x => x.Id); + table.ForeignKey( + name: "FK_T_Adm_Event_T_Adm_EventCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "T_Adm_EventCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_T_Adm_Event_T_Adm_EventType_TypeId", + column: x => x.TypeId, + principalTable: "T_Adm_EventType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "T_Adm_OrderItem", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3240,11 +2890,361 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WOrderItem", x => x.Id); + table.PrimaryKey("PK_T_Adm_OrderItem", x => x.Id); table.ForeignKey( - name: "FK_WOrderItem_WOrder_OrderId", + name: "FK_T_Adm_OrderItem_T_Adm_Order_OrderId", column: x => x.OrderId, - principalTable: "WOrder", + 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_Sas_ApiEndpoint", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + Path = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + OperationType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + CsharpCode = table.Column(type: "nvarchar(max)", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + EntityId = 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_Sas_ApiEndpoint", x => x.Id); + table.ForeignKey( + name: "FK_T_Sas_ApiEndpoint_T_Sas_CustomEntity_EntityId", + column: x => x.EntityId, + principalTable: "T_Sas_CustomEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_ApiMigration", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "uniqueidentifier", nullable: false), + EntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + FileName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + SqlScript = table.Column(type: "nvarchar(max)", nullable: false), + Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + AppliedAt = table.Column(type: "datetime2", nullable: true), + ErrorMessage = table.Column(type: "nvarchar(1000)", maxLength: 1000, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_T_Sas_ApiMigration", x => x.Id); + table.ForeignKey( + name: "FK_T_Sas_ApiMigration_T_Sas_CustomEntity_EntityId", + column: x => x.EntityId, + principalTable: "T_Sas_CustomEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_CustomEntityField", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + EntityId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + IsRequired = table.Column(type: "bit", nullable: false), + MaxLength = table.Column(type: "int", nullable: true), + IsUnique = table.Column(type: "bit", nullable: false), + DefaultValue = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Description = 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_Sas_CustomEntityField", x => x.Id); + table.ForeignKey( + name: "FK_T_Sas_CustomEntityField_T_Sas_CustomEntity_EntityId", + column: x => x.EntityId, + principalTable: "T_Sas_CustomEntity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "T_Sas_ReportTemplate", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + HtmlContent = table.Column(type: "nvarchar(max)", nullable: false), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + Tags = table.Column(type: "nvarchar(2000)", maxLength: 2000, 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_Sas_ReportTemplate", x => x.Id); + table.ForeignKey( + name: "FK_T_Sas_ReportTemplate_T_Sas_ReportCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "T_Sas_ReportCategory", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -3273,64 +3273,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "CQuestionOption", - 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_CQuestionOption", x => x.Id); - table.ForeignKey( - name: "FK_CQuestionOption_CQuestion_QuestionId", - column: x => x.QuestionId, - principalTable: "CQuestion", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DCity", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Country = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Code = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), - PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - CountryId = 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_DCity", x => x.Id); - table.ForeignKey( - name: "FK_DCity_DCountry_CountryId", - column: x => x.CountryId, - principalTable: "DCountry", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "DClass", + name: "B_Crd_Class", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3349,17 +3292,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DClass", x => x.Id); + table.PrimaryKey("PK_B_Crd_Class", x => x.Id); table.ForeignKey( - name: "FK_DClass_DClassType_ClassTypeId", + name: "FK_B_Crd_Class_B_Crd_ClassType_ClassTypeId", column: x => x.ClassTypeId, - principalTable: "DClassType", + principalTable: "B_Crd_ClassType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "DLevel", + name: "B_Crd_Level", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3383,11 +3326,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DLevel", x => x.Id); + table.PrimaryKey("PK_B_Crd_Level", x => x.Id); table.ForeignKey( - name: "FK_DLevel_DClassType_ClassTypeId", + name: "FK_B_Crd_Level_B_Crd_ClassType_ClassTypeId", column: x => x.ClassTypeId, - principalTable: "DClassType", + principalTable: "B_Crd_ClassType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -3427,7 +3370,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "PBackgroundWorker_MailQueueEvents", + name: "P_P_BackgroundWorker_MailQueueEvents", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3446,17 +3389,45 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PBackgroundWorker_MailQueueEvents", x => x.Id); + table.PrimaryKey("PK_P_P_BackgroundWorker_MailQueueEvents", x => x.Id); table.ForeignKey( - name: "FK_PBackgroundWorker_MailQueueEvents_PBackgroundWorker_MailQueue_AwsMessageId", + name: "FK_P_P_BackgroundWorker_MailQueueEvents_P_P_BackgroundWorker_MailQueue_AwsMessageId", column: x => x.AwsMessageId, - principalTable: "PBackgroundWorker_MailQueue", + principalTable: "P_P_BackgroundWorker_MailQueue", principalColumn: "AwsMessageId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PForumPost", + name: "P_Sas_City", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Country = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Code = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + CountryId = 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_P_Sas_City", x => x.Id); + table.ForeignKey( + name: "FK_P_Sas_City_P_Sas_Country_CountryId", + column: x => x.CountryId, + principalTable: "P_Sas_Country", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "P_Sas_ForumPost", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3478,23 +3449,23 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PForumPost", x => x.Id); + table.PrimaryKey("PK_P_Sas_ForumPost", x => x.Id); table.ForeignKey( - name: "FK_PForumPost_PForumPost_ParentPostId", + name: "FK_P_Sas_ForumPost_P_Sas_ForumPost_ParentPostId", column: x => x.ParentPostId, - principalTable: "PForumPost", + principalTable: "P_Sas_ForumPost", principalColumn: "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_PForumPost_PForumTopic_TopicId", + name: "FK_P_Sas_ForumPost_P_Sas_ForumTopic_TopicId", column: x => x.TopicId, - principalTable: "PForumTopic", + principalTable: "P_Sas_ForumTopic", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PListFormImportExecute", + name: "P_Sas_ListFormImportExecute", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3516,17 +3487,46 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PListFormImportExecute", x => x.Id); + table.PrimaryKey("PK_P_Sas_ListFormImportExecute", x => x.Id); table.ForeignKey( - name: "FK_PListFormImportExecute_PListFormImport_ImportId", + name: "FK_P_Sas_ListFormImportExecute_P_Sas_ListFormImport_ImportId", column: x => x.ImportId, - principalTable: "PListFormImport", + principalTable: "P_Sas_ListFormImport", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PReportGenerated", + 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_Sas_ReportGenerated", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3545,17 +3545,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PReportGenerated", x => x.Id); + table.PrimaryKey("PK_T_Sas_ReportGenerated", x => x.Id); table.ForeignKey( - name: "FK_PReportGenerated_PReportTemplate_TemplateId", + name: "FK_T_Sas_ReportGenerated_T_Sas_ReportTemplate_TemplateId", column: x => x.TemplateId, - principalTable: "PReportTemplate", + principalTable: "T_Sas_ReportTemplate", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "PReportParameter", + name: "T_Sas_ReportParameter", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3577,17 +3577,17 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_PReportParameter", x => x.Id); + table.PrimaryKey("PK_T_Sas_ReportParameter", x => x.Id); table.ForeignKey( - name: "FK_PReportParameter_PReportTemplate_TemplateId", + name: "FK_T_Sas_ReportParameter_T_Sas_ReportTemplate_TemplateId", column: x => x.TemplateId, - principalTable: "PReportTemplate", + principalTable: "T_Sas_ReportTemplate", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( - name: "DDistrict", + name: "P_Sas_District", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3608,11 +3608,11 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_DDistrict", x => x.Id); + table.PrimaryKey("PK_P_Sas_District", x => x.Id); table.ForeignKey( - name: "FK_DDistrict_DCity_CityId", + name: "FK_P_Sas_District_P_Sas_City_CityId", column: x => x.CityId, - principalTable: "DCity", + principalTable: "P_Sas_City", principalColumn: "Id"); }); @@ -3835,173 +3835,30 @@ namespace Kurs.Platform.Migrations column: "UserName"); migrationBuilder.CreateIndex( - name: "IX_CClassroom_ScheduledStartTime", - table: "CClassroom", - column: "ScheduledStartTime"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroom_TeacherId", - table: "CClassroom", - column: "TeacherId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomAttandance_JoinTime", - table: "CClassroomAttandance", - column: "JoinTime"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomAttandance_SessionId", - table: "CClassroomAttandance", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomAttandance_StudentId", - table: "CClassroomAttandance", - column: "StudentId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomChat_SenderId", - table: "CClassroomChat", - column: "SenderId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomChat_SessionId", - table: "CClassroomChat", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomChat_Timestamp", - table: "CClassroomChat", - column: "Timestamp"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomParticipant_SessionId", - table: "CClassroomParticipant", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomParticipant_SessionId_UserId", - table: "CClassroomParticipant", - columns: new[] { "SessionId", "UserId" }, - unique: true, - filter: "[UserId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_CClassroomParticipant_UserId", - table: "CClassroomParticipant", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_CQuestion_QuestionPoolId", - table: "CQuestion", - column: "QuestionPoolId"); - - migrationBuilder.CreateIndex( - name: "IX_CQuestionOption_QuestionId", - table: "CQuestionOption", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_DBankAccount_BankId", - table: "DBankAccount", - column: "BankId"); - - migrationBuilder.CreateIndex( - name: "IX_DBankAccount_CurrencyId", - table: "DBankAccount", - column: "CurrencyId"); - - migrationBuilder.CreateIndex( - name: "IX_DCity_Country_Code", - table: "DCity", - columns: new[] { "Country", "Code" }, - unique: true, - filter: "[Country] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_DCity_CountryId", - table: "DCity", - column: "CountryId"); - - migrationBuilder.CreateIndex( - name: "IX_DClass_ClassTypeId", - table: "DClass", + name: "IX_B_Crd_Class_ClassTypeId", + table: "B_Crd_Class", column: "ClassTypeId"); migrationBuilder.CreateIndex( - name: "IX_DClassType_RegistrationTypeId", - table: "DClassType", + name: "IX_B_Crd_ClassType_RegistrationTypeId", + table: "B_Crd_ClassType", column: "RegistrationTypeId"); migrationBuilder.CreateIndex( - name: "IX_DCountry_Code", - table: "DCountry", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_DCountry_GroupName", - table: "DCountry", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_DCountryGroup_Name", - table: "DCountryGroup", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_DDistrict_CityId", - table: "DDistrict", - column: "CityId"); - - migrationBuilder.CreateIndex( - name: "IX_DDistrict_Country_City_Name_Township_Street_ZipCode", - table: "DDistrict", - 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_DEvent_CategoryId", - table: "DEvent", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_DEvent_TypeId", - table: "DEvent", - column: "TypeId"); - - migrationBuilder.CreateIndex( - name: "IX_DLevel_ClassTypeId", - table: "DLevel", + name: "IX_B_Crd_Level_ClassTypeId", + table: "B_Crd_Level", column: "ClassTypeId"); migrationBuilder.CreateIndex( - name: "IX_DRegistrationMethod_RegistrationTypeId", - table: "DRegistrationMethod", + name: "IX_B_Crd_RegistrationMethod_RegistrationTypeId", + table: "B_Crd_RegistrationMethod", column: "RegistrationTypeId"); migrationBuilder.CreateIndex( - name: "IX_DScheduleLesson_ScheduleId", - table: "DScheduleLesson", + name: "IX_B_Crd_ScheduleLesson_ScheduleId", + table: "B_Crd_ScheduleLesson", column: "ScheduleId"); - migrationBuilder.CreateIndex( - name: "IX_DSkill_SkillTypeId", - table: "DSkill", - column: "SkillTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_DSkillLevel_SkillTypeId", - table: "DSkillLevel", - column: "SkillTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_DUom_UomCategoryId", - table: "DUom", - column: "UomCategoryId"); - migrationBuilder.CreateIndex( name: "IX_OpenIddictApplications_ClientId", table: "OpenIddictApplications", @@ -4033,157 +3890,300 @@ namespace Kurs.Platform.Migrations column: "ReferenceId"); migrationBuilder.CreateIndex( - name: "IX_PApiEndpoint_EntityId", - table: "PApiEndpoint", - column: "EntityId"); - - migrationBuilder.CreateIndex( - name: "IX_PApiMigration_EntityId", - table: "PApiMigration", - column: "EntityId"); - - migrationBuilder.CreateIndex( - name: "IX_PBackgroundWorker_MailQueue_TableName", - table: "PBackgroundWorker_MailQueue", + name: "IX_P_P_BackgroundWorker_MailQueue_TableName", + table: "P_P_BackgroundWorker_MailQueue", column: "TableName"); migrationBuilder.CreateIndex( - name: "IX_PBackgroundWorker_MailQueueEvents_AwsMessageId", - table: "PBackgroundWorker_MailQueueEvents", + name: "IX_P_P_BackgroundWorker_MailQueueEvents_AwsMessageId", + table: "P_P_BackgroundWorker_MailQueueEvents", column: "AwsMessageId"); migrationBuilder.CreateIndex( name: "IX_MailQueueTableFormat", - table: "PBackgroundWorker_MailQueueTableFormat", + table: "P_P_BackgroundWorker_MailQueueTableFormat", columns: new[] { "TableName", "Order" }, unique: true); migrationBuilder.CreateIndex( - name: "IX_PCustomEntityField_EntityId", - table: "PCustomEntityField", - column: "EntityId"); - - migrationBuilder.CreateIndex( - name: "IX_PForumCategory_DisplayOrder", - table: "PForumCategory", - column: "DisplayOrder"); - - migrationBuilder.CreateIndex( - name: "IX_PForumPost_ParentPostId", - table: "PForumPost", - column: "ParentPostId"); - - migrationBuilder.CreateIndex( - name: "IX_PForumPost_TopicId", - table: "PForumPost", - column: "TopicId"); - - migrationBuilder.CreateIndex( - name: "IX_PForumTopic_CategoryId", - table: "PForumTopic", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_PForumTopic_IsPinned", - table: "PForumTopic", - column: "IsPinned"); - - migrationBuilder.CreateIndex( - name: "IX_PForumTopic_LastPostDate", - table: "PForumTopic", - column: "LastPostDate"); - - migrationBuilder.CreateIndex( - name: "IX_PLanguageKey_ResourceName_Key", - table: "PLanguageKey", + name: "IX_P_P_LanguageKey_ResourceName_Key", + table: "P_P_LanguageKey", columns: new[] { "ResourceName", "Key" }, unique: true); migrationBuilder.CreateIndex( - name: "IX_PLanguageText_CultureName", - table: "PLanguageText", + name: "IX_P_P_LanguageText_CultureName", + table: "P_P_LanguageText", column: "CultureName"); migrationBuilder.CreateIndex( - name: "IX_PLanguageText_ResourceName_Key", - table: "PLanguageText", + name: "IX_P_P_LanguageText_ResourceName_Key", + table: "P_P_LanguageText", columns: new[] { "ResourceName", "Key" }); migrationBuilder.CreateIndex( - name: "IX_PListFormCustomization_ListFormCode", - table: "PListFormCustomization", - column: "ListFormCode"); - - migrationBuilder.CreateIndex( - name: "IX_PListFormField_ListFormCode", - table: "PListFormField", - column: "ListFormCode"); - - migrationBuilder.CreateIndex( - name: "IX_PListFormImport_ListFormCode", - table: "PListFormImport", - column: "ListFormCode"); - - migrationBuilder.CreateIndex( - name: "IX_PListFormImportExecute_ImportId", - table: "PListFormImportExecute", - column: "ImportId"); - - migrationBuilder.CreateIndex( - name: "IX_PNotification_NotificationRuleId", - table: "PNotification", + name: "IX_P_P_Notification_NotificationRuleId", + table: "P_P_Notification", column: "NotificationRuleId"); migrationBuilder.CreateIndex( - name: "IX_PReportGenerated_TemplateId", - table: "PReportGenerated", - column: "TemplateId"); + name: "IX_P_Sas_City_Country_Code", + table: "P_Sas_City", + columns: new[] { "Country", "Code" }, + unique: true, + filter: "[Country] IS NOT NULL"); migrationBuilder.CreateIndex( - name: "IX_PReportParameter_TemplateId", - table: "PReportParameter", - column: "TemplateId"); + name: "IX_P_Sas_City_CountryId", + table: "P_Sas_City", + column: "CountryId"); migrationBuilder.CreateIndex( - name: "IX_PReportTemplate_CategoryId", - table: "PReportTemplate", + name: "IX_P_Sas_Country_Code", + table: "P_Sas_Country", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_Country_GroupName", + table: "P_Sas_Country", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_CountryGroup_Name", + table: "P_Sas_CountryGroup", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_District_CityId", + table: "P_Sas_District", + column: "CityId"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_District_Country_City_Name_Township_Street_ZipCode", + table: "P_Sas_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", + column: "DisplayOrder"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ForumPost_ParentPostId", + table: "P_Sas_ForumPost", + column: "ParentPostId"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ForumPost_TopicId", + table: "P_Sas_ForumPost", + column: "TopicId"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ForumTopic_CategoryId", + table: "P_Sas_ForumTopic", column: "CategoryId"); migrationBuilder.CreateIndex( - name: "IX_PRoute_Key", - table: "PRoute", + name: "IX_P_Sas_ForumTopic_IsPinned", + table: "P_Sas_ForumTopic", + column: "IsPinned"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ForumTopic_LastPostDate", + table: "P_Sas_ForumTopic", + column: "LastPostDate"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ListFormCustomization_ListFormCode", + table: "P_Sas_ListFormCustomization", + column: "ListFormCode"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ListFormField_ListFormCode", + table: "P_Sas_ListFormField", + column: "ListFormCode"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ListFormImport_ListFormCode", + table: "P_Sas_ListFormImport", + column: "ListFormCode"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_ListFormImportExecute_ImportId", + table: "P_Sas_ListFormImportExecute", + column: "ImportId"); + + migrationBuilder.CreateIndex( + name: "IX_P_Sas_Route_Key", + table: "P_Sas_Route", column: "Key", unique: true); migrationBuilder.CreateIndex( - name: "IX_WBlogCategory_Slug", - table: "WBlogCategory", + name: "IX_T_Acc_BankAccount_BankId", + table: "T_Acc_BankAccount", + column: "BankId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Acc_BankAccount_CurrencyId", + table: "T_Acc_BankAccount", + column: "CurrencyId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Adm_BlogCategory_Slug", + table: "T_Adm_BlogCategory", column: "Slug"); migrationBuilder.CreateIndex( - name: "IX_WBlogPost_CategoryId", - table: "WBlogPost", + name: "IX_T_Adm_BlogPost_CategoryId", + table: "T_Adm_BlogPost", column: "CategoryId"); migrationBuilder.CreateIndex( - name: "IX_WBlogPost_IsPublished", - table: "WBlogPost", + name: "IX_T_Adm_BlogPost_IsPublished", + table: "T_Adm_BlogPost", column: "IsPublished"); migrationBuilder.CreateIndex( - name: "IX_WBlogPost_PublishedAt", - table: "WBlogPost", + name: "IX_T_Adm_BlogPost_PublishedAt", + table: "T_Adm_BlogPost", column: "PublishedAt"); migrationBuilder.CreateIndex( - name: "IX_WBlogPost_Slug", - table: "WBlogPost", + name: "IX_T_Adm_BlogPost_Slug", + table: "T_Adm_BlogPost", column: "Slug"); migrationBuilder.CreateIndex( - name: "IX_WOrderItem_OrderId", - table: "WOrderItem", + name: "IX_T_Adm_Event_CategoryId", + table: "T_Adm_Event", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Adm_Event_TypeId", + table: "T_Adm_Event", + column: "TypeId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Adm_OrderItem_OrderId", + table: "T_Adm_OrderItem", column: "OrderId"); + + 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_Sas_ApiEndpoint_EntityId", + table: "T_Sas_ApiEndpoint", + column: "EntityId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Sas_ApiMigration_EntityId", + table: "T_Sas_ApiMigration", + column: "EntityId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Sas_CustomEntityField_EntityId", + table: "T_Sas_CustomEntityField", + column: "EntityId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Sas_ReportGenerated_TemplateId", + table: "T_Sas_ReportGenerated", + column: "TemplateId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Sas_ReportParameter_TemplateId", + table: "T_Sas_ReportParameter", + column: "TemplateId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Sas_ReportTemplate_CategoryId", + table: "T_Sas_ReportTemplate", + column: "CategoryId"); } /// @@ -4262,115 +4262,22 @@ namespace Kurs.Platform.Migrations name: "AbpUserTokens"); migrationBuilder.DropTable( - name: "CClassroomAttandance"); + name: "B_Adm_Meal"); migrationBuilder.DropTable( - name: "CClassroomChat"); + name: "B_Crd_Class"); migrationBuilder.DropTable( - name: "CClassroomParticipant"); + name: "B_Crd_LessonPeriod"); migrationBuilder.DropTable( - name: "CQuestionOption"); + name: "B_Crd_Level"); migrationBuilder.DropTable( - name: "CQuestionTag"); + name: "B_Crd_RegistrationMethod"); migrationBuilder.DropTable( - name: "DBankAccount"); - - migrationBuilder.DropTable( - name: "DBehavior"); - - migrationBuilder.DropTable( - name: "DClass"); - - migrationBuilder.DropTable( - name: "DClassCancellationReason"); - - migrationBuilder.DropTable( - name: "DContactTag"); - - migrationBuilder.DropTable( - name: "DContactTitle"); - - migrationBuilder.DropTable( - name: "DDisease"); - - migrationBuilder.DropTable( - name: "DDistrict"); - - migrationBuilder.DropTable( - name: "DDocument"); - - migrationBuilder.DropTable( - name: "DEducationStatus"); - - migrationBuilder.DropTable( - name: "DEvent"); - - migrationBuilder.DropTable( - name: "DInteresting"); - - migrationBuilder.DropTable( - name: "DLawyer"); - - migrationBuilder.DropTable( - name: "DLessonPeriod"); - - migrationBuilder.DropTable( - name: "DLevel"); - - migrationBuilder.DropTable( - name: "DMeal"); - - migrationBuilder.DropTable( - name: "DMeetingMethod"); - - migrationBuilder.DropTable( - name: "DMeetingResult"); - - migrationBuilder.DropTable( - name: "DNoteType"); - - migrationBuilder.DropTable( - name: "DProgram"); - - migrationBuilder.DropTable( - name: "DPsychologist"); - - migrationBuilder.DropTable( - name: "DRegistrationMethod"); - - migrationBuilder.DropTable( - name: "DSalesRejectionReason"); - - migrationBuilder.DropTable( - name: "DScheduleLesson"); - - migrationBuilder.DropTable( - name: "DSector"); - - migrationBuilder.DropTable( - name: "DSkill"); - - migrationBuilder.DropTable( - name: "DSkillLevel"); - - migrationBuilder.DropTable( - name: "DSource"); - - migrationBuilder.DropTable( - name: "DUom"); - - migrationBuilder.DropTable( - name: "DVaccine"); - - migrationBuilder.DropTable( - name: "DVehicle"); - - migrationBuilder.DropTable( - name: "DWorkHour"); + name: "B_Crd_ScheduleLesson"); migrationBuilder.DropTable( name: "OpenIddictScopes"); @@ -4379,106 +4286,199 @@ namespace Kurs.Platform.Migrations name: "OpenIddictTokens"); migrationBuilder.DropTable( - name: "PActivity"); + name: "P_P_AiBot"); migrationBuilder.DropTable( - name: "PAiBot"); + name: "P_P_BackgroundWorker"); migrationBuilder.DropTable( - name: "PApiEndpoint"); + name: "P_P_BackgroundWorker_MailQueueEvents"); migrationBuilder.DropTable( - name: "PApiMigration"); + name: "P_P_LanguageText"); migrationBuilder.DropTable( - name: "PBackgroundWorker"); + name: "P_P_Notification"); migrationBuilder.DropTable( - name: "PBackgroundWorker_MailQueueEvents"); + name: "P_P_SettingDefinition"); migrationBuilder.DropTable( - name: "PBranch"); + name: "P_Sas_ContactTag"); migrationBuilder.DropTable( - name: "PBranchUsers"); + name: "P_Sas_ContactTitle"); migrationBuilder.DropTable( - name: "PCustomComponent"); + name: "P_Sas_DataSource"); migrationBuilder.DropTable( - name: "PCustomEndpoint"); + name: "P_Sas_District"); migrationBuilder.DropTable( - name: "PCustomEntityField"); + name: "P_Sas_ForumPost"); migrationBuilder.DropTable( - name: "PDataSource"); + name: "P_Sas_ListFormCustomization"); migrationBuilder.DropTable( - name: "PForumPost"); + name: "P_Sas_ListFormField"); migrationBuilder.DropTable( - name: "PGlobalSearch"); + name: "P_Sas_ListFormImportExecute"); migrationBuilder.DropTable( - name: "PIpRestriction"); + name: "P_Sas_Menu"); migrationBuilder.DropTable( - name: "PLanguageText"); + name: "P_Sas_Route"); migrationBuilder.DropTable( - name: "PListFormCustomization"); + name: "T_Acc_BankAccount"); migrationBuilder.DropTable( - name: "PListFormField"); + name: "T_Adm_About"); migrationBuilder.DropTable( - name: "PListFormImportExecute"); + name: "T_Adm_Behavior"); migrationBuilder.DropTable( - name: "PMenu"); + name: "T_Adm_BlogPost"); migrationBuilder.DropTable( - name: "PNotification"); + name: "T_Adm_Contact"); migrationBuilder.DropTable( - name: "PReportGenerated"); + name: "T_Adm_Demo"); migrationBuilder.DropTable( - name: "PReportParameter"); + name: "T_Adm_Disease"); migrationBuilder.DropTable( - name: "PRoute"); + name: "T_Adm_Document"); migrationBuilder.DropTable( - name: "PSettingDefinition"); + name: "T_Adm_EducationStatus"); migrationBuilder.DropTable( - name: "WAbout"); + name: "T_Adm_Event"); migrationBuilder.DropTable( - name: "WBlogPost"); + name: "T_Adm_InstallmentOption"); migrationBuilder.DropTable( - name: "WContact"); + name: "T_Adm_Lawyer"); migrationBuilder.DropTable( - name: "WDemo"); + name: "T_Adm_OrderItem"); migrationBuilder.DropTable( - name: "WInstallmentOption"); + name: "T_Adm_PaymentMethod"); migrationBuilder.DropTable( - name: "WOrderItem"); + name: "T_Adm_Product"); migrationBuilder.DropTable( - name: "WPaymentMethod"); + name: "T_Adm_Psychologist"); migrationBuilder.DropTable( - name: "WProduct"); + name: "T_Adm_Service"); migrationBuilder.DropTable( - name: "WService"); + name: "T_Adm_Skill"); + + migrationBuilder.DropTable( + name: "T_Adm_SkillLevel"); + + migrationBuilder.DropTable( + name: "T_Adm_Uom"); + + 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_P_Activity"); + + 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_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_Sas_Sector"); migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -4496,100 +4496,100 @@ namespace Kurs.Platform.Migrations name: "AbpUsers"); migrationBuilder.DropTable( - name: "CClassroom"); + name: "B_Crd_ClassType"); migrationBuilder.DropTable( - name: "CQuestion"); - - migrationBuilder.DropTable( - name: "DBank"); - - migrationBuilder.DropTable( - name: "DCurrency"); - - migrationBuilder.DropTable( - name: "DCity"); - - migrationBuilder.DropTable( - name: "DEventCategory"); - - migrationBuilder.DropTable( - name: "DEventType"); - - migrationBuilder.DropTable( - name: "DClassType"); - - migrationBuilder.DropTable( - name: "DSchedule"); - - migrationBuilder.DropTable( - name: "DSkillType"); - - migrationBuilder.DropTable( - name: "DUomCategory"); + name: "B_Crd_Schedule"); migrationBuilder.DropTable( name: "OpenIddictAuthorizations"); migrationBuilder.DropTable( - name: "PBackgroundWorker_MailQueue"); + name: "P_P_BackgroundWorker_MailQueue"); migrationBuilder.DropTable( - name: "PCustomEntity"); + name: "P_P_LanguageKey"); migrationBuilder.DropTable( - name: "PForumTopic"); + name: "P_P_Language"); migrationBuilder.DropTable( - name: "PLanguageKey"); + name: "P_P_NotificationRule"); migrationBuilder.DropTable( - name: "PLanguage"); + name: "P_Sas_City"); migrationBuilder.DropTable( - name: "PListFormImport"); + name: "P_Sas_ForumTopic"); migrationBuilder.DropTable( - name: "PNotificationRule"); + name: "P_Sas_ListFormImport"); migrationBuilder.DropTable( - name: "PReportTemplate"); + name: "P_Sas_Currency"); migrationBuilder.DropTable( - name: "WBlogCategory"); + name: "T_Acc_Bank"); migrationBuilder.DropTable( - name: "WOrder"); + name: "T_Adm_BlogCategory"); + + migrationBuilder.DropTable( + name: "T_Adm_EventCategory"); + + migrationBuilder.DropTable( + name: "T_Adm_EventType"); + + migrationBuilder.DropTable( + name: "T_Adm_Order"); + + 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_Sas_CustomEntity"); + + migrationBuilder.DropTable( + name: "T_Sas_ReportTemplate"); migrationBuilder.DropTable( name: "AbpAuditLogs"); migrationBuilder.DropTable( - name: "CQuestionPool"); - - migrationBuilder.DropTable( - name: "DCountry"); - - migrationBuilder.DropTable( - name: "DRegistrationType"); + name: "B_Crd_RegistrationType"); migrationBuilder.DropTable( name: "OpenIddictApplications"); migrationBuilder.DropTable( - name: "PBackgroundWorker_MailQueueTableFormat"); + name: "P_P_BackgroundWorker_MailQueueTableFormat"); migrationBuilder.DropTable( - name: "PForumCategory"); + name: "P_Sas_Country"); migrationBuilder.DropTable( - name: "PListForm"); + name: "P_Sas_ForumCategory"); migrationBuilder.DropTable( - name: "PReportCategory"); + name: "P_Sas_ListForm"); migrationBuilder.DropTable( - name: "DCountryGroup"); + name: "T_Crd_QuestionPool"); + + migrationBuilder.DropTable( + name: "T_Sas_ReportCategory"); + + migrationBuilder.DropTable( + name: "P_Sas_CountryGroup"); } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 1f03ffed..78323703 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -83,7 +83,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PLanguage", (string)null); + b.ToTable("P_P_Language", (string)null); }); modelBuilder.Entity("Kurs.Languages.Entities.LanguageKey", b => @@ -137,7 +137,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResourceName", "Key") .IsUnique(); - b.ToTable("PLanguageKey", (string)null); + b.ToTable("P_P_LanguageKey", (string)null); }); modelBuilder.Entity("Kurs.Languages.Entities.LanguageText", b => @@ -200,7 +200,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ResourceName", "Key"); - b.ToTable("PLanguageText", (string)null); + b.ToTable("P_P_LanguageText", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", b => @@ -291,7 +291,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TableName"); - b.ToTable("PBackgroundWorker_MailQueue", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueue", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueEvents", b => @@ -353,7 +353,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("AwsMessageId"); - b.ToTable("PBackgroundWorker_MailQueueEvents", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueueEvents", (string)null); }); modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueTableFormat", b => @@ -419,7 +419,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasDatabaseName("IX_MailQueueTableFormat"); - b.ToTable("PBackgroundWorker_MailQueueTableFormat", (string)null); + b.ToTable("P_P_BackgroundWorker_MailQueueTableFormat", (string)null); }); modelBuilder.Entity("Kurs.Notifications.Entities.Notification", b => @@ -497,7 +497,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("NotificationRuleId"); - b.ToTable("PNotification", (string)null); + b.ToTable("P_P_Notification", (string)null); }); modelBuilder.Entity("Kurs.Notifications.Entities.NotificationRule", b => @@ -566,7 +566,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PNotificationRule", (string)null); + b.ToTable("P_P_NotificationRule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.About", b => @@ -619,7 +619,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WAbout", (string)null); + b.ToTable("T_Adm_About", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Activity", b => @@ -686,7 +686,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PActivity", (string)null); + b.ToTable("T_P_Activity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -701,7 +701,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PAiBot", (string)null); + b.ToTable("P_P_AiBot", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => @@ -777,7 +777,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PApiEndpoint", (string)null); + b.ToTable("T_Sas_ApiEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => @@ -838,7 +838,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PApiMigration", (string)null); + b.ToTable("T_Sas_ApiMigration", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => @@ -911,7 +911,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PBackgroundWorker", (string)null); + b.ToTable("P_P_BackgroundWorker", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Bank", b => @@ -999,7 +999,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DBank", (string)null); + b.ToTable("T_Acc_Bank", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => @@ -1073,7 +1073,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CurrencyId"); - b.ToTable("DBankAccount", (string)null); + b.ToTable("T_Acc_BankAccount", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => @@ -1122,7 +1122,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DBehavior", (string)null); + b.ToTable("T_Adm_Behavior", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => @@ -1195,7 +1195,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("WBlogCategory", (string)null); + b.ToTable("T_Adm_BlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1299,7 +1299,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("WBlogPost", (string)null); + b.ToTable("T_Adm_BlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1413,7 +1413,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PBranch", (string)null); + b.ToTable("T_Sas_Branch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => @@ -1433,7 +1433,7 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); - b.ToTable("PBranchUsers", (string)null); + b.ToTable("T_Sas_BranchUsers", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.City", b => @@ -1500,7 +1500,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[Country] IS NOT NULL"); - b.ToTable("DCity", (string)null); + b.ToTable("P_Sas_City", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Class", b => @@ -1561,7 +1561,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("DClass", (string)null); + b.ToTable("B_Crd_Class", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => @@ -1614,7 +1614,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DClassCancellationReason", (string)null); + b.ToTable("T_Crd_ClassCancellationReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => @@ -1681,7 +1681,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("DClassType", (string)null); + b.ToTable("B_Crd_ClassType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => @@ -1777,7 +1777,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TeacherId"); - b.ToTable("CClassroom", (string)null); + b.ToTable("T_Crd_Classroom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -1850,7 +1850,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("StudentId"); - b.ToTable("CClassroomAttandance", (string)null); + b.ToTable("T_Crd_ClassroomAttandance", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", b => @@ -1934,7 +1934,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Timestamp"); - b.ToTable("CClassroomChat", (string)null); + b.ToTable("T_Crd_ClassroomChat", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => @@ -2029,7 +2029,7 @@ namespace Kurs.Platform.Migrations .IsUnique() .HasFilter("[UserId] IS NOT NULL"); - b.ToTable("CClassroomParticipant", (string)null); + b.ToTable("T_Crd_ClassroomParticipant", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Contact", b => @@ -2102,7 +2102,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WContact", (string)null); + b.ToTable("T_Adm_Contact", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => @@ -2151,7 +2151,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DContactTag", (string)null); + b.ToTable("P_Sas_ContactTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => @@ -2200,7 +2200,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DContactTitle", (string)null); + b.ToTable("P_Sas_ContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2276,7 +2276,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("GroupName"); - b.ToTable("DCountry", (string)null); + b.ToTable("P_Sas_Country", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CountryGroup", b => @@ -2324,7 +2324,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Name") .IsUnique(); - b.ToTable("DCountryGroup", (string)null); + b.ToTable("P_Sas_CountryGroup", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Currency", b => @@ -2390,7 +2390,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DCurrency", (string)null); + b.ToTable("P_Sas_Currency", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomComponent", b => @@ -2458,7 +2458,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomComponent", (string)null); + b.ToTable("T_Sas_CustomComponent", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEndpoint", b => @@ -2536,7 +2536,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomEndpoint", (string)null); + b.ToTable("T_Sas_CustomEndpoint", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", b => @@ -2621,7 +2621,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PCustomEntity", (string)null); + b.ToTable("T_Sas_CustomEntity", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => @@ -2693,7 +2693,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EntityId"); - b.ToTable("PCustomEntityField", (string)null); + b.ToTable("T_Sas_CustomEntityField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.DataSource", b => @@ -2745,7 +2745,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PDataSource", (string)null); + b.ToTable("P_Sas_DataSource", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Demo", b => @@ -2825,7 +2825,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WDemo", (string)null); + b.ToTable("T_Adm_Demo", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => @@ -2874,7 +2874,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DDisease", (string)null); + b.ToTable("T_Adm_Disease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -2949,7 +2949,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("DDistrict", (string)null); + b.ToTable("P_Sas_District", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Document", b => @@ -2998,7 +2998,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DDocument", (string)null); + b.ToTable("T_Adm_Document", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => @@ -3050,7 +3050,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEducationStatus", (string)null); + b.ToTable("T_Adm_EducationStatus", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Event", b => @@ -3121,7 +3121,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("DEvent", (string)null); + b.ToTable("T_Adm_Event", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => @@ -3170,7 +3170,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEventCategory", (string)null); + b.ToTable("T_Adm_EventCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => @@ -3219,7 +3219,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DEventType", (string)null); + b.ToTable("T_Adm_EventType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => @@ -3257,7 +3257,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PGlobalSearch", (string)null); + b.ToTable("T_Sas_GlobalSearch", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => @@ -3313,7 +3313,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WInstallmentOption", (string)null); + b.ToTable("T_Adm_InstallmentOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => @@ -3366,7 +3366,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DInteresting", (string)null); + b.ToTable("T_Prt_Interesting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -3424,7 +3424,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PIpRestriction", (string)null); + b.ToTable("T_Sas_IpRestriction", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => @@ -3521,7 +3521,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DLawyer", (string)null); + b.ToTable("T_Adm_Lawyer", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => @@ -3593,7 +3593,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DLessonPeriod", (string)null); + b.ToTable("B_Crd_LessonPeriod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Level", b => @@ -3671,7 +3671,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ClassTypeId"); - b.ToTable("DLevel", (string)null); + b.ToTable("B_Crd_Level", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => @@ -3963,7 +3963,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PListForm", (string)null); + b.ToTable("P_Sas_ListForm", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -4028,7 +4028,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormCustomization", (string)null); + b.ToTable("P_Sas_ListFormCustomization", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => @@ -4195,7 +4195,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormField", (string)null); + b.ToTable("P_Sas_ListFormField", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => @@ -4255,7 +4255,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ListFormCode"); - b.ToTable("PListFormImport", (string)null); + b.ToTable("P_Sas_ListFormImport", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => @@ -4325,7 +4325,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ImportId"); - b.ToTable("PListFormImportExecute", (string)null); + b.ToTable("P_Sas_ListFormImportExecute", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => @@ -4387,7 +4387,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeal", (string)null); + b.ToTable("B_Adm_Meal", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => @@ -4446,7 +4446,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeetingMethod", (string)null); + b.ToTable("T_Prt_MeetingMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => @@ -4503,7 +4503,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DMeetingResult", (string)null); + b.ToTable("T_Prt_MeetingResult", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => @@ -4599,7 +4599,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PMenu", (string)null); + b.ToTable("P_Sas_Menu", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => @@ -4648,7 +4648,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DNoteType", (string)null); + b.ToTable("T_Prt_NoteType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Order", b => @@ -4781,7 +4781,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WOrder", (string)null); + b.ToTable("T_Adm_Order", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -4846,7 +4846,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("WOrderItem", (string)null); + b.ToTable("T_Adm_OrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -4903,7 +4903,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WPaymentMethod", (string)null); + b.ToTable("T_Adm_PaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -4979,7 +4979,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WProduct", (string)null); + b.ToTable("T_Adm_Product", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Program", b => @@ -5032,7 +5032,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DProgram", (string)null); + b.ToTable("T_Crd_Program", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => @@ -5097,7 +5097,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DPsychologist", (string)null); + b.ToTable("T_Adm_Psychologist", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Question", b => @@ -5190,7 +5190,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionPoolId"); - b.ToTable("CQuestion", (string)null); + b.ToTable("T_Crd_Question", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", b => @@ -5251,7 +5251,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("QuestionId"); - b.ToTable("CQuestionOption", (string)null); + b.ToTable("T_Crd_QuestionOption", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", b => @@ -5308,7 +5308,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("CQuestionPool", (string)null); + b.ToTable("T_Crd_QuestionPool", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b => @@ -5370,7 +5370,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("CQuestionTag", (string)null); + b.ToTable("T_Crd_QuestionTag", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => @@ -5430,7 +5430,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("RegistrationTypeId"); - b.ToTable("DRegistrationMethod", (string)null); + b.ToTable("B_Crd_RegistrationMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => @@ -5486,7 +5486,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DRegistrationType", (string)null); + b.ToTable("B_Crd_RegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -5543,7 +5543,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PReportCategory", (string)null); + b.ToTable("T_Sas_ReportCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => @@ -5605,7 +5605,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("PReportGenerated", (string)null); + b.ToTable("T_Sas_ReportGenerated", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => @@ -5678,7 +5678,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TemplateId"); - b.ToTable("PReportParameter", (string)null); + b.ToTable("T_Sas_ReportParameter", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => @@ -5744,7 +5744,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("CategoryId"); - b.ToTable("PReportTemplate", (string)null); + b.ToTable("T_Sas_ReportTemplate", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Route", b => @@ -5809,7 +5809,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("PRoute", (string)null); + b.ToTable("P_Sas_Route", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => @@ -5866,7 +5866,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSalesRejectionReason", (string)null); + b.ToTable("T_Prt_SalesRejectionReason", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => @@ -5970,7 +5970,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSchedule", (string)null); + b.ToTable("B_Crd_Schedule", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => @@ -6043,7 +6043,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("ScheduleId"); - b.ToTable("DScheduleLesson", (string)null); + b.ToTable("B_Crd_ScheduleLesson", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => @@ -6092,7 +6092,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSector", (string)null); + b.ToTable("T_Sas_Sector", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Service", b => @@ -6155,7 +6155,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("WService", (string)null); + b.ToTable("T_Adm_Service", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -6209,7 +6209,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("DSkill", (string)null); + b.ToTable("T_Adm_Skill", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => @@ -6273,7 +6273,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("SkillTypeId"); - b.ToTable("DSkillLevel", (string)null); + b.ToTable("T_Adm_SkillLevel", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => @@ -6322,7 +6322,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSkillType", (string)null); + b.ToTable("T_Adm_SkillType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Source", b => @@ -6375,7 +6375,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DSource", (string)null); + b.ToTable("T_Prt_Source", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => @@ -6445,7 +6445,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("UomCategoryId"); - b.ToTable("DUom", (string)null); + b.ToTable("T_Adm_Uom", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => @@ -6494,7 +6494,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DUomCategory", (string)null); + b.ToTable("T_Adm_UomCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => @@ -6543,7 +6543,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DVaccine", (string)null); + b.ToTable("T_Adm_Vaccine", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => @@ -6635,7 +6635,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DVehicle", (string)null); + b.ToTable("T_Adm_Vehicle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => @@ -6715,7 +6715,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("DWorkHour", (string)null); + b.ToTable("T_Adm_WorkHour", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => @@ -6805,7 +6805,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("PForumCategory", (string)null); + b.ToTable("P_Sas_ForumCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => @@ -6875,7 +6875,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("PForumPost", (string)null); + b.ToTable("P_Sas_ForumPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => @@ -6974,7 +6974,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("PForumTopic", (string)null); + b.ToTable("P_Sas_ForumTopic", (string)null); }); modelBuilder.Entity("Kurs.Settings.Entities.SettingDefinition", b => @@ -7071,7 +7071,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PSettingDefinition", (string)null); + b.ToTable("P_P_SettingDefinition", (string)null); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => diff --git a/api/src/Kurs.Platform.HttpApi.Host/Program.cs b/api/src/Kurs.Platform.HttpApi.Host/Program.cs index b3d9c723..be1400b2 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/Program.cs +++ b/api/src/Kurs.Platform.HttpApi.Host/Program.cs @@ -44,7 +44,7 @@ public class Program case DatabaseProvider.PostgreSql: loggerConfig = loggerConfig.WriteTo.PostgreSQL( connectionString: configuration.GetConnectionString(DefaultDatabaseProvider), - tableName: PlatformConsts.SelectCommandByTableName("LogEntry"), + tableName: PlatformConsts.TablePrefix.PlatformByName(Enums.MenuPrefix.Platform, Enums.TableNameEnum.LogEntry), columnOptions: columnWriters, needAutoCreateTable: true, respectCase: true @@ -54,7 +54,7 @@ public class Program case DatabaseProvider.SqlServer: loggerConfig = loggerConfig.WriteTo.MSSqlServer( connectionString: configuration.GetConnectionString(DefaultDatabaseProvider), - tableName: PlatformConsts.SelectCommandByTableName("LogEntry"), + tableName: PlatformConsts.TablePrefix.PlatformByName(Enums.MenuPrefix.Platform, Enums.TableNameEnum.LogEntry), autoCreateSqlTable: true, columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions() ); diff --git a/ui/src/views/intranet/Announcement.tsx b/ui/src/views/intranet/Announcement.tsx index ee70387d..0db20d25 100644 --- a/ui/src/views/intranet/Announcement.tsx +++ b/ui/src/views/intranet/Announcement.tsx @@ -60,7 +60,7 @@ const AnnouncementsModule: React.FC = () => { return (
-
+
{/* Header */}

diff --git a/ui/src/views/intranet/Birthday.tsx b/ui/src/views/intranet/Birthday.tsx index 7663108a..f4aa8717 100644 --- a/ui/src/views/intranet/Birthday.tsx +++ b/ui/src/views/intranet/Birthday.tsx @@ -45,7 +45,7 @@ const BirthdaysModule: React.FC = () => { return (
-
+
{/* Header */}

diff --git a/ui/src/views/intranet/Cafeteria.tsx b/ui/src/views/intranet/Cafeteria.tsx index e70f3e08..02c92380 100644 --- a/ui/src/views/intranet/Cafeteria.tsx +++ b/ui/src/views/intranet/Cafeteria.tsx @@ -9,7 +9,7 @@ const CafeteriaModule: React.FC = () => { return (
-
+
{/* Header */}

diff --git a/ui/src/views/intranet/Dashboard.tsx b/ui/src/views/intranet/Dashboard.tsx index 86b43c5d..548460b6 100644 --- a/ui/src/views/intranet/Dashboard.tsx +++ b/ui/src/views/intranet/Dashboard.tsx @@ -105,7 +105,7 @@ const IntranetDashboard: React.FC = () => { return (
-
+
{/* Header */}
diff --git a/ui/src/views/intranet/Document.tsx b/ui/src/views/intranet/Document.tsx index 99c19d29..b3a126d6 100644 --- a/ui/src/views/intranet/Document.tsx +++ b/ui/src/views/intranet/Document.tsx @@ -82,7 +82,7 @@ const DocumentsModule: React.FC = () => { return (
-
+
{/* Header */}

diff --git a/ui/src/views/intranet/Event.tsx b/ui/src/views/intranet/Event.tsx index 8219cfbd..e16051df 100644 --- a/ui/src/views/intranet/Event.tsx +++ b/ui/src/views/intranet/Event.tsx @@ -87,7 +87,7 @@ const EventsModule: React.FC = () => { return (
-
+
{/* Header */}

🎊 Etkinlikler

diff --git a/ui/src/views/intranet/HR/ExpenseManagement.tsx b/ui/src/views/intranet/HR/ExpenseManagement.tsx index e19be9ab..a501093a 100644 --- a/ui/src/views/intranet/HR/ExpenseManagement.tsx +++ b/ui/src/views/intranet/HR/ExpenseManagement.tsx @@ -71,7 +71,7 @@ const ExpenseManagement: React.FC = () => { return (
-
+
{/* Header */}
diff --git a/ui/src/views/intranet/HR/LeaveManagement.tsx b/ui/src/views/intranet/HR/LeaveManagement.tsx index 23ac45a2..935054ed 100644 --- a/ui/src/views/intranet/HR/LeaveManagement.tsx +++ b/ui/src/views/intranet/HR/LeaveManagement.tsx @@ -66,7 +66,7 @@ const LeaveManagement: React.FC = () => { return (
-
+
{/* Header */}
@@ -251,11 +251,11 @@ const LeaveManagement: React.FC = () => { className="p-6 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors" >
- {getTypeIcon(request.type)} + {getTypeIcon(request.leaveType)}

- {getTypeLabel(request.type)} + {getTypeLabel(request.leaveType)}

{request.status === LeaveStatusEnum.Pending && '⏳ Beklemede'} @@ -285,7 +285,7 @@ const LeaveManagement: React.FC = () => {

Talep Tarihi

- {dayjs(request.createdAt).format('DD MMM YYYY')} + {dayjs(request.creationTime).format('DD MMM YYYY')}

diff --git a/ui/src/views/intranet/HR/OvertimeManagement.tsx b/ui/src/views/intranet/HR/OvertimeManagement.tsx index f30e584f..76d008be 100644 --- a/ui/src/views/intranet/HR/OvertimeManagement.tsx +++ b/ui/src/views/intranet/HR/OvertimeManagement.tsx @@ -1,12 +1,6 @@ import React, { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' -import { - HiClock, - HiCheckCircle, - HiPlus, - HiXMark, - HiFunnel -} from 'react-icons/hi2' +import { HiClock, HiCheckCircle, HiPlus, HiXMark, HiFunnel } from 'react-icons/hi2' import dayjs from 'dayjs' import 'dayjs/locale/tr' import { mockOvertimeRequests } from '../../../mocks/mockIntranetData' @@ -17,16 +11,16 @@ dayjs.locale('tr') const OvertimeManagement: React.FC = () => { const [requests, setRequests] = useState(mockOvertimeRequests) const [showCreateModal, setShowCreateModal] = useState(false) - const [filterStatus, setFilterStatus] = useState<'all' | 'pending' | 'approved' | 'rejected'>('all') + const [filterStatus, setFilterStatus] = useState<'all' | LeaveStatusEnum>('all') // Mesai istatistikleri (mock) const overtimeStats = { thisMonth: { total: 24, approved: 20, pending: 4, rejected: 0 }, thisYear: { total: 156, approved: 142, pending: 8, rejected: 6 }, - averagePerMonth: 13 + averagePerMonth: 13, } - const filteredRequests = requests.filter(req => { + const filteredRequests = requests.filter((req) => { if (filterStatus === 'all') return true return req.status === filterStatus }) @@ -35,20 +29,18 @@ const OvertimeManagement: React.FC = () => { const colors = { pending: 'bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300', approved: 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300', - rejected: 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300' + rejected: 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300', } return colors[status as keyof typeof colors] } return (
-
+
{/* Header */}
-

- Mesai Yönetimi -

+

Mesai Yönetimi

Fazla mesai taleplerinizi oluşturun ve takip edin

@@ -66,47 +58,35 @@ const OvertimeManagement: React.FC = () => {
-

- Bu Ay Toplam -

+

Bu Ay Toplam

{overtimeStats.thisMonth.total}

-

- saat fazla mesai -

+

saat fazla mesai

-

- Onaylanan -

+

Onaylanan

{overtimeStats.thisMonth.approved}

-

- bu ay onaylandı -

+

bu ay onaylandı

-

- Bekleyen -

+

Bekleyen

{overtimeStats.thisMonth.pending}

-

- onay bekliyor -

+

onay bekliyor

@@ -119,9 +99,7 @@ const OvertimeManagement: React.FC = () => {

{overtimeStats.thisYear.total}

-

- saat bu yıl -

+

saat bu yıl

@@ -139,9 +117,9 @@ const OvertimeManagement: React.FC = () => { Tümü