Language, Menu ve Permission Data ayrıldı

This commit is contained in:
Sedat Öztürk 2025-10-27 22:26:19 +03:00
parent cc2501efc9
commit 181930905e
8 changed files with 24942 additions and 24929 deletions

View file

@ -62,6 +62,21 @@
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Remove="Seeds\LanguagesData.json" />
<Content Include="Seeds\LanguagesData.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Remove="Seeds\MenusData.json" />
<Content Include="Seeds\MenusData.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Remove="Seeds\PermissionsData.json" />
<Content Include="Seeds\PermissionsData.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>

File diff suppressed because it is too large Load diff

View file

@ -344,6 +344,9 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile(Path.Combine("Seeds", "HostData.json"))
.AddJsonFile(Path.Combine("Seeds", $"HostData.{Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT") ?? ""}.json"), true)
.AddJsonFile(Path.Combine("Seeds", "LanguagesData.json"))
.AddJsonFile(Path.Combine("Seeds", "MenusData.json"))
.AddJsonFile(Path.Combine("Seeds", "PermissionsData.json"))
.Build();
var items = configuration.Get<HostSeederDto>();

View file

@ -1,115 +0,0 @@
using System.Collections.Generic;
using Kurs.Languages.Entities;
using Kurs.Platform.Entities;
using Kurs.Settings.Entities;
namespace Kurs.Platform.Seeds;
public class HostSeederDto
{
public List<AiBotSeedDto> AiBots { get; set; }
public List<Language> Languages { get; set; }
public List<LanguageTextsSeedDto> LanguageTexts { get; set; }
public List<DataSource> DataSources { get; set; }
public List<SettingDefinition> Settings { get; set; }
public List<BackgroundWorkerSeedDto> BackgroundWorkers { get; set; }
public List<NotificationRuleSeedDto> NotificationRules { get; set; }
public List<MenuSeedDto> Menus { get; set; }
public List<PermissionGroupDefinitionRecordSeedDto> PermissionGroupDefinitionRecords { get; set; }
public List<PermissionDefinitionRecordSeedDto> PermissionDefinitionRecords { get; set; }
public List<CurrencySeedDto> Currencies { get; set; }
public List<ContactTagSeedDto> ContactTags { get; set; }
public List<ContactTitleSeedDto> ContactTitles { get; set; }
public List<RouteSeedDto> Routes { get; set; }
}
public class AiBotSeedDto
{
public string BotName { get; set; }
}
public class LanguageTextsSeedDto
{
public string ResourceName { get; set; }
public string Key { get; set; }
public string En { get; set; }
public string Tr { get; set; }
}
public class BackgroundWorkerSeedDto
{
public string Name { get; set; }
public string Cron { get; set; }
public string WorkerType { get; set; }
public bool IsActive { get; set; }
public string DataSourceCode { get; set; }
}
public class NotificationRuleSeedDto
{
public string NotificationType { get; set; }
public string RecipientType { get; set; }
public string RecipientId { get; set; }
public string Channel { get; set; }
public bool IsActive { get; set; }
public bool IsFixed { get; set; }
public bool IsCustomized { get; set; }
}
public class MenuSeedDto
{
public string ParentCode { get; set; }
public string Code { get; set; }
public string DisplayName { get; set; }
public int Order { get; set; }
public string Url { get; set; }
public string Icon { get; set; }
public string RequiredPermissionName { get; set; }
public bool IsDisabled { get; set; }
}
public class PermissionGroupDefinitionRecordSeedDto
{
public string Name { get; set; }
public string DisplayName { get; set; }
}
public class PermissionDefinitionRecordSeedDto
{
public string GroupName { get; set; }
public string Name { get; set; }
public string ParentName { get; set; }
public string DisplayName { get; set; }
public bool IsEnabled { get; set; }
public int MultiTenancySide { get; set; }
public string MenuGroup { get; set; }
}
public class CurrencySeedDto
{
public string Code { get; set; }
public string Symbol { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
}
public class ContactTagSeedDto
{
public string Name { get; set; }
public string Category { get; set; }
}
public class ContactTitleSeedDto
{
public string Title { get; set; }
public string Abbreviation { get; set; }
}
public class RouteSeedDto
{
public string Key { get; set; }
public string Path { get; set; }
public string ComponentPath { get; set; }
public string RouteType { get; set; }
public string[] Authority { get; set; }
}

File diff suppressed because it is too large Load diff

View file

@ -18,9 +18,120 @@ using Volo.Abp.TenantManagement;
using static Kurs.Platform.PlatformConsts;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using Kurs.Languages.Entities;
using Kurs.Settings.Entities;
namespace Kurs.Platform.Data.Seeds;
public class AiBotSeedDto
{
public string BotName { get; set; }
}
public class LanguageTextsSeedDto
{
public string ResourceName { get; set; }
public string Key { get; set; }
public string En { get; set; }
public string Tr { get; set; }
}
public class BackgroundWorkerSeedDto
{
public string Name { get; set; }
public string Cron { get; set; }
public string WorkerType { get; set; }
public bool IsActive { get; set; }
public string DataSourceCode { get; set; }
}
public class NotificationRuleSeedDto
{
public string NotificationType { get; set; }
public string RecipientType { get; set; }
public string RecipientId { get; set; }
public string Channel { get; set; }
public bool IsActive { get; set; }
public bool IsFixed { get; set; }
public bool IsCustomized { get; set; }
}
public class MenuSeedDto
{
public string ParentCode { get; set; }
public string Code { get; set; }
public string DisplayName { get; set; }
public int Order { get; set; }
public string Url { get; set; }
public string Icon { get; set; }
public string RequiredPermissionName { get; set; }
public bool IsDisabled { get; set; }
}
public class PermissionGroupDefinitionRecordSeedDto
{
public string Name { get; set; }
public string DisplayName { get; set; }
}
public class PermissionDefinitionRecordSeedDto
{
public string GroupName { get; set; }
public string Name { get; set; }
public string ParentName { get; set; }
public string DisplayName { get; set; }
public bool IsEnabled { get; set; }
public int MultiTenancySide { get; set; }
public string MenuGroup { get; set; }
}
public class CurrencySeedDto
{
public string Code { get; set; }
public string Symbol { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
}
public class ContactTagSeedDto
{
public string Name { get; set; }
public string Category { get; set; }
}
public class ContactTitleSeedDto
{
public string Title { get; set; }
public string Abbreviation { get; set; }
}
public class RouteSeedDto
{
public string Key { get; set; }
public string Path { get; set; }
public string ComponentPath { get; set; }
public string RouteType { get; set; }
public string[] Authority { get; set; }
}
public class HostSeederDto
{
public List<AiBotSeedDto> AiBots { get; set; }
public List<Language> Languages { get; set; }
public List<LanguageTextsSeedDto> LanguageTexts { get; set; }
public List<DataSource> DataSources { get; set; }
public List<SettingDefinition> Settings { get; set; }
public List<BackgroundWorkerSeedDto> BackgroundWorkers { get; set; }
public List<NotificationRuleSeedDto> NotificationRules { get; set; }
public List<MenuSeedDto> Menus { get; set; }
public List<PermissionGroupDefinitionRecordSeedDto> PermissionGroupDefinitionRecords { get; set; }
public List<PermissionDefinitionRecordSeedDto> PermissionDefinitionRecords { get; set; }
public List<CurrencySeedDto> Currencies { get; set; }
public List<ContactTagSeedDto> ContactTags { get; set; }
public List<ContactTitleSeedDto> ContactTitles { get; set; }
public List<RouteSeedDto> Routes { get; set; }
}
public class ListFormSeeder : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
@ -41979,19 +42090,12 @@ public class ListFormSeeder : IDataSeedContributor, ITransientDependency
}),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Questions",
Text ="Questions",
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = AppCodes.Hr.Survey + ".Update",
Url="/admin/form/form-survey/@Id"
},
new() {
Hint = "Responses",
Text ="Responses",
UrlTarget="_blank",
AuthName = AppCodes.Hr.Survey + ".Update",
Url="/admin/form/form-survey/@Id"
},
}
}),
}
);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff