diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.Application/NotificationAppService.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.Application/NotificationAppService.cs index e6fe835c..10f1bb51 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.Application/NotificationAppService.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.Application/NotificationAppService.cs @@ -41,9 +41,9 @@ public class NotificationAppService : ReadOnlyAppService< public async Task GetTestAsync() { - await notificationManager.SendNotificationAsync(NotificationTypes.SiparisPasla, "Sayin kullanici, nasilsiniz?"); - await notificationManager.SendNotificationAsync(NotificationTypes.YeniKullanici, "Sayin kullanici, nasilsiniz?"); - await notificationManager.SendNotificationAsync(NotificationTypes.YeniSiparis, "Sayin kullanici, nasilsiniz?"); + // await notificationManager.SendNotificationAsync(NotificationTypes.SiparisPasla, "Sayin kullanici, nasilsiniz?"); + // await notificationManager.SendNotificationAsync(NotificationTypes.YeniKullanici, "Sayin kullanici, nasilsiniz?"); + // await notificationManager.SendNotificationAsync(NotificationTypes.YeniSiparis, "Sayin kullanici, nasilsiniz?"); //smsgönder // alıcılar: +1435345134, +1435345134 diff --git a/api/modules/Kurs.Notifications/Kurs.Notifications.Domain.Shared/Enums/NotificationTypes.cs b/api/modules/Kurs.Notifications/Kurs.Notifications.Domain.Shared/Enums/NotificationTypes.cs index 44504f57..53554ab4 100644 --- a/api/modules/Kurs.Notifications/Kurs.Notifications.Domain.Shared/Enums/NotificationTypes.cs +++ b/api/modules/Kurs.Notifications/Kurs.Notifications.Domain.Shared/Enums/NotificationTypes.cs @@ -4,9 +4,9 @@ namespace Kurs.Notifications.Enums; public static class NotificationTypes { - public const string SiparisPasla = "SiparisPasla"; - public const string YeniSiparis = "YeniSiparis"; - public const string YeniKullanici = "YeniKullanici"; + // public const string SiparisPasla = "SiparisPasla"; + // public const string YeniSiparis = "YeniSiparis"; + // public const string YeniKullanici = "YeniKullanici"; public static string[] GetAll() { diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/Constants.cs b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/Constants.cs new file mode 100644 index 00000000..cd348526 --- /dev/null +++ b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/Constants.cs @@ -0,0 +1,6 @@ +namespace Kurs.Settings; + +public static class Constants +{ + public const char MultiValueDelimiter = '|'; +} \ No newline at end of file diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionDto.cs b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionDto.cs index 4124aee7..1757facc 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionDto.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionDto.cs @@ -11,7 +11,7 @@ public class SettingDefinitionDto : FullAuditedEntityDto public string DescriptionKey { get; set; } public string DefaultValue { get; set; } public bool IsVisibleToClients { get; set; } - public List Providers { get; set; } + public string Providers { get; set; } public bool IsInherited { get; set; } public bool IsEncrypted { get; set; } public string MainGroupKey { get; set; } diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs index 9399da07..7a8eb1f8 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; namespace Kurs.Settings; @@ -29,7 +30,9 @@ public class SettingDefinitionWithGroupDto public Dictionary SelectOptions { get; set; } public string FormName { get; set; } - public List Providers { get; set; } + public string Providers { get; set; } // True if prodivers allow editing (U,T,G) - public bool IsEditable => Providers.Count == 0 || Providers.Any(a => a == "U" || a == "T" || a == "G"); + public bool IsEditable => + Providers.Split(Constants.MultiValueDelimiter).Count() == 0 + || Providers.Split(Constants.MultiValueDelimiter).Any(a => a == "U" || a == "T" || a == "G"); } diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Application/SettingUiAppService.cs b/api/modules/Kurs.Settings/Kurs.Settings.Application/SettingUiAppService.cs index 28185bb7..93c5dd10 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Application/SettingUiAppService.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Application/SettingUiAppService.cs @@ -55,7 +55,7 @@ public class SettingUiAppService : ApplicationService, ISettingUiAppService DataType = a.Definition.DataType, SelectOptions = a.Definition.SelectOptions?.ToDictionary(x => x.Key, x => x.Value), FormName = $"{SettingsConsts.FormNamePrefix}{a.Definition.Code}".Replace('.', '_'), - Providers = a.Definition.Providers ?? ["U", "T", "G", "C", "D"] + Providers = a.Definition.Providers ?? "U|T|G|C|D" }).ToList() }).ToList() }).ToList(); diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Domain.Shared/SettingsConsts.cs b/api/modules/Kurs.Settings/Kurs.Settings.Domain.Shared/SettingsConsts.cs index 0cac5cbf..1b8ff4f3 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Domain.Shared/SettingsConsts.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Domain.Shared/SettingsConsts.cs @@ -22,5 +22,4 @@ public static class SettingsConsts public const string SqlServer = "SqlServer"; public const string PostgreSql = "PostgreSql"; } - } diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Domain/Entities/SettingDefinition.cs b/api/modules/Kurs.Settings/Kurs.Settings.Domain/Entities/SettingDefinition.cs index fb4ab5ef..21f61e66 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Domain/Entities/SettingDefinition.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Domain/Entities/SettingDefinition.cs @@ -22,7 +22,7 @@ public class SettingDefinition : FullAuditedEntity /// A list of allowed providers to get/set value of this setting. /// An empty list indicates that all providers are allowed. /// - public List Providers { get; set; } + public string Providers { get; set; } /// /// Is this setting inherited from parent scopes. diff --git a/api/modules/Kurs.Settings/Kurs.Settings.Domain/Settings/SettingsSettingDefinitionProvider.cs b/api/modules/Kurs.Settings/Kurs.Settings.Domain/Settings/SettingsSettingDefinitionProvider.cs index 429beebc..c6d3c1c7 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.Domain/Settings/SettingsSettingDefinitionProvider.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.Domain/Settings/SettingsSettingDefinitionProvider.cs @@ -12,6 +12,7 @@ namespace Kurs.Settings; public class SettingsDefinitionProvider : SettingDefinitionProvider { private readonly IRepository repository; + private const char MultiValueDelimiter = '|'; public SettingsDefinitionProvider(IRepository repository) { @@ -39,7 +40,7 @@ public class SettingsDefinitionProvider : SettingDefinitionProvider if (!item.Providers.IsNullOrEmpty()) { - def.Providers.AddRange(item.Providers); + def.Providers.AddRange(item.Providers.Split(MultiValueDelimiter)); } context.Add(def); 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 add26ef6..b0fde10f 100644 --- a/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs +++ b/api/modules/Kurs.Settings/Kurs.Settings.EntityFrameworkCore/EntityFrameworkCore/SettingsDbContextModelCreatingExtensions.cs @@ -48,12 +48,7 @@ public static class SettingsDbContextModelCreatingExtensions ? new Dictionary() : JsonSerializer.Deserialize>(v, jsonOptions) ).Metadata.SetValueComparer(valueComparerDict); - b.Property(a => a.Providers).HasMaxLength(64).HasConversion( - v => JsonSerializer.Serialize(v, jsonOptions), - v => v == null - ? new List() - : JsonSerializer.Deserialize>(v, jsonOptions) - ).Metadata.SetValueComparer(valueComparerList); + b.Property(a => a.Providers).HasMaxLength(64); }); } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json index ca2e1c7e..5a194191 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/HostData.json @@ -11,11 +11,7 @@ "descriptionKey": "Abp.Localization.DefaultLanguage.Description", "defaultValue": "tr", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.SiteManagement", @@ -49,11 +45,7 @@ "descriptionKey": "Abp.Timing.TimeZone.Description", "defaultValue": "Turkey Standard Time", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.SiteManagement", @@ -209,11 +201,7 @@ "descriptionKey": "App.SiteManagement.Theme.Style.Description", "defaultValue": "dx.light.compact", "isVisibleToClients": true, - "providers": [ - "U", - "G", - "D" - ], + "providers": "U|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.SiteManagement", @@ -261,10 +249,7 @@ "descriptionKey": "App.SiteManagement.General.NewMemberNotificationEmails.Description", "defaultValue": "system@sozsoft.com", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.SiteManagement", @@ -280,10 +265,7 @@ "descriptionKey": "App.SiteManagement.General.TimedLoginEmails.Description", "defaultValue": "system@sozsoft.com", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.SiteManagement", @@ -299,11 +281,7 @@ "descriptionKey": "App.Sender.Sms.PostaGuvercini.Url.Description", "defaultValue": "https://www.postaguvercini.com/api_http", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -319,11 +297,7 @@ "descriptionKey": "App.Sender.Sms.PostaGuvercini.Username.Description", "defaultValue": "2AIlj4QlCrvlbDDBS/712A==", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": true, "mainGroupKey": "App.Sender", @@ -339,11 +313,7 @@ "descriptionKey": "App.Sender.Sms.PostaGuvercini.Password.Description", "defaultValue": "oTuwyZM9sxfJI+jDH5wJAw==", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": true, "mainGroupKey": "App.Sender", @@ -359,11 +329,7 @@ "descriptionKey": "App.Sender.WhatsApp.Url.Description", "defaultValue": "https://graph.facebook.com/v21.0", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -379,11 +345,7 @@ "descriptionKey": "App.Sender.WhatsApp.PhoneNumberId.Description", "defaultValue": "442035112335974", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -399,11 +361,7 @@ "descriptionKey": "App.Sender.WhatsApp.Token.Description", "defaultValue": "EAANoftqZAJ64BO5oPwXPqniUtNGF70u8TKvQVzGZBaYQh5UY8fYrgQkcXP9UbQUqT9PWRah1L7TzcBIiWQMacT8AkmZB33AP1begLoywIZCsQSdBSUz21GQaCowfVosYgBoXSyqH8irSBPQDLIjxxVxrC2n76SD9X6zPXeHgOqIPY92DqJXplstWrlhtZCAZDZD", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -419,11 +377,7 @@ "descriptionKey": "App.Sender.WhatsApp.TemplateName.Description", "defaultValue": "kurs_platform_notification", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -439,10 +393,7 @@ "descriptionKey": "App.Sender.Rocket.Url.Description", "defaultValue": "https://chat.sozsoft.com/api/v1", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -458,10 +409,7 @@ "descriptionKey": "App.Sender.Rocket.UserId.Description", "defaultValue": "LfpzPjzag4QJXm84N", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -477,10 +425,7 @@ "descriptionKey": "App.Sender.Rocket.Token.Description", "defaultValue": "jvqALawvXn0Q7c6FfHJV3h58DCHDfQLgFF5y7oIc7oc", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "App.Sender", @@ -496,11 +441,7 @@ "descriptionKey": "Abp.Mailing.DefaultFromDisplayName.Description", "defaultValue": "Kurs", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -516,11 +457,7 @@ "descriptionKey": "Abp.Mailing.DefaultFromAddress.Description", "defaultValue": "system@sozsoft.com", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -536,11 +473,7 @@ "descriptionKey": "Abp.Mailing.Smtp.UserName.Description", "defaultValue": "system@sozsoft.com", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -556,11 +489,7 @@ "descriptionKey": "Abp.Mailing.Smtp.Password.Description", "defaultValue": "QT9L7BCl1CT/1Hq19HoSlQ==", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": true, "mainGroupKey": "Abp.Mailing", @@ -576,11 +505,7 @@ "descriptionKey": "Abp.Mailing.Smtp.Host.Description", "defaultValue": "127.0.0.1", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -596,11 +521,7 @@ "descriptionKey": "Abp.Mailing.Smtp.Port.Description", "defaultValue": "25", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -616,11 +537,7 @@ "descriptionKey": "Abp.Mailing.Smtp.Domain.Description", "defaultValue": "sozsoft.com", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -636,11 +553,7 @@ "descriptionKey": "Abp.Mailing.Smtp.EnableSsl.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -656,11 +569,7 @@ "descriptionKey": "Abp.Mailing.AWS.Profile.Description", "defaultValue": "mail-sdk-user", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -676,11 +585,7 @@ "descriptionKey": "Abp.Mailing.AWS.Region.Description", "defaultValue": "eu-central-1", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -696,11 +601,7 @@ "descriptionKey": "Abp.Mailing.AWS.AccessKey.Description", "defaultValue": "aXW8L21rP6dPO6Txj76Be2FCpWRBa25EMrSAVL76", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -716,11 +617,7 @@ "descriptionKey": "Abp.Mailing.AWS.AccessKeyId.Description", "defaultValue": "AKIATULUYBLX4IY3S2P1", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Mailing", @@ -736,10 +633,7 @@ "descriptionKey": "Abp.Account.IsSelfRegistrationEnabled.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -755,10 +649,7 @@ "descriptionKey": "Abp.Account.EnableLocalLogin.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -774,11 +665,7 @@ "descriptionKey": "Abp.Account.TwoFactor.Enabled.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -794,10 +681,7 @@ "descriptionKey": "Abp.Account.Captcha.MaxFailedAccessAttempts.Description", "defaultValue": "3", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -813,10 +697,7 @@ "descriptionKey": "Abp.Account.Captcha.EndPoint.Description", "defaultValue": "https://challenges.cloudflare.com/turnstile/v0/siteverify", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -832,10 +713,7 @@ "descriptionKey": "Abp.Account.Captcha.SiteKey.Description", "defaultValue": "0x4AAAAAAAGadwQME-GSYuJU", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -851,10 +729,7 @@ "descriptionKey": "Abp.Account.Captcha.SecretKey.Description", "defaultValue": "0x4AAAAAAAGad_f_WP47IcNBs9FTu5DhNX8", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Account", @@ -870,11 +745,7 @@ "descriptionKey": "Abp.Identity.Profile.General.RequireVerifiedAccount.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -890,11 +761,7 @@ "descriptionKey": "Abp.Identity.Profile.General.BlacklistedEmailProviders.Description", "defaultValue": "gmail.com\r\nyahoo.com\r\nhotmail.com", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -910,11 +777,7 @@ "descriptionKey": "Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -930,11 +793,7 @@ "descriptionKey": "Abp.Identity.Password.PasswordChangePeriodDays.Description", "defaultValue": "0", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -950,11 +809,7 @@ "descriptionKey": "Abp.Identity.Password.RequiredLength.Description", "defaultValue": "6", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -970,11 +825,7 @@ "descriptionKey": "Abp.Identity.Password.RequiredUniqueChars.Description", "defaultValue": "1", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -990,11 +841,7 @@ "descriptionKey": "Abp.Identity.Password.RequireNonAlphanumeric.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1010,11 +857,7 @@ "descriptionKey": "Abp.Identity.Password.RequireLowercase.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1030,11 +873,7 @@ "descriptionKey": "Abp.Identity.Password.RequireUppercase.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1050,11 +889,7 @@ "descriptionKey": "Abp.Identity.Password.RequireDigit.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1070,11 +905,7 @@ "descriptionKey": "Abp.Identity.Lockout.AllowedForNewUsers.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1090,11 +921,7 @@ "descriptionKey": "Abp.Identity.Lockout.LockoutDuration.Description", "defaultValue": "300", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1110,11 +937,7 @@ "descriptionKey": "Abp.Identity.Lockout.MaxFailedAccessAttempts.Description", "defaultValue": "5", "isVisibleToClients": false, - "providers": [ - "T", - "G", - "D" - ], + "providers": "T|G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1130,10 +953,7 @@ "descriptionKey": "Abp.Identity.SignIn.RequireConfirmedEmail.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1149,10 +969,7 @@ "descriptionKey": "Abp.Identity.SignIn.RequireConfirmedPhoneNumber.Description", "defaultValue": "False", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1168,10 +985,7 @@ "descriptionKey": "Abp.Identity.User.IsUserNameUpdateEnabled.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -1187,10 +1001,7 @@ "descriptionKey": "Abp.Identity.User.IsEmailUpdateEnabled.Description", "defaultValue": "True", "isVisibleToClients": false, - "providers": [ - "G", - "D" - ], + "providers": "G|D", "isInherited": false, "isEncrypted": false, "mainGroupKey": "Abp.Identity", @@ -2452,4 +2263,4 @@ "IsActive": false } ] -} \ No newline at end of file +} diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 9152b91b..a72c8f89 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -2066,7 +2066,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 2, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Type", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "Features", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 5, DataField = "Features", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea }, ] } }), diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index 12f217ad..8bf710f3 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -564,7 +564,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new() { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new() { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new() { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, ] } }), @@ -1650,7 +1650,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.SettingDefinitions, Width = 800, Height = 400 }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.SettingDefinitions, Width = 800, Height = 600 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -1659,18 +1659,18 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "MainGroupKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "NameKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "DescriptionKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 2, EditorType2=EditorTypes.dxTagBox }, + new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 11, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 12, DataField = "DataType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 13, DataField = "SelectOptions", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 13, DataField = "SelectOptions", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, ]} }), @@ -2026,6 +2026,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Settings.GlobalSearch), PagerOptionJson = DefaultPagerOptionJson, + DeleteCommand = $"DELETE FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.GlobalSearch))}\" WHERE \"Id\"=@Id", + DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Id", FieldDbType = DbType.Int32, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.GlobalSearch, Width = 500, Height = 350 }, @@ -2088,7 +2092,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Group", - Width = 200, + Width = 400, ListOrderNo = 3, Visible = true, IsActive = true, @@ -2103,7 +2107,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Term", - Width = 200, + Width = 400, ListOrderNo = 4, Visible = true, IsActive = true, @@ -2199,7 +2203,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 4, DataField = "IsEnabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, ] } }), @@ -2224,93 +2228,88 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ); #region Language Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { - ListFormCode = listFormLanguages.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - SortIndex = 0, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), - PivotSettingsJson = DefaultPivotSettingsJson - }, - new ListFormField - { - ListFormCode = listFormLanguages.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "CultureName", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), - PivotSettingsJson = DefaultPivotSettingsJson - }, - new ListFormField - { - ListFormCode = listFormLanguages.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "UiCultureName", - Width = 150, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), - PivotSettingsJson = DefaultPivotSettingsJson - }, - new ListFormField - { - ListFormCode = listFormLanguages.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DisplayName", - Width = 150, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), - PivotSettingsJson = DefaultPivotSettingsJson - }, - new ListFormField - { - ListFormCode = listFormLanguages.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsEnabled", - Width = 125, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), - PivotSettingsJson = DefaultPivotSettingsJson - }, - }); + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listFormLanguages.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormLanguages.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "CultureName", + Width = 250, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormLanguages.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "UiCultureName", + Width = 250, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormLanguages.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DisplayName", + Width = 250, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormLanguages.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsEnabled", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } @@ -2428,8 +2427,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ResourceName", - Width = 150, - ListOrderNo = 2, + Width = 200, + ListOrderNo = 3, Visible = true, IsActive = true, IsDeleted = false, @@ -2455,8 +2454,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Key", - Width = 350, - ListOrderNo = 3, + Width = 400, + ListOrderNo = 4, Visible = true, IsActive = true, IsDeleted = false, @@ -2478,8 +2477,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Value", - Width = 350, - ListOrderNo = 4, + Width = 400, + ListOrderNo = 5, Visible = true, IsActive = true, IsDeleted = false, @@ -2551,10 +2550,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency Items = [ new EditingFormItemDto { Order = 1, DataField = "Key", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox } ] } }), @@ -2562,6 +2561,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency { new FieldsDefaultValue { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new FieldsDefaultValue { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value } }) }); @@ -2668,6 +2670,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = LookupQueryValues.PermissionNameValues, + }), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), } @@ -2735,16 +2744,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - ] - } + new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -2854,7 +2862,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Icon", - Width = 100, + Width = 150, ListOrderNo = 6, Visible = true, IsActive = true, @@ -2908,7 +2916,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "RequiredPermissionName", - Width = 200, + Width = 400, ListOrderNo = 8, Visible = true, IsActive = true, @@ -3027,7 +3035,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency [ new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "DataSourceType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, ] } }), @@ -3110,6 +3118,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.DataSource), PivotSettingsJson = DefaultPivotSettingsJson @@ -3172,18 +3181,18 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 4, DataField = "ListFormType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "SelectCommandType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 6, DataField = "SelectCommand", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "TableName", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "TableName", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 8, DataField = "KeyFieldName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 9, DataField = "KeyFieldDbSourceType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 12, DataField = "SortMode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 13, DataField = "DeleteServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 13, DataField = "DeleteServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, ]}, new() { Order=2,ColCount=1,ColSpan=2,ItemType="group", Items= [ @@ -3706,7 +3715,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() { Title = AppCodes.Notifications.NotificationRules, Width = 800, Height = 500 }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Notifications.NotificationRules, Width = 800, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -3716,11 +3725,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ new EditingFormItemDto { Order = 1, DataField = "NotificationType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "RecipientType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "RecipientId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Channel", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 6, DataField = "IsFixed", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 3, DataField = "Channel", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "RecipientId", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 6, DataField = "IsFixed", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -4171,7 +4180,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() { Title = AppCodes.BackgroundWorkers, Width = 800, Height = 500 }, + Popup = new GridEditingPopupDto() { Title = AppCodes.BackgroundWorkers, Width = 800, Height = 650 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -4182,16 +4191,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Cron", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "WorkerType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "BeforeSp", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 4, DataField = "BeforeSp", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, ] }, new() { Order=2,ColCount=1,ColSpan=2,ItemType="group",Items= [ - new EditingFormItemDto { Order = 1, DataField = "Options:MailType", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Options:MailSubject", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Options:MailTemplate", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Options:MailType", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Options:MailSubject", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Options:MailTemplate", ColSpan = 2, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -4225,7 +4234,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", - Width = 200, + Width = 250, ListOrderNo = 2, Visible = true, IsActive = true, @@ -4259,7 +4268,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.Int32, FieldName = "WorkerType", - Width = 150, + Width = 250, ListOrderNo = 4, Visible = true, IsActive = true, @@ -4284,7 +4293,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "BeforeSp", - Width = 150, + Width = 250, ListOrderNo = 5, Visible = true, IsActive = true, @@ -4299,7 +4308,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "AfterSp", - Width = 150, + Width = 250, ListOrderNo = 6, Visible = true, IsActive = true, @@ -4314,7 +4323,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Options", - Width = 200, + Width = 500, ListOrderNo = 7, Visible = true, IsActive = true, @@ -4459,7 +4468,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", - Width = 150, + Width = 300, ListOrderNo = 2, Visible = true, IsActive = true, @@ -4478,7 +4487,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Category", - Width = 250, + Width = 500, ListOrderNo = 3, Visible = true, IsActive = true, @@ -4584,7 +4593,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Title", - Width = 150, + Width = 250, ListOrderNo = 2, Visible = true, IsActive = true, @@ -4603,7 +4612,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Abbreviation", - Width = 100, + Width = 300, ListOrderNo = 3, Visible = true, IsActive = true, @@ -4676,10 +4685,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency Items = [ new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox } + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox } ] } }), @@ -4712,7 +4721,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Code", - Width = 120, + Width = 150, ListOrderNo = 2, Visible = true, IsActive = true, @@ -4728,12 +4737,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Symbol", - Width = 100, + Width = 150, ListOrderNo = 3, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.Currency), }, @@ -4743,7 +4753,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", - Width = 200, + Width = 500, ListOrderNo = 4, Visible = true, IsActive = true, @@ -4958,12 +4968,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency [ new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 6, DataField = "TaxLabel", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "ZipRequired", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "StateRequired", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox } + new EditingFormItemDto { Order = 6, DataField = "TaxLabel", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "ZipRequired", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "StateRequired", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox } ] } }), @@ -5012,7 +5022,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", - Width = 200, + Width = 300, ListOrderNo = 3, Visible = true, IsActive = true, @@ -5028,7 +5038,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "GroupName", - Width = 150, + Width = 200, ListOrderNo = 4, Visible = true, IsActive = true, @@ -5050,7 +5060,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "CurrencyId", - Width = 100, + Width = 200, ListOrderNo = 5, Visible = true, IsActive = true, @@ -5334,7 +5344,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto { Title = AppCodes.Parameters.District, Width = 600, Height = 500 }, + Popup = new GridEditingPopupDto { Title = AppCodes.Parameters.District, Width = 500, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -5390,7 +5400,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Country", - Width = 120, + Width = 150, ListOrderNo = 2, Visible = true, IsActive = true, @@ -5414,7 +5424,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "City", - Width = 120, + Width = 200, ListOrderNo = 3, Visible = true, IsActive = true, @@ -5440,7 +5450,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", - Width = 200, + Width = 300, ListOrderNo = 4, Visible = true, IsActive = true, @@ -5456,7 +5466,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Township", - Width = 200, + Width = 300, ListOrderNo = 5, Visible = true, IsActive = true, diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.Designer.cs index 17706dd1..d17837a6 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251104061839_Initial")] + [Migration("20251104083431_Initial")] partial class Initial { /// @@ -1617,6 +1617,8 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); + b.HasIndex("BranchId"); + b.ToTable("Sas_T_BranchUsers", (string)null); }); @@ -1810,6 +1812,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("ClassTypeId"); b.ToTable("Crd_B_Class", (string)null); @@ -1930,6 +1934,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("RegistrationTypeId"); b.ToTable("Crd_B_ClassType", (string)null); @@ -4759,6 +4765,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_LessonPeriod", (string)null); }); @@ -4835,6 +4843,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("ClassTypeId"); b.ToTable("Crd_B_Level", (string)null); @@ -5712,6 +5722,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Net_B_Meal", (string)null); }); @@ -6056,7 +6068,7 @@ namespace Kurs.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("MobileNumber") + b.Property("MobileNumber") .HasColumnType("bigint"); b.Property("Name") @@ -6097,7 +6109,7 @@ namespace Kurs.Platform.Migrations .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); - b.Property("VknTckn") + b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") @@ -7604,6 +7616,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("RegistrationTypeId"); b.ToTable("Crd_B_RegistrationMethod", (string)null); @@ -7662,6 +7676,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_RegistrationType", (string)null); }); @@ -8228,6 +8244,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_Schedule", (string)null); }); @@ -12400,6 +12418,17 @@ namespace Kurs.Platform.Migrations b.Navigation("Category"); }); + modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("UserBranches") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => { b.HasOne("Kurs.Platform.Entities.Employee", "Employee") @@ -12428,23 +12457,37 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Class", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Classes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") .WithMany("Classes") .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("ClassType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("ClassTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") .WithMany("ClassTypes") .HasForeignKey("RegistrationTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("RegistrationType"); }); @@ -12679,14 +12722,31 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("LessonPeriods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Levels") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") .WithMany("Levels") .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("ClassType"); }); @@ -12739,6 +12799,16 @@ namespace Kurs.Platform.Migrations b.Navigation("ParentGroup"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Meals") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => { b.HasOne("Kurs.Platform.Entities.Order", "Order") @@ -12908,15 +12978,32 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationMethods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") .WithMany("Methods") .HasForeignKey("RegistrationTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("RegistrationType"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => { b.HasOne("Kurs.Platform.Entities.ReportTemplate", "ReportTemplate") @@ -12960,6 +13047,16 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Schedules") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => { b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule") @@ -13345,6 +13442,27 @@ namespace Kurs.Platform.Migrations b.Navigation("Posts"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Classes"); + + b.Navigation("LessonPeriods"); + + b.Navigation("Levels"); + + b.Navigation("Meals"); + + b.Navigation("RegistrationMethods"); + + b.Navigation("RegistrationTypes"); + + b.Navigation("Schedules"); + + b.Navigation("UserBranches"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.City", b => { b.Navigation("Districts"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.cs similarity index 98% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.cs index da52402b..0efb569b 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104061839_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104083431_Initial.cs @@ -708,7 +708,7 @@ namespace Kurs.Platform.Migrations IsActive = table.Column(type: "bit", nullable: false), OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VknTckn = table.Column(type: "bigint", nullable: false), + VknTckn = table.Column(type: "bigint", nullable: true), TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Address1 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), @@ -716,7 +716,7 @@ namespace Kurs.Platform.Migrations Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - MobileNumber = table.Column(type: "bigint", nullable: false), + MobileNumber = table.Column(type: "bigint", nullable: true), PhoneNumber = table.Column(type: "bigint", nullable: true), FaxNumber = table.Column(type: "bigint", nullable: true), Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -958,91 +958,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_Adm_T_WorkHour", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Crd_B_LessonPeriod", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Day = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Lesson1 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Lesson2 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Lesson3 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - Lesson4 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Crd_B_LessonPeriod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Crd_B_RegistrationType", - 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(50)", maxLength: 50, nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Crd_B_RegistrationType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Crd_B_Schedule", - 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), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - LessonMinute = table.Column(type: "int", nullable: false), - LessonBreakMinute = table.Column(type: "int", nullable: false), - LessonCount = table.Column(type: "int", nullable: false), - LunchTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - LunchMinute = table.Column(type: "int", nullable: true), - IncludeLunch = table.Column(type: "bit", nullable: true), - 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_Crd_B_Schedule", x => x.Id); - }); - migrationBuilder.CreateTable( name: "Crd_T_ClassCancellationReason", columns: table => new @@ -1337,30 +1252,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_Hr_T_Template360", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Net_B_Meal", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Date = table.Column(type: "datetime2", nullable: false), - Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - TotalCalorie = table.Column(type: "decimal(9,2)", precision: 9, scale: 2, nullable: false), - Materials = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Net_B_Meal", x => x.Id); - }); - migrationBuilder.CreateTable( name: "Net_T_EventCategory", columns: table => new @@ -2183,20 +2074,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_Sas_T_Branch", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Sas_T_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_Sas_T_BranchUsers", x => new { x.UserId, x.BranchId }); - }); - migrationBuilder.CreateTable( name: "Sas_T_CustomComponent", columns: table => new @@ -2897,99 +2774,6 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable( - name: "Crd_B_ClassType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - MinStudentCount = table.Column(type: "int", nullable: true), - MaxStudentCount = table.Column(type: "int", 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_Crd_B_ClassType", x => x.Id); - table.ForeignKey( - name: "FK_Crd_B_ClassType_Crd_B_RegistrationType_RegistrationTypeId", - column: x => x.RegistrationTypeId, - principalTable: "Crd_B_RegistrationType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Crd_B_RegistrationMethod", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Name = 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_Crd_B_RegistrationMethod", x => x.Id); - table.ForeignKey( - name: "FK_Crd_B_RegistrationMethod_Crd_B_RegistrationType_RegistrationTypeId", - column: x => x.RegistrationTypeId, - principalTable: "Crd_B_RegistrationType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Crd_B_ScheduleLesson", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - ScheduleId = table.Column(type: "uniqueidentifier", nullable: false), - Day = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - LessonNo = table.Column(type: "int", nullable: true), - StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), - LessonMinute = table.Column(type: "int", nullable: true), - LessonBreakMinute = table.Column(type: "int", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Crd_B_ScheduleLesson", x => x.Id); - table.ForeignKey( - name: "FK_Crd_B_ScheduleLesson_Crd_B_Schedule_ScheduleId", - column: x => x.ScheduleId, - principalTable: "Crd_B_Schedule", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "Crd_T_ClassroomAttandance", columns: table => new @@ -3507,6 +3291,159 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Crd_B_LessonPeriod", + 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(50)", maxLength: 50, nullable: false), + Day = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson1 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson2 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson3 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson4 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_B_LessonPeriod", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_LessonPeriod_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_RegistrationType", + 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(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_B_RegistrationType", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_RegistrationType_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_Schedule", + 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), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LessonMinute = table.Column(type: "int", nullable: false), + LessonBreakMinute = table.Column(type: "int", nullable: false), + LessonCount = table.Column(type: "int", nullable: false), + LunchTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LunchMinute = table.Column(type: "int", nullable: true), + IncludeLunch = table.Column(type: "bit", nullable: true), + 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_Crd_B_Schedule", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_Schedule_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Net_B_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), + Date = table.Column(type: "datetime2", nullable: false), + Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + TotalCalorie = table.Column(type: "decimal(9,2)", precision: 9, scale: 2, nullable: false), + Materials = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Net_B_Meal", x => x.Id); + table.ForeignKey( + name: "FK_Net_B_Meal_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_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_Sas_T_BranchUsers", x => new { x.UserId, x.BranchId }); + table.ForeignKey( + name: "FK_Sas_T_BranchUsers_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Sas_T_ApiEndpoint", columns: table => new @@ -3654,69 +3591,6 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Crd_B_Class", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - 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_Crd_B_Class", x => x.Id); - table.ForeignKey( - name: "FK_Crd_B_Class_Crd_B_ClassType_ClassTypeId", - column: x => x.ClassTypeId, - principalTable: "Crd_B_ClassType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Crd_B_Level", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), - LevelType = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Order = table.Column(type: "int", nullable: false), - LessonCount = table.Column(type: "int", nullable: false), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - LessonDuration = table.Column(type: "int", nullable: true), - MonthlyPaymentRate = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Crd_B_Level", x => x.Id); - table.ForeignKey( - name: "FK_Crd_B_Level_Crd_B_ClassType_ClassTypeId", - column: x => x.ClassTypeId, - principalTable: "Crd_B_ClassType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "Crd_T_QuestionOption", columns: table => new @@ -3935,6 +3809,111 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Crd_B_ClassType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + MinStudentCount = table.Column(type: "int", nullable: true), + MaxStudentCount = table.Column(type: "int", 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_Crd_B_ClassType", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_ClassType_Crd_B_RegistrationType_RegistrationTypeId", + column: x => x.RegistrationTypeId, + principalTable: "Crd_B_RegistrationType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Crd_B_ClassType_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_RegistrationMethod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = 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_Crd_B_RegistrationMethod", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_RegistrationMethod_Crd_B_RegistrationType_RegistrationTypeId", + column: x => x.RegistrationTypeId, + principalTable: "Crd_B_RegistrationType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Crd_B_RegistrationMethod_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_ScheduleLesson", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + ScheduleId = table.Column(type: "uniqueidentifier", nullable: false), + Day = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + LessonNo = table.Column(type: "int", nullable: true), + StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LessonMinute = table.Column(type: "int", nullable: true), + LessonBreakMinute = table.Column(type: "int", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_B_ScheduleLesson", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_ScheduleLesson_Crd_B_Schedule_ScheduleId", + column: x => x.ScheduleId, + principalTable: "Crd_B_Schedule", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "Sas_T_ReportGenerated", columns: table => new @@ -4026,6 +4005,81 @@ namespace Kurs.Platform.Migrations principalColumn: "Id"); }); + migrationBuilder.CreateTable( + name: "Crd_B_Class", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + 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_Crd_B_Class", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_Class_Crd_B_ClassType_ClassTypeId", + column: x => x.ClassTypeId, + principalTable: "Crd_B_ClassType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Crd_B_Class_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Crd_B_Level", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), + LevelType = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Order = table.Column(type: "int", nullable: false), + LessonCount = table.Column(type: "int", nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + LessonDuration = table.Column(type: "int", nullable: true), + MonthlyPaymentRate = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Crd_B_Level", x => x.Id); + table.ForeignKey( + name: "FK_Crd_B_Level_Crd_B_ClassType_ClassTypeId", + column: x => x.ClassTypeId, + principalTable: "Crd_B_ClassType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Crd_B_Level_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Adm_T_Partner", columns: table => new @@ -5412,26 +5466,61 @@ namespace Kurs.Platform.Migrations table: "Adm_T_Uom", column: "UomCategoryId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_B_Class_BranchId", + table: "Crd_B_Class", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_Class_ClassTypeId", table: "Crd_B_Class", column: "ClassTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_B_ClassType_BranchId", + table: "Crd_B_ClassType", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_ClassType_RegistrationTypeId", table: "Crd_B_ClassType", column: "RegistrationTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_B_LessonPeriod_BranchId", + table: "Crd_B_LessonPeriod", + column: "BranchId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_B_Level_BranchId", + table: "Crd_B_Level", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_Level_ClassTypeId", table: "Crd_B_Level", column: "ClassTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_B_RegistrationMethod_BranchId", + table: "Crd_B_RegistrationMethod", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_RegistrationMethod_RegistrationTypeId", table: "Crd_B_RegistrationMethod", column: "RegistrationTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Crd_B_RegistrationType_BranchId", + table: "Crd_B_RegistrationType", + column: "BranchId"); + + migrationBuilder.CreateIndex( + name: "IX_Crd_B_Schedule_BranchId", + table: "Crd_B_Schedule", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_ScheduleLesson_ScheduleId", table: "Crd_B_ScheduleLesson", @@ -5634,6 +5723,11 @@ namespace Kurs.Platform.Migrations table: "Hr_T_SurveyResponse", column: "SurveyId"); + migrationBuilder.CreateIndex( + name: "IX_Net_B_Meal_BranchId", + table: "Net_B_Meal", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Net_T_Announcement_EmployeeId", table: "Net_T_Announcement", @@ -5900,6 +5994,11 @@ namespace Kurs.Platform.Migrations table: "Sas_T_ApiMigration", column: "EntityId"); + migrationBuilder.CreateIndex( + name: "IX_Sas_T_BranchUsers_BranchId", + table: "Sas_T_BranchUsers", + column: "BranchId"); + migrationBuilder.CreateIndex( name: "IX_Sas_T_CustomEntityField_EntityId", table: "Sas_T_CustomEntityField", @@ -6296,9 +6395,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_ApiMigration"); - migrationBuilder.DropTable( - name: "Sas_T_Branch"); - migrationBuilder.DropTable( name: "Sas_T_BranchUsers"); @@ -6482,6 +6578,9 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_ReportCategory"); + migrationBuilder.DropTable( + name: "Sas_T_Branch"); + migrationBuilder.DropTable( name: "Sas_H_CountryGroup"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 9af2f406..5191bd66 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -1614,6 +1614,8 @@ namespace Kurs.Platform.Migrations b.HasKey("UserId", "BranchId"); + b.HasIndex("BranchId"); + b.ToTable("Sas_T_BranchUsers", (string)null); }); @@ -1807,6 +1809,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("ClassTypeId"); b.ToTable("Crd_B_Class", (string)null); @@ -1927,6 +1931,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("RegistrationTypeId"); b.ToTable("Crd_B_ClassType", (string)null); @@ -4756,6 +4762,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_LessonPeriod", (string)null); }); @@ -4832,6 +4840,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("ClassTypeId"); b.ToTable("Crd_B_Level", (string)null); @@ -5709,6 +5719,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Net_B_Meal", (string)null); }); @@ -6053,7 +6065,7 @@ namespace Kurs.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("MobileNumber") + b.Property("MobileNumber") .HasColumnType("bigint"); b.Property("Name") @@ -6094,7 +6106,7 @@ namespace Kurs.Platform.Migrations .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); - b.Property("VknTckn") + b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") @@ -7601,6 +7613,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.HasIndex("RegistrationTypeId"); b.ToTable("Crd_B_RegistrationMethod", (string)null); @@ -7659,6 +7673,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_RegistrationType", (string)null); }); @@ -8225,6 +8241,8 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); + b.HasIndex("BranchId"); + b.ToTable("Crd_B_Schedule", (string)null); }); @@ -12397,6 +12415,17 @@ namespace Kurs.Platform.Migrations b.Navigation("Category"); }); + modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("UserBranches") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => { b.HasOne("Kurs.Platform.Entities.Employee", "Employee") @@ -12425,23 +12454,37 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.Class", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Classes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") .WithMany("Classes") .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("ClassType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("ClassTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") .WithMany("ClassTypes") .HasForeignKey("RegistrationTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("RegistrationType"); }); @@ -12676,14 +12719,31 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("LessonPeriods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Levels") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") .WithMany("Levels") .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("ClassType"); }); @@ -12736,6 +12796,16 @@ namespace Kurs.Platform.Migrations b.Navigation("ParentGroup"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Meals") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => { b.HasOne("Kurs.Platform.Entities.Order", "Order") @@ -12905,15 +12975,32 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationMethods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") .WithMany("Methods") .HasForeignKey("RegistrationTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Branch"); + b.Navigation("RegistrationType"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => { b.HasOne("Kurs.Platform.Entities.ReportTemplate", "ReportTemplate") @@ -12957,6 +13044,16 @@ namespace Kurs.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Schedules") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => { b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule") @@ -13342,6 +13439,27 @@ namespace Kurs.Platform.Migrations b.Navigation("Posts"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Classes"); + + b.Navigation("LessonPeriods"); + + b.Navigation("Levels"); + + b.Navigation("Meals"); + + b.Navigation("RegistrationMethods"); + + b.Navigation("RegistrationTypes"); + + b.Navigation("Schedules"); + + b.Navigation("UserBranches"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.City", b => { b.Navigation("Districts");