ListForm_Administration Seeder

This commit is contained in:
Sedat ÖZTÜRK 2025-11-04 16:14:40 +03:00
parent 5dc927cbbe
commit 455fca806e
5 changed files with 98 additions and 60 deletions

View file

@ -1072,11 +1072,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] ValidationRuleJson = DefaultValidationRuleEmailRequiredJson,
{
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) },
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
@ -3435,7 +3431,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{ {
Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogPosts, Width = 1000, Height = 600 }, Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogPosts, Width = 1000, Height = 700 },
AllowDeleting = true, AllowDeleting = true,
AllowAdding = true, AllowAdding = true,
AllowUpdating = true, AllowUpdating = true,
@ -3453,16 +3449,17 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Summary", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Summary", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 4, DataField = "CoverImage", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "CoverImage", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "ReadTime", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "ReadTime", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "CategoryId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 6, DataField = "CategoryId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "ViewCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 7, DataField = "EmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "LikeCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 8, DataField = "ViewCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 9, DataField = "CommentCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 9, DataField = "LikeCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 10, DataField = "IsPublished", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 10, DataField = "CommentCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 11, DataField = "PublishedAt", ColSpan = 2, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 11, DataField = "IsPublished", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 12, DataField = "ContentTr", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions }, new EditingFormItemDto { Order = 12, DataField = "PublishedAt", ColSpan = 2, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 13, DataField = "ContentEn", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions } new EditingFormItemDto { Order = 13, DataField = "ContentTr", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions },
new EditingFormItemDto { Order = 14, DataField = "ContentEn", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions }
] ]
} }
}), }),
@ -3473,7 +3470,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
}), }),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsPublished", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsPublished", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "PublishedAt", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey } new() { FieldName = "PublishedAt", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "ViewCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "LikeCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "CommentCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
}) })
}); });
@ -3538,7 +3538,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Summary", FieldName = "Summary",
Width = 400, Width = 450,
ListOrderNo = 4, ListOrderNo = 4,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -3561,7 +3561,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "CoverImage", FieldName = "CoverImage",
Width = 200, Width = 700,
ListOrderNo = 5, ListOrderNo = 5,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -3583,6 +3583,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
}, },
@ -3598,6 +3599,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto LookupJson = JsonSerializer.Serialize(new LookupDto
{ {
DataSourceType = UiLookupDataSourceTypeEnum.Query, DataSourceType = UiLookupDataSourceTypeEnum.Query,
@ -3612,14 +3614,22 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
{ {
ListFormCode = listFormBlogPosts.ListFormCode, ListFormCode = listFormBlogPosts.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Guid,
FieldName = "ViewCount", FieldName = "EmployeeId",
Width = 80, Width = 200,
ListOrderNo = 8, ListOrderNo = 8,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.EmployeeValues
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
}, },
@ -3628,7 +3638,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
ListFormCode = listFormBlogPosts.ListFormCode, ListFormCode = listFormBlogPosts.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Int32,
FieldName = "LikeCount", FieldName = "ViewCount",
Width = 80, Width = 80,
ListOrderNo = 9, ListOrderNo = 9,
Visible = true, Visible = true,
@ -3643,7 +3653,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
ListFormCode = listFormBlogPosts.ListFormCode, ListFormCode = listFormBlogPosts.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32, SourceDbType = DbType.Int32,
FieldName = "CommentCount", FieldName = "LikeCount",
Width = 80, Width = 80,
ListOrderNo = 10, ListOrderNo = 10,
Visible = true, Visible = true,
@ -3654,13 +3664,28 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
}, },
new() new()
{
ListFormCode = listFormBlogPosts.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32,
FieldName = "CommentCount",
Width = 80,
ListOrderNo = 11,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
},
new()
{ {
ListFormCode = listFormBlogPosts.ListFormCode, ListFormCode = listFormBlogPosts.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.Boolean, SourceDbType = DbType.Boolean,
FieldName = "IsPublished", FieldName = "IsPublished",
Width = 80, Width = 80,
ListOrderNo = 10, ListOrderNo = 12,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
@ -3675,7 +3700,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
SourceDbType = DbType.DateTime, SourceDbType = DbType.DateTime,
FieldName = "PublishedAt", FieldName = "PublishedAt",
Width = 120, Width = 120,
ListOrderNo = 11, ListOrderNo = 13,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
@ -3690,11 +3715,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "ContentTr", FieldName = "ContentTr",
Width = 120, Width = 120,
ListOrderNo = 11, ListOrderNo = 14,
Visible = false, Visible = false,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
}, },
@ -3705,11 +3731,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "ContentEn", FieldName = "ContentEn",
Width = 120, Width = 120,
ListOrderNo = 12, ListOrderNo = 15,
Visible = false, Visible = false,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts),
} }
@ -3739,8 +3766,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
SelectCommandType = SelectCommandTypeEnum.Table, SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Demo)), SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Demo)),
KeyFieldName = "Id", KeyFieldName = "Id",
DefaultFilter = DefaultFilterJson,
KeyFieldDbSourceType = DbType.Guid, KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle, SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
@ -3752,7 +3779,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{ {
Popup = new GridEditingPopupDto { Title = AppCodes.Demos, Width = 500, Height = 500 }, Popup = new GridEditingPopupDto { Title = AppCodes.Demos, Width = 500, Height = 400 },
AllowDeleting = true, AllowDeleting = true,
AllowAdding = true, AllowAdding = true,
AllowUpdating = true, AllowUpdating = true,
@ -3788,6 +3815,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
{ {
new FieldsDefaultValue { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new FieldsDefaultValue { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } new FieldsDefaultValue { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "NumberOfBranches", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "NumberOfUsers", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
}) })
}); });
@ -3836,6 +3867,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -3845,16 +3877,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Email", FieldName = "Email",
Width = 150, Width = 250,
ListOrderNo = 4, ListOrderNo = 4,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] ValidationRuleJson = DefaultValidationRuleEmailRequiredJson,
{
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) },
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -3870,6 +3899,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
EditorOptions = EditorOptionValues.PhoneEditorOptions, EditorOptions = EditorOptionValues.PhoneEditorOptions,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
@ -3880,12 +3910,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Address", FieldName = "Address",
Width = 200, Width = 400,
ListOrderNo = 6, ListOrderNo = 6,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -3893,14 +3924,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
{ {
ListFormCode = listFormDemo.ListFormCode, ListFormCode = listFormDemo.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.Int32,
FieldName = "NumberOfBranches", FieldName = "NumberOfBranches",
Width = 100, Width = 125,
ListOrderNo = 7, ListOrderNo = 7,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -3908,14 +3940,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
{ {
ListFormCode = listFormDemo.ListFormCode, ListFormCode = listFormDemo.ListFormCode,
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.Int32,
FieldName = "NumberOfUsers", FieldName = "NumberOfUsers",
Width = 100, Width = 125,
ListOrderNo = 8, ListOrderNo = 8,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -3925,12 +3958,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Message", FieldName = "Message",
Width = 300, Width = 400,
ListOrderNo = 9, ListOrderNo = 9,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos),
}, },
@ -4035,7 +4069,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Address", FieldName = "Address",
Width = 200, Width = 400,
ListOrderNo = 2, ListOrderNo = 2,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -4057,14 +4091,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "PhoneNumber", FieldName = "PhoneNumber",
Width = 150, Width = 100,
ListOrderNo = 3, ListOrderNo = 3,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
EditorOptions = EditorOptionValues.PhoneEditorOptions,
ValidationRuleJson = DefaultValidationRuleRequiredJson, ValidationRuleJson = DefaultValidationRuleRequiredJson,
EditorOptions = EditorOptionValues.PhoneEditorOptions,
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact),
}, },
@ -4080,11 +4114,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] ValidationRuleJson = DefaultValidationRuleEmailRequiredJson,
{
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) },
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) },
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact),
}, },
@ -4094,7 +4124,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "Location", FieldName = "Location",
Width = 150, Width = 100,
ListOrderNo = 5, ListOrderNo = 5,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -4126,7 +4156,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "BankJson", FieldName = "BankJson",
Width = 100, Width = 450,
ListOrderNo = 7, ListOrderNo = 7,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -4142,7 +4172,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
CultureName = LanguageCodes.En, CultureName = LanguageCodes.En,
SourceDbType = DbType.String, SourceDbType = DbType.String,
FieldName = "WorkHoursJson", FieldName = "WorkHoursJson",
Width = 100, Width = 350,
ListOrderNo = 8, ListOrderNo = 8,
Visible = true, Visible = true,
IsActive = true, IsActive = true,
@ -4160,7 +4190,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
FieldName = "MapJson", FieldName = "MapJson",
Width = 100, Width = 100,
ListOrderNo = 9, ListOrderNo = 9,
Visible = true, Visible = false,
IsActive = true, IsActive = true,
IsDeleted = false, IsDeleted = false,
AllowSearch = true, AllowSearch = true,

View file

@ -69,11 +69,15 @@ public static class SeederDefaults
}); });
public static readonly string DefaultValidationRuleRequiredJson = JsonSerializer.Serialize(new ValidationRuleDto[] public static readonly string DefaultValidationRuleRequiredJson = JsonSerializer.Serialize(new ValidationRuleDto[]
{ {
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }
}); });
public static readonly string DefaultValidationRuleEmailJson = JsonSerializer.Serialize(new ValidationRuleDto[] public static readonly string DefaultValidationRuleEmailJson = JsonSerializer.Serialize(new ValidationRuleDto[]
{ {
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email), Reevaluate = true, IgnoreEmptyValue = true } new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email), Reevaluate = true, IgnoreEmptyValue = true }
});
public static readonly string DefaultValidationRuleEmailRequiredJson = JsonSerializer.Serialize(new ValidationRuleDto[]
{
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) },
}); });
public static string DefaultPermissionJson(string c, string r, string u, string d, string e, string i, string a) public static string DefaultPermissionJson(string c, string r, string u, string d, string e, string i, string a)
{ {

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations namespace Kurs.Platform.Migrations
{ {
[DbContext(typeof(PlatformDbContext))] [DbContext(typeof(PlatformDbContext))]
[Migration("20251104115742_Initial")] [Migration("20251104124136_Initial")]
partial class Initial partial class Initial
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -12418,9 +12418,9 @@ namespace Kurs.Platform.Migrations
.IsRequired(); .IsRequired();
b.HasOne("Kurs.Platform.Entities.Employee", "Employee") b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
.WithMany() .WithMany("BlogPosts")
.HasForeignKey("EmployeeId") .HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Restrict)
.IsRequired(); .IsRequired();
b.Navigation("Category"); b.Navigation("Category");
@ -13530,6 +13530,8 @@ namespace Kurs.Platform.Migrations
{ {
b.Navigation("Announcements"); b.Navigation("Announcements");
b.Navigation("BlogPosts");
b.Navigation("Certificates"); b.Navigation("Certificates");
b.Navigation("ExpenseRequests"); b.Navigation("ExpenseRequests");

View file

@ -6035,7 +6035,7 @@ namespace Kurs.Platform.Migrations
column: "EmployeeId", column: "EmployeeId",
principalTable: "Hr_T_Employee", principalTable: "Hr_T_Employee",
principalColumn: "Id", principalColumn: "Id",
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey( migrationBuilder.AddForeignKey(
name: "FK_Adm_T_Partner_Hr_T_Employee_AssignedEmployeeId", name: "FK_Adm_T_Partner_Hr_T_Employee_AssignedEmployeeId",

View file

@ -12415,9 +12415,9 @@ namespace Kurs.Platform.Migrations
.IsRequired(); .IsRequired();
b.HasOne("Kurs.Platform.Entities.Employee", "Employee") b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
.WithMany() .WithMany("BlogPosts")
.HasForeignKey("EmployeeId") .HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Restrict)
.IsRequired(); .IsRequired();
b.Navigation("Category"); b.Navigation("Category");
@ -13527,6 +13527,8 @@ namespace Kurs.Platform.Migrations
{ {
b.Navigation("Announcements"); b.Navigation("Announcements");
b.Navigation("BlogPosts");
b.Navigation("Certificates"); b.Navigation("Certificates");
b.Navigation("ExpenseRequests"); b.Navigation("ExpenseRequests");