Tenant seeder çalışmaları
This commit is contained in:
parent
f847986631
commit
2cacec19c7
33 changed files with 1473 additions and 827 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
|
using System;
|
||||||
using Volo.Abp.Application.Dtos;
|
using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
namespace Kurs.Platform.Orders;
|
namespace Kurs.Platform.Orders;
|
||||||
|
|
||||||
public class PaymentMethodDto : EntityDto<string>
|
public class PaymentMethodDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public class PublicAppService : PlatformAppService
|
||||||
private readonly IRepository<BlogPost, Guid> _postRepository;
|
private readonly IRepository<BlogPost, Guid> _postRepository;
|
||||||
private readonly IRepository<BlogCategory, Guid> _categoryRepository;
|
private readonly IRepository<BlogCategory, Guid> _categoryRepository;
|
||||||
private readonly IRepository<Product, Guid> _productRepository;
|
private readonly IRepository<Product, Guid> _productRepository;
|
||||||
private readonly IRepository<PaymentMethod, string> _paymentMethodRepository;
|
private readonly IRepository<PaymentMethod, Guid> _paymentMethodRepository;
|
||||||
private readonly IRepository<InstallmentOption> _installmentOptionRepository;
|
private readonly IRepository<InstallmentOption> _installmentOptionRepository;
|
||||||
private readonly IRepository<Order, Guid> _orderRepository;
|
private readonly IRepository<Order, Guid> _orderRepository;
|
||||||
private readonly IRepository<About, Guid> _aboutRepository;
|
private readonly IRepository<About, Guid> _aboutRepository;
|
||||||
|
|
@ -43,7 +43,7 @@ public class PublicAppService : PlatformAppService
|
||||||
IRepository<BlogPost, Guid> postRepository,
|
IRepository<BlogPost, Guid> postRepository,
|
||||||
IRepository<BlogCategory, Guid> categoryRepository,
|
IRepository<BlogCategory, Guid> categoryRepository,
|
||||||
IRepository<Product, Guid> productRepository,
|
IRepository<Product, Guid> productRepository,
|
||||||
IRepository<PaymentMethod, string> paymentMethodRepository,
|
IRepository<PaymentMethod, Guid> paymentMethodRepository,
|
||||||
IRepository<InstallmentOption> installmentOptionRepository,
|
IRepository<InstallmentOption> installmentOptionRepository,
|
||||||
IRepository<Order, Guid> orderRepository,
|
IRepository<Order, Guid> orderRepository,
|
||||||
IRepository<About, Guid> aboutRepository,
|
IRepository<About, Guid> aboutRepository,
|
||||||
|
|
|
||||||
|
|
@ -1116,6 +1116,752 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Tenant
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormTenant))
|
||||||
|
{
|
||||||
|
var formTenant = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm()
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.Form,
|
||||||
|
IsSubForm = false,
|
||||||
|
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||||
|
{
|
||||||
|
Grid = true,
|
||||||
|
Card = true,
|
||||||
|
Pivot = true,
|
||||||
|
Chart = true,
|
||||||
|
DefaultLayout = "grid",
|
||||||
|
CardLayoutColumn = 4
|
||||||
|
}),
|
||||||
|
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Branches",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.Branch,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
ChildFieldName = "TenantId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Forms.FormTenant,
|
||||||
|
Name = TenantManagementPermissions.Tenants.Default,
|
||||||
|
Title = TenantManagementPermissions.Tenants.Default,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = false,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = TenantManagementPermissions.Tenants.Default,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = "AbpTenants",
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto
|
||||||
|
{
|
||||||
|
Visible = true
|
||||||
|
}),
|
||||||
|
HeaderFilterJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
Visible = true
|
||||||
|
}),
|
||||||
|
SearchPanelJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
Visible = true
|
||||||
|
}),
|
||||||
|
GroupPanelJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
Visible = true
|
||||||
|
}),
|
||||||
|
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||||
|
{
|
||||||
|
Mode = GridOptions.SelectionModeSingle,
|
||||||
|
AllowSelectAll = false
|
||||||
|
}),
|
||||||
|
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||||
|
{
|
||||||
|
ColumnFixingEnabled = true,
|
||||||
|
ColumnChooserEnabled = true
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
D = TenantManagementPermissions.Tenants.Delete,
|
||||||
|
E = TenantManagementPermissions.Tenants.Default + ".Export",
|
||||||
|
I = TenantManagementPermissions.Tenants.Default + ".Import"
|
||||||
|
}),
|
||||||
|
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||||
|
{
|
||||||
|
Visible = true,
|
||||||
|
AllowedPageSizes = "10,20,50,100",
|
||||||
|
ShowPageSizeSelector = true,
|
||||||
|
ShowNavigationButtons = true,
|
||||||
|
ShowInfo = false,
|
||||||
|
InfoText = "Page {0} of {1} ({2} items)",
|
||||||
|
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||||
|
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||||
|
LoadPanelEnabled = "auto",
|
||||||
|
LoadPanelText = "Loading..."
|
||||||
|
}),
|
||||||
|
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||||
|
{
|
||||||
|
Popup = new GridEditingPopupDto()
|
||||||
|
{
|
||||||
|
Title = "Tenant Form",
|
||||||
|
Width = 900,
|
||||||
|
Height = 450
|
||||||
|
},
|
||||||
|
AllowDeleting = true,
|
||||||
|
AllowAdding = true,
|
||||||
|
AllowUpdating = true,
|
||||||
|
SendOnlyChangedFormValuesUpdate = false,
|
||||||
|
}),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
|
{
|
||||||
|
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
|
new EditingFormItemDto { Order=2, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
|
new EditingFormItemDto { Order=3, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
|
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
|
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
||||||
|
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
|
new() {
|
||||||
|
Hint = "Manage",
|
||||||
|
Text = "Manage",
|
||||||
|
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
|
||||||
|
DialogName = "TenantsConnectionString",
|
||||||
|
DialogParameters = JsonSerializer.Serialize(new {
|
||||||
|
name = "@Name",
|
||||||
|
id = "@Id"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
|
||||||
|
UpdateServiceAddress = "list-form-dynamic-api/tenant-update",
|
||||||
|
DeleteCommand = "DELETE FROM \"AbpTenants\" WHERE \"Id\"=@Id",
|
||||||
|
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() {
|
||||||
|
FieldName = "Id",
|
||||||
|
FieldDbType = DbType.Guid,
|
||||||
|
Value = "@ID",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() {
|
||||||
|
FieldName = "IsActive",
|
||||||
|
FieldDbType = DbType.Boolean,
|
||||||
|
Value = "true",
|
||||||
|
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Tenants Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync(
|
||||||
|
[
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 500,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Name",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "OrganizationName",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Founder",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "VknTckn",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "TaxOffice",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Country",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = lookupQueryCountryValues,
|
||||||
|
CascadeEmptyFields = "City,District,Street"
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "City",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = lookupQueryCityValues,
|
||||||
|
CascadeRelationField = "Country",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "Country",
|
||||||
|
CascadeEmptyFields = "District,Street"
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "District",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 9,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = lookupQueryDistrictValues,
|
||||||
|
CascadeRelationField = "City",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "Country,City",
|
||||||
|
CascadeEmptyFields = "Street",
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Street",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 10,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = lookupQueryStreetValues,
|
||||||
|
CascadeRelationField = "District",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "Country,City,District"
|
||||||
|
}),
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Address",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 11,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Address2",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 12,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "PostalCode",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 13,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Email",
|
||||||
|
Width = 170,
|
||||||
|
ListOrderNo = 14,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Website",
|
||||||
|
Width = 170,
|
||||||
|
ListOrderNo = 15,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Mobile",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 16,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Phone",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 17,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Fax",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 18,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = formTenant.ListFormCode,
|
||||||
|
RoleId = null,
|
||||||
|
UserId = null,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsActive",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 19,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = TenantManagementPermissions.Tenants.Create,
|
||||||
|
R = TenantManagementPermissions.Tenants.Default,
|
||||||
|
U = TenantManagementPermissions.Tenants.Update,
|
||||||
|
E = true,
|
||||||
|
I = true,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||||
|
{
|
||||||
|
IsPivot = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region List
|
#region List
|
||||||
|
|
@ -1214,30 +1960,30 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items =
|
new() { Order=2, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=2, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=2, DataField="City", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=3, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=3, DataField="District", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -1259,6 +2005,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
AuthName = AppCodes.Branches,
|
AuthName = AppCodes.Branches,
|
||||||
Url = "/admin/list/list-branch",
|
Url = "/admin/list/list-branch",
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
Hint = "Branches",
|
||||||
|
Text = "Branches",
|
||||||
|
AuthName = AppCodes.Branches,
|
||||||
|
Url = "/admin/form/form-tenant/@Id",
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
|
InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
|
||||||
UpdateServiceAddress = "list-form-dynamic-api/tenant-update",
|
UpdateServiceAddress = "list-form-dynamic-api/tenant-update",
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Route, Guid> _routeRepository;
|
private readonly IRepository<Route, Guid> _routeRepository;
|
||||||
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
||||||
private readonly IRepository<Product, Guid> _productRepository;
|
private readonly IRepository<Product, Guid> _productRepository;
|
||||||
private readonly IRepository<PaymentMethod, String> _paymentMethodRepository;
|
private readonly IRepository<PaymentMethod, Guid> _paymentMethodRepository;
|
||||||
private readonly IRepository<InstallmentOption, Guid> _installmentOptionRepository;
|
private readonly IRepository<InstallmentOption, Guid> _installmentOptionRepository;
|
||||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||||
private readonly IRepository<ReportCategory, Guid> _reportCategoriesRepository;
|
private readonly IRepository<ReportCategory, Guid> _reportCategoriesRepository;
|
||||||
|
|
@ -126,7 +126,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<About, Guid> aboutRepository,
|
IRepository<About, Guid> aboutRepository,
|
||||||
IRepository<Service, Guid> servicesRepository,
|
IRepository<Service, Guid> servicesRepository,
|
||||||
IRepository<Product, Guid> productRepository,
|
IRepository<Product, Guid> productRepository,
|
||||||
IRepository<PaymentMethod, String> paymentMethodRepository,
|
IRepository<PaymentMethod, Guid> paymentMethodRepository,
|
||||||
IRepository<InstallmentOption, Guid> installmentOptionRepository,
|
IRepository<InstallmentOption, Guid> installmentOptionRepository,
|
||||||
IRepository<BlogCategory, Guid> blogCategoryRepository,
|
IRepository<BlogCategory, Guid> blogCategoryRepository,
|
||||||
IRepository<BlogPost, Guid> blogPostsRepository,
|
IRepository<BlogPost, Guid> blogPostsRepository,
|
||||||
|
|
@ -704,7 +704,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _uomCategoryRepository.InsertAsync(new UomCategory(item.Id, item.Name));
|
await _uomCategoryRepository.InsertAsync(new UomCategory { Name = item.Name });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -714,6 +714,10 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
|
var category = await _uomCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.UomCategoryName);
|
||||||
|
if (category != null)
|
||||||
|
{
|
||||||
|
|
||||||
await _uomRepository.InsertAsync(new Uom
|
await _uomRepository.InsertAsync(new Uom
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
|
|
@ -721,10 +725,11 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
Ratio = item.Ratio,
|
Ratio = item.Ratio,
|
||||||
IsActive = item.IsActive,
|
IsActive = item.IsActive,
|
||||||
Rounding = item.Rounding,
|
Rounding = item.Rounding,
|
||||||
UomCategoryId = item.UomCategoryId
|
UomCategoryId = category.Id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var item in items.Currencies)
|
foreach (var item in items.Currencies)
|
||||||
{
|
{
|
||||||
|
|
@ -750,38 +755,49 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
await _skillTypeRepository.InsertAsync
|
await _skillTypeRepository.InsertAsync
|
||||||
(
|
(
|
||||||
new SkillType(item.Id, item.Name)
|
new SkillType
|
||||||
);
|
{
|
||||||
|
Name = item.Name
|
||||||
|
}
|
||||||
|
, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in items.Skills)
|
foreach (var item in items.Skills)
|
||||||
{
|
{
|
||||||
var exists = await _skillRepository.AnyAsync(x => x.Name == item.Name && x.SkillTypeId == item.SkillTypeId);
|
var exists = await _skillRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
|
{
|
||||||
|
var skillType = await _skillTypeRepository.FirstOrDefaultAsync(x => x.Name == item.SkillTypeName);
|
||||||
|
if (skillType != null)
|
||||||
{
|
{
|
||||||
await _skillRepository.InsertAsync(new Skill
|
await _skillRepository.InsertAsync(new Skill
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
SkillTypeId = item.SkillTypeId
|
SkillTypeId = skillType.Id
|
||||||
});
|
}, autoSave: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in items.SkillLevels)
|
foreach (var item in items.SkillLevels)
|
||||||
{
|
{
|
||||||
var exists = await _skillLevelRepository.AnyAsync(x => x.Name == item.Name && x.SkillTypeId == item.SkillTypeId);
|
var exists = await _skillLevelRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
|
{
|
||||||
|
var skillType = await _skillTypeRepository.FirstOrDefaultAsync(x => x.Name == item.SkillTypeName);
|
||||||
|
if (skillType != null)
|
||||||
{
|
{
|
||||||
await _skillLevelRepository.InsertAsync(new SkillLevel
|
await _skillLevelRepository.InsertAsync(new SkillLevel
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Progress = item.Progress,
|
Progress = item.Progress,
|
||||||
IsDefault = item.IsDefault,
|
IsDefault = item.IsDefault,
|
||||||
SkillTypeId = item.SkillTypeId,
|
SkillTypeId = skillType.Id,
|
||||||
});
|
}, autoSave: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -819,13 +835,11 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
var newCategory = new BlogCategory(
|
var newCategory = new BlogCategory
|
||||||
item.Id,
|
|
||||||
item.Name,
|
|
||||||
item.Slug,
|
|
||||||
item.Description
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
Name = item.Name,
|
||||||
|
Slug = item.Slug,
|
||||||
|
Description = item.Description,
|
||||||
DisplayOrder = item.DisplayOrder,
|
DisplayOrder = item.DisplayOrder,
|
||||||
PostCount = item.PostCount
|
PostCount = item.PostCount
|
||||||
};
|
};
|
||||||
|
|
@ -840,20 +854,24 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _blogPostsRepository.InsertAsync(new BlogPost(
|
var category = await _blogCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.CategoryName);
|
||||||
Guid.NewGuid(),
|
if (category != null)
|
||||||
item.Title,
|
{
|
||||||
item.Slug,
|
await _blogPostsRepository.InsertAsync(new BlogPost
|
||||||
item.ContentTr,
|
{
|
||||||
item.ContentEn,
|
Title = item.Title,
|
||||||
item.Summary,
|
Slug = item.Slug,
|
||||||
item.ReadTime,
|
ContentTr = item.ContentTr,
|
||||||
item.CoverImage,
|
ContentEn = item.ContentEn,
|
||||||
item.CategoryId,
|
Summary = item.Summary,
|
||||||
item.AuthorId,
|
CoverImage = item.CoverImage,
|
||||||
true,
|
ReadTime = item.ReadTime,
|
||||||
DateTime.UtcNow
|
CategoryId = category.Id,
|
||||||
));
|
AuthorId = item.AuthorId,
|
||||||
|
IsPublished = true,
|
||||||
|
PublishedAt = DateTime.UtcNow
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -863,14 +881,14 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
var newCategory = new ForumCategory(
|
var newCategory = new ForumCategory
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Slug,
|
Slug = item.Slug,
|
||||||
item.Description,
|
Description = item.Description,
|
||||||
item.Icon,
|
Icon = item.Icon,
|
||||||
item.DisplayOrder
|
DisplayOrder = item.DisplayOrder
|
||||||
);
|
};
|
||||||
|
|
||||||
await _forumCategoryRepository.InsertAsync(newCategory);
|
await _forumCategoryRepository.InsertAsync(newCategory);
|
||||||
}
|
}
|
||||||
|
|
@ -882,10 +900,10 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _aiBotRepository.InsertAsync(new AiBot(
|
await _aiBotRepository.InsertAsync(new AiBot
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.BotName
|
BotName = item.BotName,
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -930,17 +948,17 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _productRepository.InsertAsync(new Product(
|
await _productRepository.InsertAsync(new Product
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Description,
|
Description = item.Description,
|
||||||
item.Category,
|
Category = item.Category,
|
||||||
item.Order,
|
Order = item.Order,
|
||||||
item.MonthlyPrice,
|
MonthlyPrice = item.MonthlyPrice,
|
||||||
item.YearlyPrice,
|
YearlyPrice = item.YearlyPrice,
|
||||||
item.IsQuantityBased,
|
IsQuantityBased = item.IsQuantityBased,
|
||||||
item.ImageUrl
|
ImageUrl = item.ImageUrl
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -950,12 +968,12 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _paymentMethodRepository.InsertAsync(new PaymentMethod(
|
await _paymentMethodRepository.InsertAsync(new PaymentMethod
|
||||||
item.Id,
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Commission,
|
Commission = item.Commission,
|
||||||
item.Logo
|
Logo = item.Logo
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -994,11 +1012,12 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _reportCategoriesRepository.InsertAsync(new ReportCategory(
|
await _reportCategoriesRepository.InsertAsync(new ReportCategory
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Description,
|
Description = item.Description,
|
||||||
item.Icon));
|
Icon = item.Icon
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1008,14 +1027,14 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _servicesRepository.InsertAsync(new Service(
|
await _servicesRepository.InsertAsync(new Service
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Icon,
|
Icon = item.Icon,
|
||||||
item.Title,
|
Title = item.Title,
|
||||||
item.Description,
|
Description = item.Description,
|
||||||
item.Type,
|
Type = item.Type,
|
||||||
item.Features
|
Features = item.Features
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1024,12 +1043,12 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var exists = await _aboutRepository.FirstOrDefaultAsync();
|
var exists = await _aboutRepository.FirstOrDefaultAsync();
|
||||||
if (exists == null)
|
if (exists == null)
|
||||||
{
|
{
|
||||||
await _aboutRepository.InsertAsync(new About(
|
await _aboutRepository.InsertAsync(new About
|
||||||
Guid.NewGuid(),
|
{
|
||||||
JsonSerializer.Serialize(item.Stats),
|
StatsJson = JsonSerializer.Serialize(item.Stats),
|
||||||
JsonSerializer.Serialize(item.Descriptions),
|
DescriptionsJson = JsonSerializer.Serialize(item.Descriptions),
|
||||||
JsonSerializer.Serialize(item.Sections)
|
SectionsJson = JsonSerializer.Serialize(item.Sections)
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1038,17 +1057,17 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var exists = await _contactRepository.FirstOrDefaultAsync();
|
var exists = await _contactRepository.FirstOrDefaultAsync();
|
||||||
if (exists == null)
|
if (exists == null)
|
||||||
{
|
{
|
||||||
await _contactRepository.InsertAsync(new Contact(
|
await _contactRepository.InsertAsync(new Contact
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Address,
|
Address = item.Address,
|
||||||
item.Phone,
|
Phone = item.Phone,
|
||||||
item.Email,
|
Email = item.Email,
|
||||||
item.Location,
|
Location = item.Location,
|
||||||
item.TaxNumber,
|
TaxNumber = item.TaxNumber,
|
||||||
JsonSerializer.Serialize(item.Bank),
|
BankJson = JsonSerializer.Serialize(item.Bank),
|
||||||
JsonSerializer.Serialize(item.WorkHour),
|
WorkHoursJson = JsonSerializer.Serialize(item.WorkHour),
|
||||||
JsonSerializer.Serialize(item.Map)
|
MapJson = JsonSerializer.Serialize(item.Map)
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1058,19 +1077,19 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _classroomRepository.InsertAsync(new Classroom(
|
await _classroomRepository.InsertAsync(new Classroom
|
||||||
Guid.NewGuid(),
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Description,
|
Description = item.Description,
|
||||||
item.Subject,
|
Subject = item.Subject,
|
||||||
item.TeacherId,
|
TeacherId = item.TeacherId,
|
||||||
item.TeacherName,
|
TeacherName = item.TeacherName,
|
||||||
item.ScheduledStartTime,
|
ScheduledStartTime = item.ScheduledStartTime,
|
||||||
item.ScheduledEndTime,
|
ScheduledEndTime = item.ScheduledEndTime,
|
||||||
item.Duration,
|
Duration = item.Duration,
|
||||||
item.MaxParticipants,
|
MaxParticipants = item.MaxParticipants,
|
||||||
item.SettingsJson
|
SettingsJson = item.SettingsJson
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1292,7 +1311,10 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _eventTypeRepository.InsertAsync(new EventType(item.Id, item.Name));
|
await _eventTypeRepository.InsertAsync(new EventType
|
||||||
|
{
|
||||||
|
Name = item.Name
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1302,7 +1324,10 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _eventCategoryRepository.InsertAsync(new EventCategory(item.Id, item.Name));
|
await _eventCategoryRepository.InsertAsync(new EventCategory
|
||||||
|
{
|
||||||
|
Name = item.Name
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1354,11 +1379,11 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _registrationTypeRepository.InsertAsync(new RegistrationType(
|
await _registrationTypeRepository.InsertAsync(new RegistrationType
|
||||||
item.Id,
|
{
|
||||||
item.Name,
|
Name = item.Name,
|
||||||
item.Status
|
Status = item.Status
|
||||||
));
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1367,15 +1392,19 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var exists = await _registrationMethodRepository.AnyAsync(x => x.Name == item.Name);
|
var exists = await _registrationMethodRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
|
{
|
||||||
|
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||||
|
if (registrationType != null)
|
||||||
{
|
{
|
||||||
await _registrationMethodRepository.InsertAsync(new RegistrationMethod
|
await _registrationMethodRepository.InsertAsync(new RegistrationMethod
|
||||||
{
|
{
|
||||||
RegistrationTypeId = item.RegistrationTypeId,
|
RegistrationTypeId = registrationType.Id,
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Status = item.Status
|
Status = item.Status
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var item in items.ClassTypes)
|
foreach (var item in items.ClassTypes)
|
||||||
{
|
{
|
||||||
|
|
@ -1383,14 +1412,18 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _classTypeRepository.InsertAsync(new ClassType(
|
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||||
item.Id,
|
if (registrationType != null)
|
||||||
item.RegistrationTypeId,
|
{
|
||||||
item.Name,
|
await _classTypeRepository.InsertAsync(new ClassType
|
||||||
item.MinStudentCount,
|
{
|
||||||
item.MaxStudentCount,
|
RegistrationTypeId = registrationType.Id,
|
||||||
item.Status
|
Name = item.Name,
|
||||||
));
|
MinStudentCount = item.MinStudentCount,
|
||||||
|
MaxStudentCount = item.MaxStudentCount,
|
||||||
|
Status = item.Status
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1399,25 +1432,32 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var exists = await _classRepository.AnyAsync(x => x.Name == item.Name);
|
var exists = await _classRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
|
{
|
||||||
|
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||||
|
if (classType != null)
|
||||||
{
|
{
|
||||||
await _classRepository.InsertAsync(new()
|
await _classRepository.InsertAsync(new()
|
||||||
{
|
{
|
||||||
ClassTypeId = item.ClassTypeId,
|
ClassTypeId = classType.Id,
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Status = item.Status,
|
Status = item.Status,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var item in items.Levels)
|
foreach (var item in items.Levels)
|
||||||
{
|
{
|
||||||
var exists = await _levelRepository.AnyAsync(x => x.Name == item.Name);
|
var exists = await _levelRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
|
{
|
||||||
|
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||||
|
if (classType != null)
|
||||||
{
|
{
|
||||||
await _levelRepository.InsertAsync(new Level
|
await _levelRepository.InsertAsync(new Level
|
||||||
{
|
{
|
||||||
ClassTypeId = item.ClassTypeId,
|
ClassTypeId = classType.Id,
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
LevelType = item.LevelType,
|
LevelType = item.LevelType,
|
||||||
LessonCount = item.LessonCount,
|
LessonCount = item.LessonCount,
|
||||||
|
|
@ -1429,3 +1469,4 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -157,7 +157,7 @@ public class UomSeedDto
|
||||||
public decimal Ratio { get; set; }
|
public decimal Ratio { get; set; }
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
public decimal Rounding { get; set; }
|
public decimal Rounding { get; set; }
|
||||||
public Guid UomCategoryId { get; set; }
|
public string UomCategoryName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CurrencySeedDto
|
public class CurrencySeedDto
|
||||||
|
|
@ -170,14 +170,13 @@ public class CurrencySeedDto
|
||||||
|
|
||||||
public class SkillTypeSeedDto
|
public class SkillTypeSeedDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SkillSeedDto
|
public class SkillSeedDto
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public Guid SkillTypeId { get; set; }
|
public string SkillTypeName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SkillLevelSeedDto
|
public class SkillLevelSeedDto
|
||||||
|
|
@ -185,7 +184,7 @@ public class SkillLevelSeedDto
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int Progress { get; set; }
|
public int Progress { get; set; }
|
||||||
public bool IsDefault { get; set; }
|
public bool IsDefault { get; set; }
|
||||||
public Guid SkillTypeId { get; set; }
|
public string SkillTypeName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ContactTagSeedDto
|
public class ContactTagSeedDto
|
||||||
|
|
@ -202,7 +201,6 @@ public class ContactTitleSeedDto
|
||||||
|
|
||||||
public class BlogCategorySeedDto
|
public class BlogCategorySeedDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Slug { get; set; }
|
public string Slug { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
@ -219,7 +217,7 @@ public class BlogPostSeedDto
|
||||||
public string ReadTime { get; set; }
|
public string ReadTime { get; set; }
|
||||||
public string Summary { get; set; }
|
public string Summary { get; set; }
|
||||||
public string CoverImage { get; set; }
|
public string CoverImage { get; set; }
|
||||||
public Guid CategoryId { get; set; }
|
public string CategoryName { get; set; }
|
||||||
public Guid AuthorId { get; set; }
|
public Guid AuthorId { get; set; }
|
||||||
public Boolean IsPublished { get; set; }
|
public Boolean IsPublished { get; set; }
|
||||||
public DateTime PublishedAt { get; set; }
|
public DateTime PublishedAt { get; set; }
|
||||||
|
|
@ -263,7 +261,6 @@ public class CustomEndpointSeedDto
|
||||||
|
|
||||||
public class ProductSeedDto
|
public class ProductSeedDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string Category { get; set; }
|
public string Category { get; set; }
|
||||||
|
|
@ -276,7 +273,6 @@ public class ProductSeedDto
|
||||||
|
|
||||||
public class PaymentMethodSeedDto
|
public class PaymentMethodSeedDto
|
||||||
{
|
{
|
||||||
public string Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
public string Logo { get; set; }
|
public string Logo { get; set; }
|
||||||
|
|
@ -500,22 +496,20 @@ public class ProgramSeedDto
|
||||||
|
|
||||||
public class RegistrationTypeSeedDto
|
public class RegistrationTypeSeedDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RegistrationMethodSeedDto
|
public class RegistrationMethodSeedDto
|
||||||
{
|
{
|
||||||
public Guid RegistrationTypeId { get; set; }
|
public string RegistrationTypeName { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClassTypeSeedDto
|
public class ClassTypeSeedDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public string RegistrationTypeName { get; set; }
|
||||||
public Guid RegistrationTypeId { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int? MinStudentCount { get; set; }
|
public int? MinStudentCount { get; set; }
|
||||||
public int? MaxStudentCount { get; set; }
|
public int? MaxStudentCount { get; set; }
|
||||||
|
|
@ -524,14 +518,14 @@ public class ClassTypeSeedDto
|
||||||
|
|
||||||
public class ClassSeedDto
|
public class ClassSeedDto
|
||||||
{
|
{
|
||||||
public Guid ClassTypeId { get; set; }
|
public string ClassTypeName { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LevelSeedDto
|
public class LevelSeedDto
|
||||||
{
|
{
|
||||||
public Guid ClassTypeId { get; set; }
|
public string ClassTypeName { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string LevelType { get; set; }
|
public string LevelType { get; set; }
|
||||||
public int LessonCount { get; set; }
|
public int LessonCount { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -367,6 +367,7 @@ public static class PlatformConsts
|
||||||
{
|
{
|
||||||
public static class Forms
|
public static class Forms
|
||||||
{
|
{
|
||||||
|
public const string FormTenant = "form-tenant";
|
||||||
public const string FormLanguage = "form-language";
|
public const string FormLanguage = "form-language";
|
||||||
public const string FormUomCategory = "form-uomcategory";
|
public const string FormUomCategory = "form-uomcategory";
|
||||||
public const string FormSkillType = "form-skilltype";
|
public const string FormSkillType = "form-skilltype";
|
||||||
|
|
|
||||||
|
|
@ -23,19 +23,4 @@ public class ClassType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public RegistrationType RegistrationType { get; set; }
|
public RegistrationType RegistrationType { get; set; }
|
||||||
public ICollection<Class> Classes { get; set; }
|
public ICollection<Class> Classes { get; set; }
|
||||||
public ICollection<Level> Levels { get; set; }
|
public ICollection<Level> Levels { get; set; }
|
||||||
|
|
||||||
public ClassType()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClassType(Guid id, Guid registrationTypeId, string name, int? minStudentCount, int? maxStudentCount, string status)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
RegistrationTypeId = registrationTypeId;
|
|
||||||
Name = name;
|
|
||||||
MinStudentCount = minStudentCount;
|
|
||||||
MaxStudentCount = maxStudentCount;
|
|
||||||
Status = status;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,15 +15,4 @@ public class EventCategory : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public ICollection<Event> Events { get; set; }
|
public ICollection<Event> Events { get; set; }
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
Guid? IMultiTenant.TenantId => TenantId;
|
||||||
|
|
||||||
public EventCategory()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public EventCategory(Guid id, string name)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,15 +15,4 @@ public class EventType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public ICollection<Event> Events { get; set; }
|
public ICollection<Event> Events { get; set; }
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
Guid? IMultiTenant.TenantId => TenantId;
|
||||||
|
|
||||||
public EventType()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public EventType(Guid id, string name)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,4 @@ public class RegistrationType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
// Navigation
|
// Navigation
|
||||||
public ICollection<RegistrationMethod> Methods { get; set; }
|
public ICollection<RegistrationMethod> Methods { get; set; }
|
||||||
public ICollection<ClassType> ClassTypes { get; set; }
|
public ICollection<ClassType> ClassTypes { get; set; }
|
||||||
|
|
||||||
public RegistrationType(Guid id, string name, string status)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
Name = name;
|
|
||||||
Status = status;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,4 @@ public class SkillType : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public ICollection<Skill> Skills { get; set; }
|
public ICollection<Skill> Skills { get; set; }
|
||||||
public ICollection<SkillLevel> Levels { get; set; }
|
public ICollection<SkillLevel> Levels { get; set; }
|
||||||
|
|
||||||
public SkillType()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkillType(Guid id, string name) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -14,11 +14,4 @@ public class UomCategory : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public ICollection<Uom> Uoms { get; set; }
|
public ICollection<Uom> Uoms { get; set; }
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
Guid? IMultiTenant.TenantId => TenantId;
|
||||||
|
|
||||||
protected UomCategory() { }
|
|
||||||
|
|
||||||
public UomCategory(Guid id, string name) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -22,44 +22,7 @@ public class Classroom : FullAuditedEntity<Guid>
|
||||||
public string SettingsJson { get; set; }
|
public string SettingsJson { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual ICollection<ClassroomParticipant> Participants { get; set; }
|
public virtual ICollection<ClassroomParticipant> Participants { get; set; } = new HashSet<ClassroomParticipant>();
|
||||||
public virtual ICollection<ClassroomAttandance> AttendanceRecords { get; set; }
|
public virtual ICollection<ClassroomAttandance> AttendanceRecords { get; set; } = new HashSet<ClassroomAttandance>();
|
||||||
public virtual ICollection<ClassroomChat> ChatMessages { get; set; }
|
public virtual ICollection<ClassroomChat> ChatMessages { get; set; } = new HashSet<ClassroomChat>();
|
||||||
|
|
||||||
protected Classroom()
|
|
||||||
{
|
|
||||||
Participants = new HashSet<ClassroomParticipant>();
|
|
||||||
AttendanceRecords = new HashSet<ClassroomAttandance>();
|
|
||||||
ChatMessages = new HashSet<ClassroomChat>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Classroom(
|
|
||||||
Guid id,
|
|
||||||
string name,
|
|
||||||
string description,
|
|
||||||
string subject,
|
|
||||||
Guid? teacherId,
|
|
||||||
string teacherName,
|
|
||||||
DateTime scheduledStartTime,
|
|
||||||
DateTime? scheduledEndTime,
|
|
||||||
int duration,
|
|
||||||
int maxParticipants,
|
|
||||||
string settingsJson
|
|
||||||
) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Description = description;
|
|
||||||
Subject = subject;
|
|
||||||
TeacherId = teacherId;
|
|
||||||
TeacherName = teacherName;
|
|
||||||
ScheduledStartTime = scheduledStartTime;
|
|
||||||
ScheduledEndTime = scheduledEndTime;
|
|
||||||
Duration = duration;
|
|
||||||
MaxParticipants = maxParticipants;
|
|
||||||
SettingsJson = settingsJson;
|
|
||||||
|
|
||||||
Participants = new HashSet<ClassroomParticipant>();
|
|
||||||
AttendanceRecords = new HashSet<ClassroomAttandance>();
|
|
||||||
ChatMessages = new HashSet<ClassroomChat>();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,5 @@ namespace Kurs.Platform.Entities;
|
||||||
public class AiBot : Entity<Guid>
|
public class AiBot : Entity<Guid>
|
||||||
{
|
{
|
||||||
public string BotName { get; set; }
|
public string BotName { get; set; }
|
||||||
|
|
||||||
public AiBot(Guid id, string botName)
|
|
||||||
{
|
|
||||||
Id = Id;
|
|
||||||
BotName = botName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,24 +20,7 @@ public class ForumCategory : FullAuditedEntity<Guid>
|
||||||
public Guid? LastPostUserId { get; set; }
|
public Guid? LastPostUserId { get; set; }
|
||||||
public string LastPostUserName { get; set; }
|
public string LastPostUserName { get; set; }
|
||||||
|
|
||||||
public ICollection<ForumTopic> Topics { get; set; }
|
public ICollection<ForumTopic> Topics { get; set; } = [];
|
||||||
|
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
protected ForumCategory() { }
|
|
||||||
|
|
||||||
public ForumCategory(Guid id, string name, string slug, string description, string icon, int displayOrder, Guid? tenantId = null) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Slug = slug;
|
|
||||||
Description = description;
|
|
||||||
Icon = icon;
|
|
||||||
DisplayOrder = displayOrder;
|
|
||||||
IsActive = true;
|
|
||||||
IsLocked = false;
|
|
||||||
TopicCount = 0;
|
|
||||||
PostCount = 0;
|
|
||||||
TenantId = tenantId;
|
|
||||||
Topics = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,4 @@ public class About : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string StatsJson { get; set; }
|
public string StatsJson { get; set; }
|
||||||
public string DescriptionsJson { get; set; }
|
public string DescriptionsJson { get; set; }
|
||||||
public string SectionsJson { get; set; }
|
public string SectionsJson { get; set; }
|
||||||
|
|
||||||
protected About() { }
|
|
||||||
|
|
||||||
public About(
|
|
||||||
Guid id,
|
|
||||||
string statsJson,
|
|
||||||
string descriptionsJson,
|
|
||||||
string sectionsJson
|
|
||||||
) : base(id)
|
|
||||||
{
|
|
||||||
StatsJson = statsJson;
|
|
||||||
DescriptionsJson = descriptionsJson;
|
|
||||||
SectionsJson = sectionsJson;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -18,29 +18,6 @@ public class BlogCategory : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public virtual ICollection<BlogPost> Posts { get; set; }
|
public virtual ICollection<BlogPost> Posts { get; set; }
|
||||||
|
|
||||||
protected BlogCategory()
|
|
||||||
{
|
|
||||||
Posts = new HashSet<BlogPost>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlogCategory(
|
|
||||||
Guid id,
|
|
||||||
string name,
|
|
||||||
string slug,
|
|
||||||
string description = null,
|
|
||||||
Guid? tenantId = null) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Slug = slug;
|
|
||||||
Description = description;
|
|
||||||
TenantId = tenantId;
|
|
||||||
Icon = null;
|
|
||||||
DisplayOrder = 0;
|
|
||||||
IsActive = true;
|
|
||||||
PostCount = 0;
|
|
||||||
Posts = new HashSet<BlogPost>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void IncrementPostCount()
|
public void IncrementPostCount()
|
||||||
{
|
{
|
||||||
PostCount++;
|
PostCount++;
|
||||||
|
|
|
||||||
|
|
@ -27,43 +27,6 @@ public class BlogPost : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public bool IsPublished { get; set; } = false;
|
public bool IsPublished { get; set; } = false;
|
||||||
public DateTime? PublishedAt { get; set; }
|
public DateTime? PublishedAt { get; set; }
|
||||||
|
|
||||||
protected BlogPost()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlogPost(
|
|
||||||
Guid id,
|
|
||||||
string title,
|
|
||||||
string slug,
|
|
||||||
string contentTr,
|
|
||||||
string contentEn,
|
|
||||||
string summary,
|
|
||||||
string readTime,
|
|
||||||
string coverImage,
|
|
||||||
Guid categoryId,
|
|
||||||
Guid authorId,
|
|
||||||
bool isPublished,
|
|
||||||
DateTime? publishedAt = null,
|
|
||||||
Guid? tenantId = null) : base(id)
|
|
||||||
{
|
|
||||||
Title = title;
|
|
||||||
Slug = slug;
|
|
||||||
ContentTr = contentTr;
|
|
||||||
ContentEn = contentEn;
|
|
||||||
Summary = summary;
|
|
||||||
ReadTime = readTime;
|
|
||||||
CoverImage = coverImage;
|
|
||||||
CategoryId = categoryId;
|
|
||||||
AuthorId = authorId;
|
|
||||||
IsPublished = isPublished;
|
|
||||||
PublishedAt = publishedAt;
|
|
||||||
TenantId = tenantId;
|
|
||||||
|
|
||||||
ViewCount = 0;
|
|
||||||
LikeCount = 0;
|
|
||||||
CommentCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Publish()
|
public void Publish()
|
||||||
{
|
{
|
||||||
IsPublished = true;
|
IsPublished = true;
|
||||||
|
|
|
||||||
|
|
@ -18,28 +18,4 @@ public class Contact : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string BankJson { get; set; }
|
public string BankJson { get; set; }
|
||||||
public string WorkHoursJson { get; set; }
|
public string WorkHoursJson { get; set; }
|
||||||
public string MapJson { get; set; }
|
public string MapJson { get; set; }
|
||||||
|
|
||||||
protected Contact() { }
|
|
||||||
|
|
||||||
public Contact(
|
|
||||||
Guid id,
|
|
||||||
string address,
|
|
||||||
string phone,
|
|
||||||
string email,
|
|
||||||
string location,
|
|
||||||
string taxNumber,
|
|
||||||
string bankJson,
|
|
||||||
string workHoursJson,
|
|
||||||
string mapJson
|
|
||||||
) : base(id)
|
|
||||||
{
|
|
||||||
Address = address;
|
|
||||||
Phone = phone;
|
|
||||||
Email = email;
|
|
||||||
Location = location;
|
|
||||||
TaxNumber = taxNumber;
|
|
||||||
BankJson = bankJson;
|
|
||||||
WorkHoursJson = workHoursJson;
|
|
||||||
MapJson = mapJson;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,20 +1,11 @@
|
||||||
using Volo.Abp.Domain.Entities;
|
using System;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
public class PaymentMethod : Entity<string>
|
public class PaymentMethod : FullAuditedEntity<Guid>
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
public string Logo { get; set; }
|
public string Logo { get; set; }
|
||||||
|
|
||||||
public PaymentMethod() { }
|
|
||||||
|
|
||||||
public PaymentMethod(string id, string name, decimal commission, string logo)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
Name = name;
|
|
||||||
Commission = commission;
|
|
||||||
Logo = logo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,30 +13,4 @@ public class Product : FullAuditedEntity<Guid>
|
||||||
public decimal? YearlyPrice { get; set; }
|
public decimal? YearlyPrice { get; set; }
|
||||||
public bool IsQuantityBased { get; set; } = false;
|
public bool IsQuantityBased { get; set; } = false;
|
||||||
public string ImageUrl { get; set; }
|
public string ImageUrl { get; set; }
|
||||||
|
|
||||||
public Product()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Product(
|
|
||||||
Guid id,
|
|
||||||
string name,
|
|
||||||
string description,
|
|
||||||
string category,
|
|
||||||
int order,
|
|
||||||
decimal? monthlyPrice,
|
|
||||||
decimal? yearlyPrice,
|
|
||||||
bool isQuantityBased,
|
|
||||||
string imageUrl
|
|
||||||
) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Description = description;
|
|
||||||
Category = category;
|
|
||||||
Order = order;
|
|
||||||
MonthlyPrice = monthlyPrice;
|
|
||||||
YearlyPrice = yearlyPrice;
|
|
||||||
IsQuantityBased = isQuantityBased;
|
|
||||||
ImageUrl = imageUrl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,17 +14,5 @@ public class Service : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
// JSON olarak saklanacak
|
// JSON olarak saklanacak
|
||||||
public string[] Features { get; set; } = [];
|
public string[] Features { get; set; } = [];
|
||||||
|
|
||||||
protected Service() { }
|
|
||||||
|
|
||||||
public Service(Guid id, string icon, string title, string description, string type, string[] features)
|
|
||||||
: base(id)
|
|
||||||
{
|
|
||||||
Icon = icon;
|
|
||||||
Title = title;
|
|
||||||
Description = description;
|
|
||||||
Type = type;
|
|
||||||
Features = features;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,5 @@ namespace Kurs.Platform.Entities
|
||||||
public string Icon { get; set; }
|
public string Icon { get; set; }
|
||||||
|
|
||||||
public ICollection<ReportTemplate> ReportTemplates { get; set; }
|
public ICollection<ReportTemplate> ReportTemplates { get; set; }
|
||||||
|
|
||||||
public ReportCategory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ReportCategory(
|
|
||||||
Guid id,
|
|
||||||
string name,
|
|
||||||
string description,
|
|
||||||
string icon = null
|
|
||||||
) : base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
Description = description;
|
|
||||||
Icon = icon;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -855,8 +855,6 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
||||||
|
|
||||||
b.HasIndex(x => x.Name).IsUnique();
|
|
||||||
|
|
||||||
b.HasMany(x => x.Skills)
|
b.HasMany(x => x.Skills)
|
||||||
.WithOne(x => x.SkillType)
|
.WithOne(x => x.SkillType)
|
||||||
.HasForeignKey(x => x.SkillTypeId)
|
.HasForeignKey(x => x.SkillTypeId)
|
||||||
|
|
@ -897,7 +895,6 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
||||||
|
|
||||||
b.HasIndex(x => x.Name).IsUnique();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Uom>(b =>
|
builder.Entity<Uom>(b =>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251006121303_Initial")]
|
[Migration("20251006221403_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -3311,10 +3311,6 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(250)
|
.HasMaxLength(250)
|
||||||
.HasColumnType("nvarchar(250)");
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("ContactPerson")
|
b.Property<string>("ContactPerson")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
@ -4706,13 +4702,43 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("nvarchar(450)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<decimal>("Commission")
|
b.Property<decimal>("Commission")
|
||||||
.HasPrecision(5, 3)
|
.HasPrecision(5, 3)
|
||||||
.HasColumnType("decimal(5,3)");
|
.HasColumnType("decimal(5,3)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasMaxLength(32)
|
.HasMaxLength(32)
|
||||||
.HasColumnType("nvarchar(32)");
|
.HasColumnType("nvarchar(32)");
|
||||||
|
|
@ -5860,9 +5886,6 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("DSkillType", (string)null);
|
b.ToTable("DSkillType", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -6035,9 +6058,6 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("DUomCategory", (string)null);
|
b.ToTable("DUomCategory", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -719,7 +719,6 @@ namespace Kurs.Platform.Migrations
|
||||||
ContactPerson = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
ContactPerson = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||||
Email = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
Email = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||||
Address = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
|
Address = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
|
||||||
City = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
|
||||||
TaxOffice = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
TaxOffice = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||||
TaxNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
TaxNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||||
Phone1 = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
Phone1 = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||||
|
|
@ -1945,10 +1944,17 @@ namespace Kurs.Platform.Migrations
|
||||||
name: "WPaymentMethod",
|
name: "WPaymentMethod",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false),
|
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false),
|
||||||
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true)
|
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, 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),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -3767,23 +3773,11 @@ namespace Kurs.Platform.Migrations
|
||||||
table: "DSkillLevel",
|
table: "DSkillLevel",
|
||||||
column: "SkillTypeId");
|
column: "SkillTypeId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DSkillType_Name",
|
|
||||||
table: "DSkillType",
|
|
||||||
column: "Name",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_DUom_UomCategoryId",
|
name: "IX_DUom_UomCategoryId",
|
||||||
table: "DUom",
|
table: "DUom",
|
||||||
column: "UomCategoryId");
|
column: "UomCategoryId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DUomCategory_Name",
|
|
||||||
table: "DUomCategory",
|
|
||||||
column: "Name",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_OpenIddictApplications_ClientId",
|
name: "IX_OpenIddictApplications_ClientId",
|
||||||
table: "OpenIddictApplications",
|
table: "OpenIddictApplications",
|
||||||
|
|
@ -3308,10 +3308,6 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(250)
|
.HasMaxLength(250)
|
||||||
.HasColumnType("nvarchar(250)");
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("ContactPerson")
|
b.Property<string>("ContactPerson")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
@ -4703,13 +4699,43 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("nvarchar(450)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<decimal>("Commission")
|
b.Property<decimal>("Commission")
|
||||||
.HasPrecision(5, 3)
|
.HasPrecision(5, 3)
|
||||||
.HasColumnType("decimal(5,3)");
|
.HasColumnType("decimal(5,3)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasMaxLength(32)
|
.HasMaxLength(32)
|
||||||
.HasColumnType("nvarchar(32)");
|
.HasColumnType("nvarchar(32)");
|
||||||
|
|
@ -5857,9 +5883,6 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("DSkillType", (string)null);
|
b.ToTable("DSkillType", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -6032,9 +6055,6 @@ namespace Kurs.Platform.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("DUomCategory", (string)null);
|
b.ToTable("DUomCategory", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ export const tabVisibilityConfig: Record<string, string[]> = {
|
||||||
'legendSettings',
|
'legendSettings',
|
||||||
'exportSettings',
|
'exportSettings',
|
||||||
'crosshairOptions',
|
'crosshairOptions',
|
||||||
|
'subForms',
|
||||||
],
|
],
|
||||||
Form: [
|
Form: [
|
||||||
'details',
|
'details',
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ export const dynamicFetch = (
|
||||||
url: '/api/app/' + url,
|
url: '/api/app/' + url,
|
||||||
params,
|
params,
|
||||||
data,
|
data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof AxiosError) {
|
if (error instanceof AxiosError) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { GridBoxEditorComponent } from './editors/GridBoxEditorComponent'
|
||||||
import { TagBoxEditorComponent } from './editors/TagBoxEditorComponent'
|
import { TagBoxEditorComponent } from './editors/TagBoxEditorComponent'
|
||||||
import { RowMode, SimpleItemWithColData } from './types'
|
import { RowMode, SimpleItemWithColData } from './types'
|
||||||
import { PlatformEditorTypes } from '@/proxy/form/models'
|
import { PlatformEditorTypes } from '@/proxy/form/models'
|
||||||
import dxSelectBox from 'devextreme/ui/select_box'
|
|
||||||
|
|
||||||
const FormDevExpress = (props: {
|
const FormDevExpress = (props: {
|
||||||
listFormCode: string
|
listFormCode: string
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ const useGridData = (props: {
|
||||||
...editorOptions,
|
...editorOptions,
|
||||||
...(colData?.lookupDto?.dataSourceType
|
...(colData?.lookupDto?.dataSourceType
|
||||||
? {
|
? {
|
||||||
dataSource: getLookupDataSource(colData?.editorOptions, colData),
|
dataSource: getLookupDataSource(colData?.editorOptions, colData, formData),
|
||||||
valueExpr: colData?.lookupDto?.valueExpr?.toLowerCase(),
|
valueExpr: colData?.lookupDto?.valueExpr?.toLowerCase(),
|
||||||
displayExpr: colData?.lookupDto?.displayExpr?.toLowerCase(),
|
displayExpr: colData?.lookupDto?.displayExpr?.toLowerCase(),
|
||||||
}
|
}
|
||||||
|
|
@ -288,7 +288,7 @@ const useGridData = (props: {
|
||||||
})
|
})
|
||||||
setFormItems(items)
|
setFormItems(items)
|
||||||
setGridReady(true)
|
setGridReady(true)
|
||||||
}, [gridDto])
|
}, [gridDto, formData])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!gridReady) {
|
if (!gridReady) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const createLookupQueryDataSource = (
|
||||||
if (!isSubForm && listFormCode && !window.location.pathname.includes(listFormCode)) {
|
if (!isSubForm && listFormCode && !window.location.pathname.includes(listFormCode)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await dynamicFetch('list-form-select/lookup', 'POST', null, {
|
const response = await dynamicFetch('list-form-select/lookup', 'POST', null, {
|
||||||
listFormCode,
|
listFormCode,
|
||||||
|
|
@ -107,9 +106,17 @@ export const useLookupDataSource = ({
|
||||||
isSubForm?: boolean
|
isSubForm?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
const getLookupDataSource = useCallback(
|
const getLookupDataSource = useCallback(
|
||||||
(options: any, colData: any) => {
|
(options: any, colData: any, data: any) => {
|
||||||
const { lookupDto } = colData
|
const { lookupDto } = colData
|
||||||
const filters = []
|
const filters = []
|
||||||
|
|
||||||
|
//Eğer cascadeParentFields varsa ve data yoksa boş döneriz.
|
||||||
|
if (lookupDto.cascadeParentFields && !data) {
|
||||||
|
return {
|
||||||
|
store: [],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (lookupDto.cascadeParentFields) {
|
if (lookupDto.cascadeParentFields) {
|
||||||
if (lookupDto.dataSourceType == UiLookupDataSourceTypeEnum.StaticData) {
|
if (lookupDto.dataSourceType == UiLookupDataSourceTypeEnum.StaticData) {
|
||||||
filters.push([
|
filters.push([
|
||||||
|
|
@ -118,7 +125,6 @@ export const useLookupDataSource = ({
|
||||||
options?.data[lookupDto?.cascadeParentField],
|
options?.data[lookupDto?.cascadeParentField],
|
||||||
])
|
])
|
||||||
} else {
|
} else {
|
||||||
const data = options?.data ?? options
|
|
||||||
for (const cascadeParentField of lookupDto.cascadeParentFields.split(',')) {
|
for (const cascadeParentField of lookupDto.cascadeParentFields.split(',')) {
|
||||||
filters.push(data?.[cascadeParentField] ?? null)
|
filters.push(data?.[cascadeParentField] ?? null)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue