Genel değişiklikler

This commit is contained in:
Sedat ÖZTÜRK 2025-06-27 10:15:36 +03:00
parent 51b167cc6b
commit 7961e200b7
25 changed files with 1199 additions and 14323 deletions

View file

@ -17,8 +17,4 @@ public class LanguageDto : FullAuditedEntityDto<Guid>
[Required]
public bool IsEnabled { get; set; }
/// <summary> multiple select icin test amacli olarak eklendi
/// </summary>
public string MultipleCultures { get; set; }
}

View file

@ -10,8 +10,5 @@ public class Language : FullAuditedEntity<Guid>
public string DisplayName { get; set; }
public bool IsEnabled { get; set; }
public string TwoLetterISOLanguageName { get; set; }
/// <summary> multiple select icin test amacli olarak eklendi
/// </summary>
public string MultipleCultures { get; set; }
}

View file

@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Kurs.Platform.Contacts;
public class StateDto : AuditedEntityDto<Guid>
public class CityDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
public string Code { get; set; }

View file

@ -9,10 +9,10 @@ public class CountryDto : AuditedEntityDto<Guid>
public string Code { get; set; }
public string Name { get; set; }
public string CurrencyCode { get; set; }
public string PhoneCode { get; set; }
public int PhoneCode { get; set; }
public string TaxLabel { get; set; }
public bool ZipRequired { get; set; }
public bool StateRequired { get; set; }
public List<StateDto> States { get; set; }
public List<CityDto> Cities { get; set; }
}

View file

@ -135,7 +135,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
new() { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new() { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox },
new() { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
// new() { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
]
}
}),
@ -314,48 +314,40 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
Deny = false
}),
},
new()
{
ListFormCode = formLanguage.ListFormCode,
RoleId = null,
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "MultipleCultures",
Width = 250,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
{
AllowFiltering = true
}),
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'"
//TODO: Tasi grid editingform
// EditorTemplateTagBox = new EditorTagBoxDto()
// {
// ApplyValueMode = "useButtons",
// SearchEnabled = true,
// MaxDisplayedTags = 3
// }
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Languages.Language + ".Create",
R = AppCodes.Languages.Language,
U = AppCodes.Languages.Language + ".Update",
E = true,
Deny = false
}),
},
// new()
// {
// ListFormCode = formLanguage.ListFormCode,
// RoleId = null,
// UserId = null,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "MultipleCultures",
// Width = 250,
// ListOrderNo = 6,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
// {
// AllowFiltering = true
// }),
// LookupJson = JsonSerializer.Serialize(new LookupDto
// {
// DataSourceType = UiLookupDataSourceTypeEnum.Query,
// DisplayExpr = "Name",
// ValueExpr = "Key",
// LookupQuery = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'"
// }),
// PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
// {
// C = AppCodes.Languages.Language + ".Create",
// R = AppCodes.Languages.Language,
// U = AppCodes.Languages.Language + ".Update",
// E = true,
// Deny = false
// }),
// },
]);
}
#endregion
@ -448,25 +440,26 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =
[
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=2, DataField="InstitutionName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=2, DataField="InstitutionName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=3, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order=4, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=4, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=5, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order=6, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order=7, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=7, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=8, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
]
},
new() { Order=2, ColCount=1, ColSpan=2, ItemType="group", Items =
[
new EditingFormItemDto { Order=1, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=2, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=3, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=4, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=6, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=7, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order=1, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=2, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=3, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=4, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=5, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=6, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=7, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=8, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
]
}
}),
@ -701,13 +694,20 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "City",
FieldName = "Country",
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 = $"SELECT \"{DbTablePrefix}Country\".\"Code\" AS \"Key\", \"{DbTablePrefix}Country\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}Country\" ORDER BY \"{DbTablePrefix}Country\".\"Name\""
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = TenantManagementPermissions.Tenants.Create,
@ -720,7 +720,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
IsPivot = true
})
},
},
new ListFormField
{
ListFormCode = listFormTenants.ListFormCode,
@ -728,7 +728,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "District",
FieldName = "City",
Width = 100,
ListOrderNo = 9,
Visible = true,
@ -755,7 +755,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PostalCode",
FieldName = "District",
Width = 100,
ListOrderNo = 10,
Visible = true,
@ -782,8 +782,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Email",
Width = 170,
FieldName = "PostalCode",
Width = 100,
ListOrderNo = 11,
Visible = true,
IsActive = true,
@ -809,7 +809,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Website",
FieldName = "Email",
Width = 170,
ListOrderNo = 12,
Visible = true,
@ -836,8 +836,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Mobile",
Width = 100,
FieldName = "Website",
Width = 170,
ListOrderNo = 13,
Visible = true,
IsActive = true,
@ -863,7 +863,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Phone",
FieldName = "Mobile",
Width = 100,
ListOrderNo = 14,
Visible = true,
@ -890,7 +890,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Fax",
FieldName = "Phone",
Width = 100,
ListOrderNo = 15,
Visible = true,
@ -910,6 +910,33 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsPivot = true
})
},
new ListFormField
{
ListFormCode = listFormTenants.ListFormCode,
RoleId = null,
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Fax",
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,
Deny = false
}),
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
{
IsPivot = true
})
},
new ListFormField
{
ListFormCode = listFormTenants.ListFormCode,
@ -919,7 +946,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SourceDbType = DbType.Boolean,
FieldName = "IsActive",
Width = 100,
ListOrderNo = 16,
ListOrderNo = 17,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -1903,14 +1930,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
//["CultureName","UiCultureName","DisplayName","IsEnabled","MultipleCultures"]
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=
[
new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
// new EditingFormItemDto { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
]
}
}),
@ -2100,52 +2126,52 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsPivot = true
})
},
new ListFormField
{
ListFormCode = listFormLanguages.ListFormCode,
RoleId = null,
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "MultipleCultures",
Width = 250,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
{
AllowFiltering = true
}),
LookupJson = JsonSerializer.Serialize(new LookupDto {
// new ListFormField
// {
// ListFormCode = listFormLanguages.ListFormCode,
// RoleId = null,
// UserId = null,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "MultipleCultures",
// Width = 250,
// ListOrderNo = 6,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
// {
// AllowFiltering = true
// }),
// LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = lookupQueryCulture
// DataSourceType = UiLookupDataSourceTypeEnum.Query,
// DisplayExpr = "Name",
// ValueExpr = "Key",
// LookupQuery = lookupQueryCulture
//TODO: Tasi grid editingform
// EditorTemplateTagBox = new EditorTagBoxDto()
// {
// ApplyValueMode = "useButtons",
// SearchEnabled = true,
// MaxDisplayedTags = 3
// }
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Languages.Language + ".Create",
R = AppCodes.Languages.Language,
U = AppCodes.Languages.Language + ".Update",
E = true,
Deny = false
}),
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
{
IsPivot = true
})
},
// //TODO: Tasi grid editingform
// // EditorTemplateTagBox = new EditorTagBoxDto()
// // {
// // ApplyValueMode = "useButtons",
// // SearchEnabled = true,
// // MaxDisplayedTags = 3
// // }
// }),
// PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
// {
// C = AppCodes.Languages.Language + ".Create",
// R = AppCodes.Languages.Language,
// U = AppCodes.Languages.Language + ".Update",
// E = true,
// Deny = false
// }),
// PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
// {
// IsPivot = true
// })
// },
});
#endregion
@ -7730,11 +7756,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
[
new EditingFormItemDto { Order=1, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=2, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=3, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=4, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=6, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=7, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=3, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=4, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=5, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=6, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=7, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order=8, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
]
}
}),
@ -8004,18 +8031,25 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "City",
FieldName = "Country",
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 = $"SELECT \"{DbTablePrefix}Country\".\"Code\" AS \"Key\", \"{DbTablePrefix}Country\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}Country\" ORDER BY \"{DbTablePrefix}Country\".\"Name\""
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Branches + ".Create",
R = AppCodes.Branches,
U = AppCodes.Branches + ".Update",
C = TenantManagementPermissions.Tenants.Create,
R = TenantManagementPermissions.Tenants.Default,
U = TenantManagementPermissions.Tenants.Update,
E = true,
Deny = false
}),
@ -8023,7 +8057,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
IsPivot = true
})
},
},
new ListFormField
{
ListFormCode = listFormBranches.ListFormCode,
@ -8031,7 +8065,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "District",
FieldName = "City",
Width = 100,
ListOrderNo = 9,
Visible = true,
@ -8058,7 +8092,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PostalCode",
FieldName = "District",
Width = 100,
ListOrderNo = 10,
Visible = true,
@ -8085,8 +8119,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Email",
Width = 170,
FieldName = "PostalCode",
Width = 100,
ListOrderNo = 11,
Visible = true,
IsActive = true,
@ -8112,7 +8146,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Website",
FieldName = "Email",
Width = 170,
ListOrderNo = 12,
Visible = true,
@ -8139,8 +8173,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Mobile",
Width = 100,
FieldName = "Website",
Width = 170,
ListOrderNo = 13,
Visible = true,
IsActive = true,
@ -8166,7 +8200,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Phone",
FieldName = "Mobile",
Width = 100,
ListOrderNo = 14,
Visible = true,
@ -8193,7 +8227,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Fax",
FieldName = "Phone",
Width = 100,
ListOrderNo = 15,
Visible = true,
@ -8213,6 +8247,33 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsPivot = true
})
},
new ListFormField
{
ListFormCode = listFormBranches.ListFormCode,
RoleId = null,
UserId = null,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Fax",
Width = 100,
ListOrderNo = 16,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Branches + ".Create",
R = AppCodes.Branches,
U = AppCodes.Branches + ".Update",
E = true,
Deny = false
}),
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
{
IsPivot = true
})
},
new ListFormField
{
ListFormCode = listFormBranches.ListFormCode,
@ -8222,7 +8283,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SourceDbType = DbType.Boolean,
FieldName = "IsActive",
Width = 100,
ListOrderNo = 16,
ListOrderNo = 17,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -9775,9 +9836,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
[
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField = "CurrencyCode", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField = "TaxLabel", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 7, DataField = "ZipRequired", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 8, DataField = "StateRequired", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox }
@ -9887,6 +9948,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = false,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = $"SELECT \"{DbTablePrefix}CountryGroup\".\"Name\" AS \"Key\", \"{DbTablePrefix}CountryGroup\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}CountryGroup\" GROUP BY \"{DbTablePrefix}CountryGroup\".\"Name\" ORDER BY \"{DbTablePrefix}CountryGroup\".\"Name\""
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Definitions.Country + ".Create",
@ -9921,7 +9989,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
ListFormCode = listFormCountry.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
SourceDbType = DbType.Int32,
FieldName = "PhoneCode",
Width = 80,
ListOrderNo = 6,
@ -10021,7 +10089,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsOrganizationUnit = false,
Description = AppCodes.Definitions.State,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = SelectCommandByTableName("State"),
SelectCommand = SelectCommandByTableName("City"),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = "\"IsDeleted\" = 'false'",
@ -10043,7 +10111,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
D = AppCodes.Definitions.State + ".Delete",
E = AppCodes.Definitions.State + ".Export"
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}PState\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteCommand = $"UPDATE \"{DbTablePrefix}PCity\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
@ -10099,7 +10167,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "CountryCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }
new EditingFormItemDto { Order = 3, DataField = "CountryCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }
]
}
}),
@ -10206,6 +10274,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
IsActive = true,
IsDeleted = false,
AllowSearch = false,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = $"SELECT \"{DbTablePrefix}Country\".\"Code\" AS \"Key\", \"{DbTablePrefix}Country\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}Country\" ORDER BY \"{DbTablePrefix}Country\".\"Name\""
}),
ValidationRuleJson = JsonSerializer.Serialize(new[]
{
new ValidationRuleDto { Type = "required" }

View file

@ -43,7 +43,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<Currency, Guid> _currencyRepository;
private readonly IRepository<CountryGroup, Guid> _countryGroupRepository;
private readonly IRepository<Country, Guid> _countryRepository;
private readonly IRepository<State, Guid> _stateRepository;
private readonly IRepository<City, Guid> _stateRepository;
private readonly IRepository<SkillType, Guid> _skillTypeRepository;
private readonly IRepository<Skill, Guid> _skillRepository;
private readonly IRepository<SkillLevel, Guid> _skillLevelRepository;
@ -73,7 +73,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<Currency, Guid> currencyRepository,
IRepository<CountryGroup, Guid> countryGroupRepository,
IRepository<Country, Guid> countryRepository,
IRepository<State, Guid> stateRepository,
IRepository<City, Guid> stateRepository,
IRepository<SkillType, Guid> skillTypeRepository,
IRepository<Skill, Guid> skillRepository,
IRepository<SkillLevel, Guid> skillLevelRepository,
@ -235,7 +235,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
DisplayName = item.DisplayName,
IsEnabled = item.IsEnabled,
TwoLetterISOLanguageName = new CultureInfo(item.CultureName).TwoLetterISOLanguageName,
MultipleCultures = item.MultipleCultures,
});
}
@ -471,13 +470,13 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
}
}
foreach (var item in items.States)
foreach (var item in items.Cities)
{
var exists = await _stateRepository.AnyAsync(x => x.Name == item.Name && x.CountryCode == item.CountryCode);
if (!exists)
{
await _stateRepository.InsertAsync(new State
await _stateRepository.InsertAsync(new City
{
Code = item.Code,
Name = item.Name,

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@ public class SeederDto
public List<CurrencySeedDto> Currencies { get; set; }
public List<CountryGroupSeedDto> CountryGroups { get; set; }
public List<CountrySeedDto> Countries { get; set; }
public List<StateSeedDto> States { get; set; }
public List<CitySeedDto> Cities { get; set; }
public List<SkillTypeSeedDto> SkillTypes { get; set; }
public List<SkillSeedDto> Skills { get; set; }
public List<SkillLevelSeedDto> SkillLevels { get; set; }
@ -159,12 +159,12 @@ public class CountrySeedDto
public string Name { get; set; }
public string Code { get; set; }
public string CurrencyCode { get; set; }
public string PhoneCode { get; set; }
public int PhoneCode { get; set; }
public string TaxLabel { get; set; }
public string GroupName { get; set; }
}
public class StateSeedDto
public class CitySeedDto
{
public string Name { get; set; }
public string Code { get; set; }

View file

@ -32,8 +32,9 @@ public static class PlatformConsts
public const string TaxOffice = "TaxOffice";
public const string Address = "Address";
public const string Address2 = "Address2";
public const string District = "District";
public const string Country = "Country";
public const string City = "City";
public const string District = "District";
public const string PostalCode = "PostalCode";
public const string Phone = "Phone";
public const string Mobile = "Mobile";
@ -354,7 +355,7 @@ public static class PlatformConsts
public const string Currency = "list-currency";
public const string CountryGroup = "list-countryGroup";
public const string Country = "list-country";
public const string State = "list-state";
public const string State = "list-city";
public const string SkillType = "list-skillType";
public const string UomCategory = "list-uomCategory";
public const string ListformField = "list-listformfield";

View file

@ -1,6 +1,5 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using System.Collections.Generic;
namespace Kurs.Platform.Entities;
@ -14,6 +13,7 @@ public class Branch : FullAuditedEntity<Guid>
public string Address { get; set; }
public string Address2 { get; set; }
public string District { get; set; }
public string Country { get; set; }
public string City { get; set; }
public string PostalCode { get; set; }
public long? Phone { get; set; }

View file

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Kurs.Platform.Entities;
public class State : FullAuditedEntity<Guid>
public class City : FullAuditedEntity<Guid>
{
[Required]
[MaxLength(128)]

View file

@ -21,8 +21,7 @@ public class Country : FullAuditedEntity<Guid>
[MaxLength(8)]
public string CurrencyCode { get; set; }
[MaxLength(16)]
public string PhoneCode { get; set; }
public int PhoneCode { get; set; }
[MaxLength(64)]
public string TaxLabel { get; set; }
@ -31,7 +30,7 @@ public class Country : FullAuditedEntity<Guid>
public bool StateRequired { get; set; }
public ICollection<State> States { get; set; }
public ICollection<City> Cities { get; set; }
}
public class CountryGroup : FullAuditedEntity<Guid>

View file

@ -74,11 +74,20 @@ public static class AbpTenantExtensions
{
tenant.SetProperty(PlatformConsts.Tenants.City, city);
}
public static string GetCityState(this Tenant tenant)
public static string GetCity(this Tenant tenant)
{
return tenant.GetProperty<string>(PlatformConsts.Tenants.City);
}
public static void SetCountry(this Tenant tenant, string country)
{
tenant.SetProperty(PlatformConsts.Tenants.Country, country);
}
public static string GetCountry(this Tenant tenant)
{
return tenant.GetProperty<string>(PlatformConsts.Tenants.Country);
}
public static void SetPostalCode(this Tenant tenant, string postalCode)
{
tenant.SetProperty(PlatformConsts.Tenants.PostalCode, postalCode);

View file

@ -51,7 +51,7 @@ public class PlatformDbContext :
public DbSet<BankAccount> BankAccounts { get; set; }
public DbSet<CountryGroup> CountryGroups { get; set; }
public DbSet<Country> Countries { get; set; }
public DbSet<State> States { get; set; }
public DbSet<City> Cities { get; set; }
public DbSet<SkillType> SkillTypes { get; set; }
public DbSet<Skill> Skills { get; set; }
public DbSet<SkillLevel> SkillLevels { get; set; }
@ -332,7 +332,7 @@ public class PlatformDbContext :
b.HasIndex(x => x.Code).IsUnique();
b.HasIndex(x => x.GroupName);
b.HasMany(x => x.States)
b.HasMany(x => x.Cities)
.WithOne(x => x.Country)
.HasForeignKey(x => x.CountryCode)
.HasPrincipalKey(x => x.Code)
@ -345,9 +345,9 @@ public class PlatformDbContext :
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<State>(b =>
builder.Entity<City>(b =>
{
b.ToTable(PlatformConsts.DbTablePrefix + nameof(State), PlatformConsts.DbSchema);
b.ToTable(PlatformConsts.DbTablePrefix + nameof(City), PlatformConsts.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(128);

View file

@ -102,7 +102,7 @@ public static class PlatformEfCoreEntityExtensionMappings
ObjectExtensionManager.Instance
.MapEfCoreProperty<Tenant, string>(
PlatformConsts.Tenants.District,
PlatformConsts.Tenants.Country,
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128).HasDefaultValue(null);
@ -118,6 +118,15 @@ public static class PlatformEfCoreEntityExtensionMappings
}
);
ObjectExtensionManager.Instance
.MapEfCoreProperty<Tenant, string>(
PlatformConsts.Tenants.District,
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128).HasDefaultValue(null);
}
);
ObjectExtensionManager.Instance
.MapEfCoreProperty<Tenant, string>(
PlatformConsts.Tenants.PostalCode,

View file

@ -1,238 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class BranchEntity : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsBranch",
table: "PListForm",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsBranch",
table: "PChart",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "Address",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Address2",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "City",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "District",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Email",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "Fax",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "InstitutionName",
table: "AbpTenants",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "Mobile",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<long>(
name: "Phone",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "PostalCode",
table: "AbpTenants",
type: "nvarchar(10)",
maxLength: 10,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "TaxOffice",
table: "AbpTenants",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "VknTckn",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "Website",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.CreateTable(
name: "PBranch",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
VknTckn = table.Column<long>(type: "bigint", nullable: false),
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Phone = table.Column<long>(type: "bigint", nullable: true),
Mobile = table.Column<long>(type: "bigint", nullable: false),
Fax = table.Column<long>(type: "bigint", nullable: true),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", 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 =>
{
table.PrimaryKey("PK_PBranch", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBranchUsers",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PBranchUsers", x => new { x.UserId, x.BranchId });
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PBranch");
migrationBuilder.DropTable(
name: "PBranchUsers");
migrationBuilder.DropColumn(
name: "IsBranch",
table: "PListForm");
migrationBuilder.DropColumn(
name: "IsBranch",
table: "PChart");
migrationBuilder.DropColumn(
name: "Address",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Address2",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "City",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "District",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Email",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Fax",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "InstitutionName",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Mobile",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Phone",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "PostalCode",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "TaxOffice",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "VknTckn",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Website",
table: "AbpTenants");
}
}
}

View file

@ -1,117 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class AddBlog : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PBlogCategories",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Slug = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
DisplayOrder = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
PostCount = table.Column<int>(type: "int", nullable: false),
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 =>
{
table.PrimaryKey("PK_PBlogCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBlogPosts",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ContentTr = table.Column<string>(type: "nvarchar(max)", nullable: false),
ContentEn = table.Column<string>(type: "nvarchar(max)", nullable: false),
Summary = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
CoverImage = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
ReadTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ViewCount = table.Column<int>(type: "int", nullable: false),
LikeCount = table.Column<int>(type: "int", nullable: false),
CommentCount = table.Column<int>(type: "int", nullable: false),
IsPublished = table.Column<bool>(type: "bit", nullable: false),
PublishedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
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 =>
{
table.PrimaryKey("PK_PBlogPosts", x => x.Id);
table.ForeignKey(
name: "FK_PBlogPosts_PBlogCategories_CategoryId",
column: x => x.CategoryId,
principalTable: "PBlogCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_PBlogCategories_Slug",
table: "PBlogCategories",
column: "Slug");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_CategoryId",
table: "PBlogPosts",
column: "CategoryId");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_IsPublished",
table: "PBlogPosts",
column: "IsPublished");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_PublishedAt",
table: "PBlogPosts",
column: "PublishedAt");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_Slug",
table: "PBlogPosts",
column: "Slug");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PBlogPosts");
migrationBuilder.DropTable(
name: "PBlogCategories");
}
}
}

View file

@ -1,168 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class AddForum : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PForumCategories",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Slug = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
DisplayOrder = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
IsLocked = table.Column<bool>(type: "bit", nullable: false),
TopicCount = table.Column<int>(type: "int", nullable: false),
PostCount = table.Column<int>(type: "int", nullable: false),
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PForumTopics",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ViewCount = table.Column<int>(type: "int", nullable: false),
ReplyCount = table.Column<int>(type: "int", nullable: false),
LikeCount = table.Column<int>(type: "int", nullable: false),
IsPinned = table.Column<bool>(type: "bit", nullable: false),
IsLocked = table.Column<bool>(type: "bit", nullable: false),
IsSolved = table.Column<bool>(type: "bit", nullable: false),
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumTopics", x => x.Id);
table.ForeignKey(
name: "FK_PForumTopics_PForumCategories_CategoryId",
column: x => x.CategoryId,
principalTable: "PForumCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "PForumPosts",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TopicId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
LikeCount = table.Column<int>(type: "int", nullable: false),
IsAcceptedAnswer = table.Column<bool>(type: "bit", nullable: false),
ParentPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumPosts", x => x.Id);
table.ForeignKey(
name: "FK_PForumPosts_PForumPosts_ParentPostId",
column: x => x.ParentPostId,
principalTable: "PForumPosts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_PForumPosts_PForumTopics_TopicId",
column: x => x.TopicId,
principalTable: "PForumTopics",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_PForumCategories_DisplayOrder",
table: "PForumCategories",
column: "DisplayOrder");
migrationBuilder.CreateIndex(
name: "IX_PForumPosts_ParentPostId",
table: "PForumPosts",
column: "ParentPostId");
migrationBuilder.CreateIndex(
name: "IX_PForumPosts_TopicId",
table: "PForumPosts",
column: "TopicId");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_CategoryId",
table: "PForumTopics",
column: "CategoryId");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_IsPinned",
table: "PForumTopics",
column: "IsPinned");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_LastPostDate",
table: "PForumTopics",
column: "LastPostDate");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PForumPosts");
migrationBuilder.DropTable(
name: "PForumTopics");
migrationBuilder.DropTable(
name: "PForumCategories");
}
}
}

View file

@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20250623190205_AddForum")]
partial class AddForum
[Migration("20250627070749_NewTables")]
partial class NewTables
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -174,9 +174,6 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("MultipleCultures")
.HasColumnType("nvarchar(max)");
b.Property<string>("TwoLetterISOLanguageName")
.HasColumnType("nvarchar(max)");
@ -946,8 +943,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
@ -1047,8 +1043,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(512)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<string>("Title")
.IsRequired()
@ -1088,6 +1083,9 @@ namespace Kurs.Platform.Migrations
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<string>("Country")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -1317,6 +1315,63 @@ namespace Kurs.Platform.Migrations
b.ToTable("PChart", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.City", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
b.Property<string>("CountryCode")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
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>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.HasIndex("CountryCode", "Code")
.IsUnique()
.HasFilter("[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
b.ToTable("PCity", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.Property<Guid>("Id")
@ -1370,9 +1425,9 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("PhoneCode")
b.Property<int>("PhoneCode")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
.HasColumnType("int");
b.Property<bool>("StateRequired")
.HasColumnType("bit");
@ -2266,63 +2321,6 @@ namespace Kurs.Platform.Migrations
b.ToTable("PSector", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.State", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
b.Property<string>("CountryCode")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
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>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.HasIndex("CountryCode", "Code")
.IsUnique()
.HasFilter("[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
b.ToTable("PState", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
{
b.Property<Guid>("Id")
@ -2515,8 +2513,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<int>("TopicCount")
.HasColumnType("int");
@ -2583,8 +2580,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<Guid>("TopicId")
.HasColumnType("uniqueidentifier");
@ -2674,8 +2670,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("int");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<string>("Title")
.IsRequired()
@ -4644,6 +4639,10 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Country")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -4797,6 +4796,17 @@ namespace Kurs.Platform.Migrations
b.Navigation("Category");
});
modelBuilder.Entity("Kurs.Platform.Entities.City", b =>
{
b.HasOne("Kurs.Platform.Entities.Country", "Country")
.WithMany("Cities")
.HasForeignKey("CountryCode")
.HasPrincipalKey("Code")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("Country");
});
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.HasOne("Kurs.Platform.Entities.CountryGroup", null)
@ -4826,17 +4836,6 @@ namespace Kurs.Platform.Migrations
.IsRequired();
});
modelBuilder.Entity("Kurs.Platform.Entities.State", b =>
{
b.HasOne("Kurs.Platform.Entities.Country", "Country")
.WithMany("States")
.HasForeignKey("CountryCode")
.HasPrincipalKey("Code")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("Country");
});
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
{
b.HasOne("Kurs.Platform.Entities.UomCategory", "UomCategory")
@ -5046,7 +5045,7 @@ namespace Kurs.Platform.Migrations
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.Navigation("States");
b.Navigation("Cities");
});
modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b =>

View file

@ -6,11 +6,127 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class NewDefitinationTables : Migration
public partial class NewTables : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MultipleCultures",
table: "PLanguage");
migrationBuilder.AddColumn<bool>(
name: "IsBranch",
table: "PListForm",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsBranch",
table: "PChart",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "Address",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Address2",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "City",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Country",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "District",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Email",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "Fax",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "InstitutionName",
table: "AbpTenants",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "Mobile",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<long>(
name: "Phone",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "PostalCode",
table: "AbpTenants",
type: "nvarchar(10)",
maxLength: 10,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "TaxOffice",
table: "AbpTenants",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<long>(
name: "VknTckn",
table: "AbpTenants",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<string>(
name: "Website",
table: "AbpTenants",
type: "nvarchar(256)",
maxLength: 256,
nullable: true);
migrationBuilder.CreateTable(
name: "Banks",
columns: table => new
@ -39,6 +155,81 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_Banks", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBlogCategories",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Slug = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
DisplayOrder = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
PostCount = table.Column<int>(type: "int", nullable: false),
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 =>
{
table.PrimaryKey("PK_PBlogCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBranch",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
VknTckn = table.Column<long>(type: "bigint", nullable: false),
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
Country = table.Column<string>(type: "nvarchar(max)", nullable: true),
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Phone = table.Column<long>(type: "bigint", nullable: true),
Mobile = table.Column<long>(type: "bigint", nullable: false),
Fax = table.Column<long>(type: "bigint", nullable: true),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", 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 =>
{
table.PrimaryKey("PK_PBranch", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBranchUsers",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PBranchUsers", x => new { x.UserId, x.BranchId });
});
migrationBuilder.CreateTable(
name: "PContactTag",
columns: table => new
@ -123,6 +314,38 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_PCurrency", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PForumCategories",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Slug = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
DisplayOrder = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
IsLocked = table.Column<bool>(type: "bit", nullable: false),
TopicCount = table.Column<int>(type: "int", nullable: false),
PostCount = table.Column<int>(type: "int", nullable: false),
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PSector",
columns: table => new
@ -182,6 +405,47 @@ namespace Kurs.Platform.Migrations
table.UniqueConstraint("AK_PUomCategory_Name", x => x.Name);
});
migrationBuilder.CreateTable(
name: "PBlogPosts",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ContentTr = table.Column<string>(type: "nvarchar(max)", nullable: false),
ContentEn = table.Column<string>(type: "nvarchar(max)", nullable: false),
Summary = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
CoverImage = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
ReadTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ViewCount = table.Column<int>(type: "int", nullable: false),
LikeCount = table.Column<int>(type: "int", nullable: false),
CommentCount = table.Column<int>(type: "int", nullable: false),
IsPublished = table.Column<bool>(type: "bit", nullable: false),
PublishedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
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 =>
{
table.PrimaryKey("PK_PBlogPosts", x => x.Id);
table.ForeignKey(
name: "FK_PBlogPosts_PBlogCategories_CategoryId",
column: x => x.CategoryId,
principalTable: "PBlogCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "PCountry",
columns: table => new
@ -191,7 +455,7 @@ namespace Kurs.Platform.Migrations
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
GroupName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
CurrencyCode = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true),
PhoneCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
PhoneCode = table.Column<int>(type: "int", maxLength: 16, nullable: false),
TaxLabel = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ZipRequired = table.Column<bool>(type: "bit", nullable: false),
StateRequired = table.Column<bool>(type: "bit", nullable: false),
@ -250,6 +514,46 @@ namespace Kurs.Platform.Migrations
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "PForumTopics",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ViewCount = table.Column<int>(type: "int", nullable: false),
ReplyCount = table.Column<int>(type: "int", nullable: false),
LikeCount = table.Column<int>(type: "int", nullable: false),
IsPinned = table.Column<bool>(type: "bit", nullable: false),
IsLocked = table.Column<bool>(type: "bit", nullable: false),
IsSolved = table.Column<bool>(type: "bit", nullable: false),
LastPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LastPostUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastPostUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumTopics", x => x.Id);
table.ForeignKey(
name: "FK_PForumTopics_PForumCategories_CategoryId",
column: x => x.CategoryId,
principalTable: "PForumCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "PSkill",
columns: table => new
@ -335,7 +639,7 @@ namespace Kurs.Platform.Migrations
});
migrationBuilder.CreateTable(
name: "PState",
name: "PCity",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
@ -352,15 +656,53 @@ namespace Kurs.Platform.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_PState", x => x.Id);
table.PrimaryKey("PK_PCity", x => x.Id);
table.ForeignKey(
name: "FK_PState_PCountry_CountryCode",
name: "FK_PCity_PCountry_CountryCode",
column: x => x.CountryCode,
principalTable: "PCountry",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PForumPosts",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TopicId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuthorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
LikeCount = table.Column<int>(type: "int", nullable: false),
IsAcceptedAnswer = table.Column<bool>(type: "bit", nullable: false),
ParentPostId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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 =>
{
table.PrimaryKey("PK_PForumPosts", x => x.Id);
table.ForeignKey(
name: "FK_PForumPosts_PForumPosts_ParentPostId",
column: x => x.ParentPostId,
principalTable: "PForumPosts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_PForumPosts_PForumTopics_TopicId",
column: x => x.TopicId,
principalTable: "PForumTopics",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_BankAccounts_BankId",
table: "BankAccounts",
@ -371,6 +713,38 @@ namespace Kurs.Platform.Migrations
table: "BankAccounts",
column: "CurrencyId");
migrationBuilder.CreateIndex(
name: "IX_PBlogCategories_Slug",
table: "PBlogCategories",
column: "Slug");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_CategoryId",
table: "PBlogPosts",
column: "CategoryId");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_IsPublished",
table: "PBlogPosts",
column: "IsPublished");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_PublishedAt",
table: "PBlogPosts",
column: "PublishedAt");
migrationBuilder.CreateIndex(
name: "IX_PBlogPosts_Slug",
table: "PBlogPosts",
column: "Slug");
migrationBuilder.CreateIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity",
columns: new[] { "CountryCode", "Code" },
unique: true,
filter: "[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_PCountry_Code",
table: "PCountry",
@ -388,6 +762,36 @@ namespace Kurs.Platform.Migrations
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PForumCategories_DisplayOrder",
table: "PForumCategories",
column: "DisplayOrder");
migrationBuilder.CreateIndex(
name: "IX_PForumPosts_ParentPostId",
table: "PForumPosts",
column: "ParentPostId");
migrationBuilder.CreateIndex(
name: "IX_PForumPosts_TopicId",
table: "PForumPosts",
column: "TopicId");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_CategoryId",
table: "PForumTopics",
column: "CategoryId");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_IsPinned",
table: "PForumTopics",
column: "IsPinned");
migrationBuilder.CreateIndex(
name: "IX_PForumTopics_LastPostDate",
table: "PForumTopics",
column: "LastPostDate");
migrationBuilder.CreateIndex(
name: "IX_PSkill_SkillTypeId",
table: "PSkill",
@ -404,13 +808,6 @@ namespace Kurs.Platform.Migrations
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PState_CountryCode_Code",
table: "PState",
columns: new[] { "CountryCode", "Code" },
unique: true,
filter: "[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_PUom_CategoryName",
table: "PUom",
@ -429,12 +826,27 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable(
name: "BankAccounts");
migrationBuilder.DropTable(
name: "PBlogPosts");
migrationBuilder.DropTable(
name: "PBranch");
migrationBuilder.DropTable(
name: "PBranchUsers");
migrationBuilder.DropTable(
name: "PCity");
migrationBuilder.DropTable(
name: "PContactTag");
migrationBuilder.DropTable(
name: "PContactTitle");
migrationBuilder.DropTable(
name: "PForumPosts");
migrationBuilder.DropTable(
name: "PSector");
@ -444,9 +856,6 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable(
name: "PSkillLevel");
migrationBuilder.DropTable(
name: "PState");
migrationBuilder.DropTable(
name: "PUom");
@ -457,16 +866,95 @@ namespace Kurs.Platform.Migrations
name: "PCurrency");
migrationBuilder.DropTable(
name: "PSkillType");
name: "PBlogCategories");
migrationBuilder.DropTable(
name: "PCountry");
migrationBuilder.DropTable(
name: "PForumTopics");
migrationBuilder.DropTable(
name: "PSkillType");
migrationBuilder.DropTable(
name: "PUomCategory");
migrationBuilder.DropTable(
name: "PCountryGroup");
migrationBuilder.DropTable(
name: "PForumCategories");
migrationBuilder.DropColumn(
name: "IsBranch",
table: "PListForm");
migrationBuilder.DropColumn(
name: "IsBranch",
table: "PChart");
migrationBuilder.DropColumn(
name: "Address",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Address2",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "City",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Country",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "District",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Email",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Fax",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "InstitutionName",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Mobile",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Phone",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "PostalCode",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "TaxOffice",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "VknTckn",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Website",
table: "AbpTenants");
migrationBuilder.AddColumn<string>(
name: "MultipleCultures",
table: "PLanguage",
type: "nvarchar(max)",
nullable: true);
}
}
}

View file

@ -171,9 +171,6 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("MultipleCultures")
.HasColumnType("nvarchar(max)");
b.Property<string>("TwoLetterISOLanguageName")
.HasColumnType("nvarchar(max)");
@ -943,8 +940,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
@ -1044,8 +1040,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(512)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<string>("Title")
.IsRequired()
@ -1085,6 +1080,9 @@ namespace Kurs.Platform.Migrations
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<string>("Country")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -1314,6 +1312,63 @@ namespace Kurs.Platform.Migrations
b.ToTable("PChart", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.City", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
b.Property<string>("CountryCode")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
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>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.HasIndex("CountryCode", "Code")
.IsUnique()
.HasFilter("[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
b.ToTable("PCity", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.Property<Guid>("Id")
@ -1367,9 +1422,9 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("PhoneCode")
b.Property<int>("PhoneCode")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
.HasColumnType("int");
b.Property<bool>("StateRequired")
.HasColumnType("bit");
@ -2263,63 +2318,6 @@ namespace Kurs.Platform.Migrations
b.ToTable("PSector", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.State", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
b.Property<string>("CountryCode")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
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>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.HasIndex("CountryCode", "Code")
.IsUnique()
.HasFilter("[CountryCode] IS NOT NULL AND [Code] IS NOT NULL");
b.ToTable("PState", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
{
b.Property<Guid>("Id")
@ -2512,8 +2510,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<int>("TopicCount")
.HasColumnType("int");
@ -2580,8 +2577,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<Guid>("TopicId")
.HasColumnType("uniqueidentifier");
@ -2671,8 +2667,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("int");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
.HasColumnType("uniqueidentifier");
b.Property<string>("Title")
.IsRequired()
@ -4641,6 +4636,10 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Country")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -4794,6 +4793,17 @@ namespace Kurs.Platform.Migrations
b.Navigation("Category");
});
modelBuilder.Entity("Kurs.Platform.Entities.City", b =>
{
b.HasOne("Kurs.Platform.Entities.Country", "Country")
.WithMany("Cities")
.HasForeignKey("CountryCode")
.HasPrincipalKey("Code")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("Country");
});
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.HasOne("Kurs.Platform.Entities.CountryGroup", null)
@ -4823,17 +4833,6 @@ namespace Kurs.Platform.Migrations
.IsRequired();
});
modelBuilder.Entity("Kurs.Platform.Entities.State", b =>
{
b.HasOne("Kurs.Platform.Entities.Country", "Country")
.WithMany("States")
.HasForeignKey("CountryCode")
.HasPrincipalKey("Code")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("Country");
});
modelBuilder.Entity("Kurs.Platform.Entities.Uom", b =>
{
b.HasOne("Kurs.Platform.Entities.UomCategory", "UomCategory")
@ -5043,7 +5042,7 @@ namespace Kurs.Platform.Migrations
modelBuilder.Entity("Kurs.Platform.Entities.Country", b =>
{
b.Navigation("States");
b.Navigation("Cities");
});
modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b =>

View file

@ -22,7 +22,7 @@ const FormDevExpress = (props: {
const { mode, refForm, formData, formItems, setFormData } = props
return (
<form className={DX_CLASSNAMES}>
<form className={`${DX_CLASSNAMES} p-2`}>
<FormDx
ref={refForm}
formData={formData}