Language, Menu ve Permission Data ayrıldı
This commit is contained in:
parent
cc2501efc9
commit
181930905e
8 changed files with 24942 additions and 24929 deletions
|
|
@ -1,13 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<UserSecretsId>467bbc0f-83d0-40d0-a9f2-230c8620bdad</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="appsettings.json" />
|
||||
<Content Include="appsettings.json">
|
||||
|
|
@ -62,8 +62,23 @@
|
|||
<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>
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
|
||||
|
|
@ -71,19 +86,19 @@
|
|||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="9.0.2" />
|
||||
<ProjectReference Include="..\Kurs.Platform.Application.Contracts\Kurs.Platform.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Kurs.Platform.EntityFrameworkCore\Kurs.Platform.EntityFrameworkCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Logs\**" />
|
||||
<Content Remove="Logs\**" />
|
||||
<EmbeddedResource Remove="Logs\**" />
|
||||
<None Remove="Logs\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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>();
|
||||
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
11315
api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json
Normal file
11315
api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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;
|
||||
|
|
@ -2414,7 +2525,7 @@ public class ListFormSeeder : IDataSeedContributor, ITransientDependency
|
|||
ChildFieldName = "SurveyId"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
new {
|
||||
TabTitle = "Responses",
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
|
|
@ -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"
|
||||
},
|
||||
}
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
|
|||
3165
api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json
Normal file
3165
api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json
Normal file
File diff suppressed because it is too large
Load diff
10322
api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json
Normal file
10322
api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue