Tablo yapısı ve Menü
This commit is contained in:
parent
156050b9f2
commit
7a4628b899
17 changed files with 851 additions and 889 deletions
|
|
@ -1357,6 +1357,507 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Route
|
||||
listFormName = AppCodes.Routes;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Route)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new() {
|
||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 1, EditorType2 = EditorTypes.dxAutocomplete }
|
||||
]
|
||||
}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
});
|
||||
|
||||
#region Route Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Key",
|
||||
CaptionName = "App.Listform.ListformField.Key",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Path",
|
||||
CaptionName = "App.Listform.ListformField.Path",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ComponentPath",
|
||||
CaptionName = "App.Listform.ListformField.ComponentPath",
|
||||
Width = 300,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "RouteType",
|
||||
CaptionName = "App.Listform.ListformField.RouteType",
|
||||
Width = 120,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="public",Name="Public" },
|
||||
new () { Key="protected",Name="Protected" },
|
||||
new () { Key="authenticated",Name="Authenticated" },
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Authority",
|
||||
CaptionName = "App.Listform.ListformField.Authority",
|
||||
Width = 120,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
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(listForm.Name),
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Menu
|
||||
listFormName = AppCodes.Menus.Menu;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson("tree"),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)),
|
||||
KeyFieldName = "Code",
|
||||
KeyFieldDbSourceType = DbType.String,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true),
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 450, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "DisplayName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 1, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "ShortName", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
]}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
#region Menu Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
CaptionName = "App.Listform.ListformField.Code",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "DisplayName",
|
||||
CaptionName = "App.Listform.ListformField.DisplayName",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.LanguageKeyValues
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "Order",
|
||||
CaptionName = "App.Listform.ListformField.Order",
|
||||
Width = 50,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Url",
|
||||
CaptionName = "App.Listform.ListformField.Path",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.RouteKeyValues
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Icon",
|
||||
CaptionName = "App.Listform.ListformField.Icon",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ParentCode",
|
||||
CaptionName = "App.Listform.ListformField.ParentCode",
|
||||
Width = 200,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.MenuCodeValues
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CssClass",
|
||||
CaptionName = "App.Listform.ListformField.CssClass",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "RequiredPermissionName",
|
||||
CaptionName = "App.Listform.ListformField.RequiredPermissionName",
|
||||
Width = 400,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
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(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Target",
|
||||
CaptionName = "App.Listform.ListformField.Target",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsDisabled",
|
||||
CaptionName = "App.Listform.ListformField.IsDisabled",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ElementId",
|
||||
CaptionName = "App.Listform.ListformField.ElementId",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ShortName",
|
||||
CaptionName = "App.Listform.ListformField.ShortName",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Custom Endpoint
|
||||
listFormName = AppCodes.DeveloperKits.CustomEndpoints;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
|
|
@ -1714,6 +2215,203 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region ReportTemplates
|
||||
listFormName = AppCodes.Reports.ReportTemplates;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportTemplate)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ReportTemplate)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 500, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField = "CategoryId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "HtmlContent", ColSpan = 1, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
]}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "View",
|
||||
Text ="View",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/reports/TemplateReport/view?id=@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Design",
|
||||
Text ="Design",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName + ".Update",
|
||||
Url=$"/admin/reports/TemplateReport/design?id=@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region ReportTemplates Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(
|
||||
[
|
||||
// Id
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
// String alanlar
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 250,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "CategoryId",
|
||||
CaptionName = "App.Listform.ListformField.CategoryId",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReportCategory), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true })
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Status",
|
||||
CaptionName = "App.Listform.ListformField.Status",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="Aktif", Name="Aktif" },
|
||||
new () { Key="Pasif", Name="Pasif" },
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true })
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "HtmlContent",
|
||||
CaptionName = "App.Listform.ListformField.HtmlContent",
|
||||
Width = 250,
|
||||
ListOrderNo = 6,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region About Us
|
||||
listFormName = AppCodes.About;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
|
|
@ -5070,202 +5768,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region ReportTemplates
|
||||
listFormName = AppCodes.Reports.ReportTemplates;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportTemplate)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ReportTemplate)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 500, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField = "CategoryId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "HtmlContent", ColSpan = 1, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
]}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "View",
|
||||
Text ="View",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/reports/TemplateReport/view?id=@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Design",
|
||||
Text ="Design",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName + ".Update",
|
||||
Url=$"/admin/reports/TemplateReport/design?id=@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region ReportTemplates Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(
|
||||
[
|
||||
// Id
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
// String alanlar
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 250,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "CategoryId",
|
||||
CaptionName = "App.Listform.ListformField.CategoryId",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReportCategory), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true })
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Status",
|
||||
CaptionName = "App.Listform.ListformField.Status",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="Aktif", Name="Aktif" },
|
||||
new () { Key="Pasif", Name="Pasif" },
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true })
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "HtmlContent",
|
||||
CaptionName = "App.Listform.ListformField.HtmlContent",
|
||||
Width = 250,
|
||||
ListOrderNo = 6,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2046,507 +2046,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Route
|
||||
listFormName = AppCodes.Routes;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Route)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
|
||||
{
|
||||
new() {
|
||||
Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 1, EditorType2 = EditorTypes.dxAutocomplete }
|
||||
]
|
||||
}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
});
|
||||
|
||||
#region Route Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Key",
|
||||
CaptionName = "App.Listform.ListformField.Key",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Path",
|
||||
CaptionName = "App.Listform.ListformField.Path",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ComponentPath",
|
||||
CaptionName = "App.Listform.ListformField.ComponentPath",
|
||||
Width = 300,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "RouteType",
|
||||
CaptionName = "App.Listform.ListformField.RouteType",
|
||||
Width = 120,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="public",Name="Public" },
|
||||
new () { Key="protected",Name="Protected" },
|
||||
new () { Key="authenticated",Name="Authenticated" },
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Authority",
|
||||
CaptionName = "App.Listform.ListformField.Authority",
|
||||
Width = 120,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
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(listForm.Name),
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Menu
|
||||
listFormName = AppCodes.Menus.Menu;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
PageSize = 10,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson("tree"),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)),
|
||||
KeyFieldName = "Code",
|
||||
KeyFieldDbSourceType = DbType.String,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson(),
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true),
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 450, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "DisplayName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 1, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "ShortName", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
]}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
#region Menu Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Id",
|
||||
CaptionName = "App.Listform.ListformField.Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
CaptionName = "App.Listform.ListformField.Code",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "DisplayName",
|
||||
CaptionName = "App.Listform.ListformField.DisplayName",
|
||||
Width = 300,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.LanguageKeyValues
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "Order",
|
||||
CaptionName = "App.Listform.ListformField.Order",
|
||||
Width = 50,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Url",
|
||||
CaptionName = "App.Listform.ListformField.Path",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.RouteKeyValues
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Icon",
|
||||
CaptionName = "App.Listform.ListformField.Icon",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ParentCode",
|
||||
CaptionName = "App.Listform.ListformField.ParentCode",
|
||||
Width = 200,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.MenuCodeValues
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CssClass",
|
||||
CaptionName = "App.Listform.ListformField.CssClass",
|
||||
Width = 100,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "RequiredPermissionName",
|
||||
CaptionName = "App.Listform.ListformField.RequiredPermissionName",
|
||||
Width = 400,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
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(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Target",
|
||||
CaptionName = "App.Listform.ListformField.Target",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsDisabled",
|
||||
CaptionName = "App.Listform.ListformField.IsDisabled",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ElementId",
|
||||
CaptionName = "App.Listform.ListformField.ElementId",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ShortName",
|
||||
CaptionName = "App.Listform.ListformField.ShortName",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Data Source
|
||||
listFormName = AppCodes.Listforms.DataSource;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
|
|
|
|||
|
|
@ -152,18 +152,14 @@
|
|||
"path": "/admin/menuManager",
|
||||
"componentPath": "@/views/menu/MenuManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Menus.Manager"
|
||||
]
|
||||
"authority": ["App.Menus.Manager"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.wizard",
|
||||
"path": "/admin/listform/wizard",
|
||||
"componentPath": "@/views/admin/listForm/Wizard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Listforms.Wizard"
|
||||
]
|
||||
"authority": ["App.Listforms.Wizard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.edit",
|
||||
|
|
@ -177,18 +173,14 @@
|
|||
"path": "/admin/forumManagement",
|
||||
"componentPath": "@/views/forum/Management",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement"
|
||||
]
|
||||
"authority": ["App.ForumManagement"]
|
||||
},
|
||||
{
|
||||
"key": "admin.ai",
|
||||
"path": "/admin/ai",
|
||||
"componentPath": "@/views/ai/Assistant",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.Ai"
|
||||
]
|
||||
"authority": ["Abp.Identity.Ai"]
|
||||
},
|
||||
{
|
||||
"key": "admin.profile.general",
|
||||
|
|
@ -230,36 +222,28 @@
|
|||
"path": "/admin/settings",
|
||||
"componentPath": "@/views/settings/Settings",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Setting"
|
||||
]
|
||||
"authority": ["App.Setting"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.user.detail",
|
||||
"path": "/admin/users/detail/:userId",
|
||||
"componentPath": "@/views/admin/user-management/Details",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"AbpIdentity.Users.Update"
|
||||
]
|
||||
"authority": ["AbpIdentity.Users.Update"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.ous",
|
||||
"path": "/admin/ous",
|
||||
"componentPath": "@/views/admin/organization-unit/OrganizationUnits",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.OrganizationUnits"
|
||||
]
|
||||
"authority": ["Abp.Identity.OrganizationUnits"]
|
||||
},
|
||||
{
|
||||
"key": "admin.forum",
|
||||
"path": "/admin/forum",
|
||||
"componentPath": "@/views/forum/Forum",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement.Publish"
|
||||
]
|
||||
"authority": ["App.ForumManagement.Publish"]
|
||||
},
|
||||
{
|
||||
"key": "admin.list",
|
||||
|
|
@ -301,207 +285,161 @@
|
|||
"path": "/admin/sqlQueryManager",
|
||||
"componentPath": "@/views/sqlQueryManager/SqlQueryManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.SqlQueryManager"
|
||||
]
|
||||
"authority": ["App.SqlQueryManager"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit",
|
||||
"path": "/admin/developerkit",
|
||||
"componentPath": "@/views/developerKit/DashboardPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit"
|
||||
]
|
||||
"authority": ["App.DeveloperKit"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities",
|
||||
"path": "/admin/developerkit/entities",
|
||||
"componentPath": "@/views/developerKit/EntityPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.new",
|
||||
"path": "/admin/developerkit/entities/new",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.edit",
|
||||
"path": "/admin/developerkit/entities/edit/:id",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.migrations",
|
||||
"path": "/admin/developerkit/migrations",
|
||||
"componentPath": "@/views/developerKit/MigrationPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Migrations"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Migrations"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.endpoints",
|
||||
"path": "/admin/developerkit/endpoints",
|
||||
"componentPath": "@/views/developerKit/CrudEndpointPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.CrudEndpoints"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.CrudEndpoints"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.dynamic-services",
|
||||
"path": "/admin/developerkit/dynamic-services",
|
||||
"componentPath": "@/views/developerKit/DynamicServicePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.DynamicServices"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.DynamicServices"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components",
|
||||
"path": "/admin/developerkit/components",
|
||||
"componentPath": "@/views/developerKit/ComponentPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.new",
|
||||
"path": "/admin/developerkit/components/new",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.view",
|
||||
"path": "/admin/developerkit/components/view/:id",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.edit",
|
||||
"path": "/admin/developerkit/components/edit/:id",
|
||||
"componentPath": "@/views/developerKit/CodePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.fileManagement",
|
||||
"path": "/admin/files",
|
||||
"componentPath": "@/views/admin/files/FileManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Files"
|
||||
]
|
||||
"authority": ["App.Files"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.dashboard",
|
||||
"path": "/admin/coordinator/classroom/dashboard",
|
||||
"componentPath": "@/views/coordinator/Classroom/Dashboard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Dashboard"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Dashboard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classes",
|
||||
"path": "/admin/coordinator/classroom/classes",
|
||||
"componentPath": "@/views/coordinator/Classroom/ClassList",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.List"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.List"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classroom",
|
||||
"path": "/admin/coordinator/classroom/room/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/RoomDetail",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.RoomDetail"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.RoomDetail"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.planning",
|
||||
"path": "/admin/coordinator/classroom/planning/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/PlanningPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Planning"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Planning"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.exams",
|
||||
"path": "/admin/coordinator/exams",
|
||||
"componentPath": "@/views/coordinator/Exams",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.examDetail",
|
||||
"path": "/admin/coordinator/exam/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignments",
|
||||
"path": "/admin/coordinator/assignments",
|
||||
"componentPath": "@/views/coordinator/Assignments",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignmentDetail",
|
||||
"path": "/admin/coordinator/assignment/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.tests",
|
||||
"path": "/admin/coordinator/tests",
|
||||
"componentPath": "@/views/coordinator/Tests",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.testDetail",
|
||||
"path": "/admin/coordinator/test/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/PDFTestInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.devexpressReportView",
|
||||
|
|
@ -631,46 +569,6 @@
|
|||
"RequiredPermissionName": "App.Languages.LanguageText",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Routes",
|
||||
"DisplayName": "App.Routes",
|
||||
"Order": 6,
|
||||
"Url": "/admin/list/App.Routes",
|
||||
"Icon": "FaSynagogue",
|
||||
"RequiredPermissionName": "App.Routes",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Menus",
|
||||
"DisplayName": "App.Menus",
|
||||
"Order": 7,
|
||||
"Url": null,
|
||||
"Icon": "FaSchlix",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Menus",
|
||||
"Code": "App.Menus.Menu",
|
||||
"DisplayName": "App.Menus.Menu",
|
||||
"Order": 1,
|
||||
"Url": "/admin/list/App.Menus.Menu",
|
||||
"Icon": "FcMenu",
|
||||
"RequiredPermissionName": "App.Menus.Menu",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Menus",
|
||||
"Code": "App.Menus.Manager",
|
||||
"DisplayName": "App.Menus.Manager",
|
||||
"Order": 2,
|
||||
"Url": "/admin/menuManager",
|
||||
"Icon": "FaRegListAlt",
|
||||
"RequiredPermissionName": "App.Menus.Manager",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Listforms",
|
||||
|
|
@ -1102,11 +1000,51 @@
|
|||
"RequiredPermissionName": "App.Contact",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Routes",
|
||||
"DisplayName": "App.Routes",
|
||||
"Order": 7,
|
||||
"Url": "/admin/list/App.Routes",
|
||||
"Icon": "FaSynagogue",
|
||||
"RequiredPermissionName": "App.Routes",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Menus",
|
||||
"DisplayName": "App.Menus",
|
||||
"Order": 8,
|
||||
"Url": null,
|
||||
"Icon": "FaSchlix",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Menus",
|
||||
"Code": "App.Menus.Menu",
|
||||
"DisplayName": "App.Menus.Menu",
|
||||
"Order": 1,
|
||||
"Url": "/admin/list/App.Menus.Menu",
|
||||
"Icon": "FcMenu",
|
||||
"RequiredPermissionName": "App.Menus.Menu",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Menus",
|
||||
"Code": "App.Menus.Manager",
|
||||
"DisplayName": "App.Menus.Manager",
|
||||
"Order": 2,
|
||||
"Url": "/admin/menuManager",
|
||||
"Icon": "FaRegListAlt",
|
||||
"RequiredPermissionName": "App.Menus.Manager",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Files",
|
||||
"DisplayName": "App.Files",
|
||||
"Order": 7,
|
||||
"Order": 9,
|
||||
"Url": "/admin/files",
|
||||
"Icon": "FcFolder",
|
||||
"RequiredPermissionName": "App.Files",
|
||||
|
|
@ -1116,7 +1054,7 @@
|
|||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Reports.Management",
|
||||
"DisplayName": "App.Reports.Management",
|
||||
"Order": 8,
|
||||
"Order": 10,
|
||||
"Url": null,
|
||||
"Icon": "FcDocument",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -1146,7 +1084,7 @@
|
|||
"ParentCode": "App.Administration",
|
||||
"Code": "App.DeveloperKit",
|
||||
"DisplayName": "App.DeveloperKit",
|
||||
"Order": 9,
|
||||
"Order": 11,
|
||||
"Url": null,
|
||||
"Icon": "FcAndroidOs",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -1226,11 +1164,11 @@
|
|||
"ParentCode": "App.Administration",
|
||||
"Code": "App.SqlQueryManager",
|
||||
"DisplayName": "App.SqlQueryManager",
|
||||
"Order": 10,
|
||||
"Order": 13,
|
||||
"Url": "/admin/sqlQueryManager",
|
||||
"Icon": "FaDatabase",
|
||||
"RequiredPermissionName": "App.SqlQueryManager",
|
||||
"IsDisabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ public enum TableNameEnum
|
|||
SettingDefinition,
|
||||
Notification,
|
||||
NotificationRule,
|
||||
BackgroundWorker,
|
||||
BackgroundWorker_MailQueue,
|
||||
BackgroundWorker_MailQueueEvents,
|
||||
BackgroundWorker_MailQueueTableFormat,
|
||||
|
|
@ -25,16 +26,16 @@ public enum TableNameEnum
|
|||
ListFormImport,
|
||||
ListFormImportExecute,
|
||||
Note,
|
||||
BackgroundWorker,
|
||||
ForumCategory,
|
||||
ForumTopic,
|
||||
ForumPost,
|
||||
CrudEndpoint,
|
||||
CrudMigration,
|
||||
CustomEntity,
|
||||
CustomEntityField,
|
||||
ApiMigration,
|
||||
CrudEndpoint,
|
||||
CustomEndpoint,
|
||||
CustomComponent,
|
||||
DynamicService,
|
||||
ReportCategory,
|
||||
ReportTemplate,
|
||||
IpRestriction,
|
||||
|
|
@ -62,5 +63,4 @@ public enum TableNameEnum
|
|||
BlogPost,
|
||||
Demo,
|
||||
Contact,
|
||||
DynamicService,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public static class TableNameResolver
|
|||
_map = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
// 🔹 MODULE TABLOLARI
|
||||
{ nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.LogEntry), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.Language), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.LanguageKey), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
|
|
@ -19,21 +20,19 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.SettingDefinition), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.Notification), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.NotificationRule), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.BackgroundWorker_MailQueue), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
|
||||
// 🔹 PLATFORM TABLOLARI
|
||||
{ nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Menu), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.DataSource), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ListForm), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ListFormField), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ListFormCustomization), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ListFormImport), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ListFormImportExecute), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ContactTitle), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Currency), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CountryGroup), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
|
|
@ -45,13 +44,15 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
|
||||
// 🔹 TENANT TABLOLARI (GENEL)
|
||||
{ nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Menu), (TablePrefix.PlatformByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Note), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Branch), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.BranchUsers), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.GlobalSearch), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomEntity), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomEntityField), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ApiMigration), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CrudMigration), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CrudEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomComponent), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
|
|
@ -59,7 +60,6 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
|
||||
// 🔹 ADMINISTRATION
|
||||
{ nameof(TableNameEnum.SkillType), (TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
|
|
|
|||
|
|
@ -14,6 +14,5 @@ public class BackgroundWorker : FullAuditedEntity<Guid>
|
|||
public string BeforeSp { get; set; }
|
||||
public string AfterSp { get; set; }
|
||||
public string Options { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Platform.Entities;
|
||||
|
||||
public class Menu : FullAuditedEntity<Guid>
|
||||
public class Menu : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public int Order { get; set; }
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Platform.Entities;
|
||||
|
||||
public class Route : FullAuditedEntity<Guid>
|
||||
public class Route : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Key { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string ComponentPath { get; set; }
|
||||
|
|
@ -550,7 +550,7 @@ public class PlatformDbContext :
|
|||
|
||||
builder.Entity<CrudMigration>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ApiMigration)), Prefix.DbSchema);
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CrudMigration)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.HasKey(x => x.Id);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Sozsoft.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20260224203357_Initial")]
|
||||
[Migration("20260225082054_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -1477,7 +1477,7 @@ namespace Sozsoft.Platform.Migrations
|
|||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.ToTable("Sas_T_ApiMigration", (string)null);
|
||||
b.ToTable("Sas_T_CrudMigration", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Currency", b =>
|
||||
|
|
@ -3102,6 +3102,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
|
@ -3701,6 +3705,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Key")
|
||||
|
|
@ -1221,6 +1221,7 @@ namespace Sozsoft.Platform.Migrations
|
|||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Order = table.Column<int>(type: "int", nullable: false),
|
||||
|
|
@ -1254,6 +1255,7 @@ namespace Sozsoft.Platform.Migrations
|
|||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Key = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
Path = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
ComponentPath = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
|
|
@ -2374,35 +2376,6 @@ namespace Sozsoft.Platform.Migrations
|
|||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_ApiMigration",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
EntityName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
FileName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
SqlScript = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
AppliedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ErrorMessage = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Sas_T_ApiMigration", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Sas_T_ApiMigration_Sas_T_CustomEntity_EntityId",
|
||||
column: x => x.EntityId,
|
||||
principalTable: "Sas_T_CustomEntity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_CrudEndpoint",
|
||||
columns: table => new
|
||||
|
|
@ -2435,6 +2408,35 @@ namespace Sozsoft.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_CrudMigration",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
EntityName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
FileName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
SqlScript = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
AppliedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ErrorMessage = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Sas_T_CrudMigration", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Sas_T_CrudMigration_Sas_T_CustomEntity_EntityId",
|
||||
column: x => x.EntityId,
|
||||
principalTable: "Sas_T_CustomEntity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_CustomEntityField",
|
||||
columns: table => new
|
||||
|
|
@ -3136,11 +3138,6 @@ namespace Sozsoft.Platform.Migrations
|
|||
column: "Key",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Sas_T_ApiMigration_EntityId",
|
||||
table: "Sas_T_ApiMigration",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Sas_T_BranchUsers_BranchId",
|
||||
table: "Sas_T_BranchUsers",
|
||||
|
|
@ -3151,6 +3148,11 @@ namespace Sozsoft.Platform.Migrations
|
|||
table: "Sas_T_CrudEndpoint",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Sas_T_CrudMigration_EntityId",
|
||||
table: "Sas_T_CrudMigration",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Sas_T_CustomEntityField_EntityId",
|
||||
table: "Sas_T_CustomEntityField",
|
||||
|
|
@ -3418,15 +3420,15 @@ namespace Sozsoft.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_H_Route");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_ApiMigration");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_BranchUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_CrudEndpoint");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_CrudMigration");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_CustomComponent");
|
||||
|
||||
|
|
@ -1474,7 +1474,7 @@ namespace Sozsoft.Platform.Migrations
|
|||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.ToTable("Sas_T_ApiMigration", (string)null);
|
||||
b.ToTable("Sas_T_CrudMigration", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Sozsoft.Platform.Entities.Currency", b =>
|
||||
|
|
@ -3099,6 +3099,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
|
@ -3698,6 +3702,10 @@ namespace Sozsoft.Platform.Migrations
|
|||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Key")
|
||||
|
|
|
|||
Loading…
Reference in a new issue