diff --git a/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Saas.cs b/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Saas.cs index 8c2d4c5f..cdb05d04 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Saas.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Saas.cs @@ -6872,6 +6872,10 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency Description = $"{listFormName}.Description", SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomEndpoint)), + SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName), + SeedSyncInsert = false, + SeedSyncUpdate = false, + SeedSyncDelete = false, KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json index bccf6a89..96532159 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json @@ -33,35 +33,6 @@ "IsActive": true } ], - "CustomEndpoints": [ - { - "Name": "Langugage", - "Description": "https://localhost:44344/api/app/custom-endpoint/dil/en", - "Url": "/dil/", - "Method": "GET", - "DataSourceCode": "Default", - "Sql": "SELECT * FROM Sas_H_Language WHERE IsEnabled = @IsEnabled AND CultureName = @CultureName", - "ParametersJson": [ - { - "Type": "Path", - "Name": "CultureName", - "DefaultValue": "ar", - "Path": "/dil/:CultureName/" - }, - { - "Type": "Static", - "Name": "IsEnabled", - "DefaultValue": "true" - } - ], - "PermissionsJson": [ - { - "ResourceType": "User", - "ResourceId": "system@sozsoft.com" - } - ] - } - ], "Abouts": [ { "stats": [ diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs index c7887fdc..ba20463c 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs @@ -21,7 +21,6 @@ namespace Sozsoft.Platform.Data.Seeds; public class TenantSeederDto { //Saas - public List CustomEndpoints { get; set; } public List Sequences { get; set; } //Definitions @@ -269,18 +268,6 @@ public class ForumCategorySeedDto public bool IsActive { get; set; } } -public class CustomEndpointSeedDto -{ - public string Name { get; set; } - public string Description { get; set; } - public string Url { get; set; } - public string Method { get; set; } - public string DataSourceCode { get; set; } - public string Sql { get; set; } - public List ParametersJson { get; set; } - public List PermissionsJson { get; set; } -} - public class PaymentMethodSeedDto { public string Name { get; set; } @@ -420,7 +407,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency { private readonly ILookupNormalizer _lookupNormalizer; private readonly IRepository _branchRepository; - private readonly IRepository _customEndpointRepository; private readonly IRepository _reportCategoriesRepository; private readonly IRepository _reportTemplatesRepository; private readonly IRepository _homeRepository; @@ -465,7 +451,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository skillTypeRepository, IRepository skillRepository, IRepository skillLevelRepository, - IRepository customEndpointRepository, IRepository reportCategoriesRepository, IRepository reportTemplatesRepository, IRepository homeRepository, @@ -503,7 +488,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _skillTypeRepository = skillTypeRepository; _skillRepository = skillRepository; _skillLevelRepository = skillLevelRepository; - _customEndpointRepository = customEndpointRepository; _productRepository = productRepository; _paymentMethodRepository = paymentMethodRepository; _installmentOptionRepository = installmentOptionRepository; @@ -646,25 +630,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency } } - foreach (var item in items.CustomEndpoints) - { - var exists = await _customEndpointRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - await _customEndpointRepository.InsertAsync(new CustomEndpoint( - item.Name, - item.Description, - item.Url, - item.Method, - item.DataSourceCode, - item.Sql, - JsonSerializer.Serialize(item.ParametersJson), - JsonSerializer.Serialize(item.PermissionsJson) - )); - } - } - foreach (var item in items.PaymentMethods) { var exists = await _paymentMethodRepository.AnyAsync(x => x.Name == item.Name); diff --git a/configs/seeds/host/data/App.DeveloperKit.CustomEndpoints.json b/configs/seeds/host/data/App.DeveloperKit.CustomEndpoints.json new file mode 100644 index 00000000..8e275c4d --- /dev/null +++ b/configs/seeds/host/data/App.DeveloperKit.CustomEndpoints.json @@ -0,0 +1,18 @@ +{ + "ListFormCode": "App.DeveloperKit.CustomEndpoints", + "KeyFieldName": "Id", + "GeneratedAt": "2026-09-04T00:00:00Z", + "Rows": [ + { + "Id": "22cdbe14-f7dc-5771-8553-927ad017db9e", + "Name": "Langugage", + "Description": "https://localhost:44344/api/app/custom-endpoint/dil/en", + "Url": "/dil/", + "Method": "GET", + "DataSourceCode": "Default", + "Sql": "SELECT * FROM Sas_H_Language WHERE IsEnabled = @IsEnabled AND CultureName = @CultureName", + "ParametersJson": "[{\"Type\":\"Path\",\"Name\":\"CultureName\",\"DefaultValue\":\"ar\",\"Path\":\"/dil/:CultureName/\",\"IsRequired\":false},{\"Type\":\"Static\",\"Name\":\"IsEnabled\",\"DefaultValue\":\"true\",\"Path\":null,\"IsRequired\":false}]", + "PermissionsJson": "[{\"ResourceType\":\"User\",\"ResourceId\":\"system@sozsoft.com\"}]" + } + ] +}