Entity Problemleri

This commit is contained in:
Sedat Öztürk 2025-08-20 22:26:08 +03:00
parent 11befaf075
commit 12da788288
32 changed files with 1129 additions and 45924 deletions

View file

@ -1,9 +1,11 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Kurs.Platform.Orders;
public class InstallmentOptionDto : EntityDto<int>
public class InstallmentOptionDto : EntityDto<Guid>
{
public int Installment { get; set; }
public string Name { get; set; }
public decimal Commission { get; set; }
}

View file

@ -324,9 +324,9 @@ public class ForumAppService : PlatformAppService, IForumAppService
// Update category counts
var category = await _categoryRepository.GetAsync(topic.CategoryId);
category.TopicCount = Math.Max(0, category.TopicCount - 1);
category.TopicCount = Math.Max(0, category.TopicCount ?? 0 - 1);
var postCount = await _postRepository.CountAsync(p => p.TopicId == id);
category.PostCount = Math.Max(0, category.PostCount - postCount);
category.PostCount = Math.Max(0, category.PostCount ?? 0 - postCount);
await _categoryRepository.UpdateAsync(category);
await _topicRepository.DeleteAsync(id);
@ -436,7 +436,7 @@ public class ForumAppService : PlatformAppService, IForumAppService
await _postRepository.DeleteAsync(id);
topic.ReplyCount = Math.Max(0, topic.ReplyCount - 1);
category.PostCount = Math.Max(0, category.PostCount - 1);
category.PostCount = Math.Max(0, category.PostCount ?? 0 - 1);
// 🔁 Last post değişti mi kontrol et
var latestPost = await _postRepository
@ -486,7 +486,7 @@ public class ForumAppService : PlatformAppService, IForumAppService
var topic = await _topicRepository.GetAsync(post.TopicId);
var postsInTopic = await _postRepository.GetListAsync(p => p.TopicId == topic.Id);
topic.LikeCount = postsInTopic.Sum(p => p.LikeCount);
topic.LikeCount = postsInTopic.Sum(p => p.LikeCount ?? 0);
await _topicRepository.UpdateAsync(topic);
return ObjectMapper.Map<ForumPost, ForumPostDto>(post);
@ -495,14 +495,14 @@ public class ForumAppService : PlatformAppService, IForumAppService
public async Task<ForumPostDto> UnlikePostAsync(Guid id)
{
var post = await _postRepository.GetAsync(id);
post.LikeCount = Math.Max(0, post.LikeCount - 1);
post.LikeCount = Math.Max(0, post.LikeCount ?? 0 - 1);
await _postRepository.UpdateAsync(post);
// 🔽 Topic'in toplam beğeni sayısını güncelle
var topic = await _topicRepository.GetAsync(post.TopicId);
var postsInTopic = await _postRepository.GetListAsync(p => p.TopicId == topic.Id);
topic.LikeCount = postsInTopic.Sum(p => p.LikeCount);
topic.LikeCount = postsInTopic.Sum(p => p.LikeCount ?? 0);
await _topicRepository.UpdateAsync(topic);

View file

@ -28,7 +28,7 @@ public class PublicAppService : PlatformAppService
private readonly IRepository<BlogCategory, Guid> _categoryRepository;
private readonly IRepository<Product, Guid> _productRepository;
private readonly IRepository<PaymentMethod, string> _paymentMethodRepository;
private readonly IRepository<InstallmentOption, int> _installmentOptionRepository;
private readonly IRepository<InstallmentOption> _installmentOptionRepository;
private readonly IRepository<Order, Guid> _orderRepository;
public PublicAppService(
@ -40,7 +40,7 @@ public class PublicAppService : PlatformAppService
IRepository<BlogCategory, Guid> categoryRepository,
IRepository<Product, Guid> productRepository,
IRepository<PaymentMethod, string> paymentMethodRepository,
IRepository<InstallmentOption, int> installmentOptionRepository,
IRepository<InstallmentOption> installmentOptionRepository,
IRepository<Order, Guid> orderRepository
)
{

View file

@ -766,7 +766,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new CommandColumnDto() {
new() {
Hint = "Manage",
Text = "Manage",
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
@ -795,7 +795,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsActive",
FieldDbType = DbType.Boolean,
Value = "true",
@ -1509,12 +1509,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
@ -2209,7 +2209,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "ExtraProperties",
FieldDbType = DbType.String,
Value = "{}",
@ -2427,12 +2427,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsEnabled",
FieldDbType = DbType.Boolean,
Value = "true",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "MultiTenancySide",
FieldDbType = DbType.Int16,
Value = "3",
@ -2764,7 +2764,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
InsertServiceAddress = "list-form-dynamic-api/role-insert",
UpdateServiceAddress = "list-form-dynamic-api/role-update",
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new CommandColumnDto() {
new() {
Hint = "Permission",
Text = "Permission",
AuthName = PlatformConsts.IdentityPermissions.Roles.ManagePermissions,
@ -2775,12 +2775,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
},
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsDefault",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "IsPublic",
FieldDbType = DbType.Boolean,
Value = "true",
@ -3277,12 +3277,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Language\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -3321,29 +3321,28 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
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 },
]
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsEnabled",
FieldDbType = DbType.Boolean,
Value = "true",
@ -3627,12 +3626,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}LanguageText\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -3665,7 +3664,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
//Items=["CultureName","ResourceName","Key","Value"] },
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=
[
new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
@ -3676,17 +3674,17 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
@ -3941,12 +3939,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Menu\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -3996,17 +3994,17 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDisabled",
FieldDbType = DbType.Boolean,
Value = "false",
@ -5394,34 +5392,34 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsVisibleToClients",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "IsInherited",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "IsEncrypted",
FieldDbType = DbType.Boolean,
Value = "false",
@ -6007,12 +6005,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Chart\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -6045,7 +6043,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
//Items=["ChartCode","CultureName","UserId","RoleId"] }
new EditingFormDto() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=
[
new EditingFormItemDto { Order = 1, DataField = "ChartCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
@ -6057,17 +6054,17 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
@ -6364,7 +6361,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
//Items=["Code","DataSourceType","ConnectionString"] }
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=
[
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
@ -6374,12 +6370,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
@ -6606,12 +6602,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}BackgroundWorker\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -6644,7 +6640,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
//Items= new EditingFormItemDto[] { } } //Items=["Name", "Cron", "WorkerType", "BeforeSp", "AfterSp", "Options", "IsActive"] }
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group",Items=
[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
@ -6665,19 +6660,19 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsActive",
FieldDbType = DbType.Boolean,
Value = "true",
@ -6986,12 +6981,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}NotificationRule\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -7405,12 +7400,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Notification\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -7748,12 +7743,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}IpRestriction\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -7795,12 +7790,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
@ -8067,12 +8062,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
@ -8446,12 +8441,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "System",
FieldDbType = DbType.String,
Value = "Platform",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "Weight",
FieldDbType = DbType.Single,
Value = "1.0",
@ -10549,7 +10544,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
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.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
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.dxNumberBox },
new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 2, IsRequired = true, 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 }
@ -11820,12 +11815,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Uom\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -11869,17 +11864,17 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
@ -12110,12 +12105,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}SkillLevel\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
@ -12158,24 +12153,24 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsDefault",
FieldDbType = DbType.Boolean,
Value = "true",
@ -12421,17 +12416,17 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new FieldsDefaultValue() {
new() {
FieldName = "IsDeleted",
FieldDbType = DbType.Boolean,
Value = "false",
@ -12666,7 +12661,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsActive",
FieldDbType = DbType.Boolean,
Value = "true",
@ -12967,9 +12962,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 4, DataField = "CoverImage", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "ReadTime", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "CategoryId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
new EditingFormItemDto { Order = 7, DataField = "ViewCount", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField = "LikeCount", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 9, DataField = "CommentCount", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "ViewCount", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField = "LikeCount", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 9, DataField = "CommentCount", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 10, DataField = "IsPublished", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 11, DataField = "PublishedAt", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 12, DataField = "ContentTr", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor },
@ -12995,12 +12990,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new FieldsDefaultValue() {
new() {
FieldName = "IsPublished",
FieldDbType = DbType.Boolean,
Value = "true",
CustomValueType = FieldCustomValueTypeEnum.Value },
new FieldsDefaultValue() {
new() {
FieldName = "PublishedAt",
FieldDbType = DbType.DateTime,
Value = "@NOW",
@ -13729,7 +13724,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
Title = "Product Form",
Width = 500,
Height = 300
Height = 400
},
AllowDeleting = true,
AllowAdding = true,
@ -13748,11 +13743,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 3, DataField = "Category", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField = "MonthlyPrice", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 5, DataField = "YearlyPrice", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField = "IsQuantityBased", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 7, DataField = "ImageUrl", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Category", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 5, DataField = "MonthlyPrice", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField = "YearlyPrice", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "IsQuantityBased", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 8, DataField = "ImageUrl", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox },
]
}
}),
@ -13772,6 +13768,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() {
FieldName = "IsQuantityBased",
FieldDbType = DbType.Boolean,
Value = "true",
CustomValueType = FieldCustomValueTypeEnum.Value }
})
});
@ -14201,7 +14204,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = SelectCommandByTableName("InstallmentOption"),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Int32,
KeyFieldDbSourceType = DbType.Guid,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
@ -14261,7 +14264,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
ItemType = "group",
Items =
[
new EditingFormItemDto { Order = 1, DataField = "Id", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 1, DataField = "Installment", 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 = "Commission", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
]
@ -14275,13 +14278,39 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
ListFormCode = listFormInstallmentOption.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Int32,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = JsonSerializer.Serialize(new[]
{
new ValidationRuleDto { Type = "required" }
}),
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.Services + ".Create",
R = AppCodes.Services,
U = AppCodes.Services + ".Update",
E = true,
I = true,
Deny = false
})
},
new()
{
ListFormCode = listFormInstallmentOption.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Installment",
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new[]
{
new ValidationRuleDto { Type = "required" }
@ -14302,8 +14331,8 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 300,
ListOrderNo = 2,
Width = 200,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -14329,7 +14358,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SourceDbType = DbType.Decimal,
FieldName = "Commission",
Width = 100,
ListOrderNo = 3,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -14965,6 +14994,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = SelectCommandByTableName("ReportCategory"),
KeyFieldName = "Id",
DefaultFilter = "\"IsDeleted\" = 'false'",
KeyFieldDbSourceType = DbType.Int32,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
@ -15031,6 +15061,41 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 4, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
]
}
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}ReportCategory\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
{
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
},
new FieldsDefaultValue
{
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
{
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
},
new FieldsDefaultValue
{
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
})
});
@ -15154,6 +15219,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = SelectCommandByTableName("Demo"),
KeyFieldName = "Id",
DefaultFilter = "\"IsDeleted\" = 'false'",
KeyFieldDbSourceType = DbType.Guid,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
@ -15197,7 +15263,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
{
Title = "Demo Form",
Width = 500,
Height = 300
Height = 500
},
AllowDeleting = true,
AllowAdding = true,
@ -15215,15 +15281,50 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
Items =
[
new EditingFormItemDto { Order = 1, DataField = "OrganizationName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "Phone", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Address", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 6, DataField = "NumberOfBranches", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "NumberOfUsers", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField = "Message", ColSpan = 2, IsRequired = false, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "Phone", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Address", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 6, DataField = "NumberOfBranches", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 7, DataField = "NumberOfUsers", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 8, DataField = "Message", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
]
}
}),
DeleteCommand = $"UPDATE \"{DbTablePrefix}Demo\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
{
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
},
new FieldsDefaultValue
{
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
{
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,
Value = "@NOW",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
},
new FieldsDefaultValue
{
FieldName = "CreatorId",
FieldDbType = DbType.Guid,
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
})
});
@ -15457,6 +15558,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = SelectCommandByTableName("Service"),
KeyFieldName = "Id",
DefaultFilter = "\"IsDeleted\" = 'false'",
KeyFieldDbSourceType = DbType.Guid,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
@ -15525,17 +15627,25 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
]
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() {
FieldName = "ExtraProperties",
FieldDbType = DbType.String,
Value = "{}",
CustomValueType = FieldCustomValueTypeEnum.Value },
new() {
FieldName = "ConcurrencyStamp",
DeleteCommand = $"UPDATE \"{DbTablePrefix}Service\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[]
{
new FieldsDefaultValue
{
FieldName = "DeleterId",
FieldDbType = DbType.Guid,
Value = Guid.NewGuid().ToString(),
CustomValueType = FieldCustomValueTypeEnum.Value },
Value = "@USERID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
},
new FieldsDefaultValue
{
FieldName = "Id",
FieldDbType = DbType.Guid,
Value = "@ID",
CustomValueType = FieldCustomValueTypeEnum.CustomKey
}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() {
FieldName = "CreationTime",
FieldDbType = DbType.DateTime,

View file

@ -62,7 +62,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
private readonly IRepository<Product, Guid> _productRepository;
private readonly IRepository<PaymentMethod, String> _paymentMethodRepository;
private readonly IRepository<InstallmentOption, int> _installmentOptionRepository;
private readonly IRepository<InstallmentOption, Guid> _installmentOptionRepository;
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
private readonly IRepository<ReportCategory, Guid> _reportCategoriesRepository;
private readonly IRepository<Service, Guid> _servicesRepository;
@ -101,7 +101,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<CustomEndpoint, Guid> CustomEndpointRepository,
IRepository<Product, Guid> ProductRepository,
IRepository<PaymentMethod, String> PaymentMethodRepository,
IRepository<InstallmentOption, int> InstallmentOptionRepository,
IRepository<InstallmentOption, Guid> InstallmentOptionRepository,
IRepository<CustomComponent, Guid> CustomComponentRepository,
IRepository<ReportCategory, Guid> ReportCategoriesRepository,
IRepository<Service, Guid> ServicesRepository
@ -701,12 +701,12 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
foreach (var item in items.InstallmentOptions)
{
var exists = await _installmentOptionRepository.AnyAsync(x => x.Name == item.Name);
var exists = await _installmentOptionRepository.AnyAsync(x => x.Installment == item.Installment);
if (!exists)
{
await _installmentOptionRepository.InsertAsync(new InstallmentOption(
item.Id,
item.Installment,
item.Name,
item.Commission));
}

View file

@ -17177,32 +17177,32 @@
],
"InstallmentOptions": [
{
"installments": 1,
"installment": 1,
"name": "Tek Çekim",
"commission": 0.038
},
{
"installments": 2,
"installment": 2,
"name": "2 Taksit",
"commission": 0.08
},
{
"installments": 3,
"installment": 3,
"name": "3 Taksit",
"commission": 0.11
},
{
"installments": 6,
"installment": 6,
"name": "6 Taksit",
"commission": 0.165
},
{
"installments": 9,
"installment": 9,
"name": "9 Taksit",
"commission": 0.22
},
{
"installments": 12,
"installment": 12,
"name": "12 Taksit",
"commission": 0.275
}

View file

@ -271,7 +271,7 @@ public class PaymentMethodSeedDto
public class InstallmentOptionSeedDto
{
public int Id { get; set; }
public int Installment { get; set; }
public string Name { get; set; }
public decimal Commission { get; set; }
}

View file

@ -14,7 +14,7 @@ public class BlogCategory : FullAuditedEntity<Guid>, IMultiTenant
public string Icon { get; set; }
public int DisplayOrder { get; set; }
public bool IsActive { get; set; }
public int PostCount { get; set; }
public int? PostCount { get; set; } = 0;
public virtual ICollection<BlogPost> Posts { get; set; }

View file

@ -20,11 +20,11 @@ public class BlogPost : FullAuditedEntity<Guid>, IMultiTenant
public Guid AuthorId { get; set; }
public int ViewCount { get; set; }
public int LikeCount { get; set; }
public int CommentCount { get; set; }
public int? ViewCount { get; set; } = 0;
public int? LikeCount { get; set; } = 0;
public int? CommentCount { get; set; } = 0;
public bool IsPublished { get; set; }
public bool IsPublished { get; set; } = false;
public DateTime? PublishedAt { get; set; }
protected BlogPost()

View file

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Forum;
@ -12,10 +11,10 @@ public class ForumCategory : FullAuditedEntity<Guid>
public string Description { get; set; }
public string Icon { get; set; }
public int DisplayOrder { get; set; }
public bool IsActive { get; set; }
public bool IsLocked { get; set; }
public int TopicCount { get; set; }
public int PostCount { get; set; }
public bool IsActive { get; set; } = true;
public bool IsLocked { get; set; } = false;
public int? TopicCount { get; set; }
public int? PostCount { get; set; }
public Guid? LastPostId { get; set; }
public DateTime? LastPostDate { get; set; }
public Guid? LastPostUserId { get; set; }

View file

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Forum;
@ -11,8 +10,8 @@ public class ForumPost : FullAuditedEntity<Guid>
public string Content { get; set; }
public Guid AuthorId { get; set; }
public string AuthorName { get; set; }
public int LikeCount { get; set; }
public bool IsAcceptedAnswer { get; set; }
public int? LikeCount { get; set; }
public bool? IsAcceptedAnswer { get; set; } = false;
public Guid? ParentPostId { get; set; }
public Guid? TenantId { get; set; }

View file

@ -1,17 +1,19 @@
using System;
using Volo.Abp.Domain.Entities;
namespace Kurs.Platform.Entities;
public class InstallmentOption : Entity<int>
public class InstallmentOption : Entity<Guid>
{
public int Installment { get; set; }
public string Name { get; set; }
public decimal Commission { get; set; }
public InstallmentOption() { }
public InstallmentOption(int id, string name, decimal commission)
public InstallmentOption(int installment, string name, decimal commission)
{
Id = id;
Installment = installment;
Name = name;
Commission = commission;
}

View file

@ -11,7 +11,7 @@ public class Product : FullAuditedEntity<Guid>
public int Order { get; set; }
public decimal? MonthlyPrice { get; set; }
public decimal? YearlyPrice { get; set; }
public bool IsQuantityBased { get; set; }
public bool IsQuantityBased { get; set; } = false;
public string ImageUrl { get; set; }
public Product()

View file

@ -1,180 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Orders : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Founder",
table: "AbpTenants",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.CreateTable(
name: "PInstallmentOption",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PInstallmentOption", x => x.Id);
});
migrationBuilder.CreateTable(
name: "POrder",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
InstitutionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
Founder = 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: false),
Mobile = table.Column<long>(type: "bigint", nullable: false),
Fax = table.Column<long>(type: "bigint", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
Subtotal = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
Commission = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
Total = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
PaymentMethod = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Installments = table.Column<int>(type: "int", nullable: true),
InstallmentName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
PaymentDataJson = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, 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_POrder", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PPaymentMethod",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(450)", 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),
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PPaymentMethod", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PProduct",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Order = table.Column<int>(type: "int", nullable: false),
MonthlyPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
YearlyPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
IsQuantityBased = table.Column<bool>(type: "bit", nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(300)", maxLength: 300, 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_PProduct", x => x.Id);
});
migrationBuilder.CreateTable(
name: "POrderItem",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProductId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProductName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
BillingCycle = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Quantity = table.Column<int>(type: "int", nullable: false),
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
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_POrderItem", x => x.Id);
table.ForeignKey(
name: "FK_POrderItem_POrder_OrderId",
column: x => x.OrderId,
principalTable: "POrder",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_POrderItem_OrderId",
table: "POrderItem",
column: "OrderId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PInstallmentOption");
migrationBuilder.DropTable(
name: "POrderItem");
migrationBuilder.DropTable(
name: "PPaymentMethod");
migrationBuilder.DropTable(
name: "PProduct");
migrationBuilder.DropTable(
name: "POrder");
migrationBuilder.DropColumn(
name: "Founder",
table: "AbpTenants");
}
}
}

View file

@ -1,73 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class ListFormImport : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PListFormImport",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
BlobName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TotalRows = 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_PListFormImport", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PListFormImportExecute",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ImportId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BlobName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExecRows = table.Column<int>(type: "int", nullable: false),
ValidRows = table.Column<int>(type: "int", nullable: false),
ErrorRows = table.Column<int>(type: "int", nullable: false),
Progress = table.Column<double>(type: "float", nullable: false),
ErrorsJson = table.Column<string>(type: "text", 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_PListFormImportExecute", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PListFormImport");
migrationBuilder.DropTable(
name: "PListFormImportExecute");
}
}
}

View file

@ -1,169 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Reports : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PReportCategory",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, 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_PReportCategory", x => x.Id);
table.UniqueConstraint("AK_PReportCategory_Name", x => x.Name);
});
migrationBuilder.CreateTable(
name: "PReportTemplate",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
HtmlContent = table.Column<string>(type: "nvarchar(max)", nullable: false),
CategoryName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Tags = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, 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_PReportTemplate", x => x.Id);
table.ForeignKey(
name: "FK_PReportTemplate_PReportCategory_CategoryName",
column: x => x.CategoryName,
principalTable: "PReportCategory",
principalColumn: "Name",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PReportGenerated",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TemplateName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
GeneratedContent = table.Column<string>(type: "nvarchar(max)", nullable: false),
Parameters = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
GeneratedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
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_PReportGenerated", x => x.Id);
table.ForeignKey(
name: "FK_PReportGenerated_PReportTemplate_TemplateId",
column: x => x.TemplateId,
principalTable: "PReportTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PReportParameter",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ReportTemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Placeholder = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
DefaultValue = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Required = table.Column<bool>(type: "bit", nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, 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_PReportParameter", x => x.Id);
table.ForeignKey(
name: "FK_PReportParameter_PReportTemplate_ReportTemplateId",
column: x => x.ReportTemplateId,
principalTable: "PReportTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_PReportCategory_Name",
table: "PReportCategory",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PReportGenerated_TemplateId",
table: "PReportGenerated",
column: "TemplateId");
migrationBuilder.CreateIndex(
name: "IX_PReportParameter_ReportTemplateId",
table: "PReportParameter",
column: "ReportTemplateId");
migrationBuilder.CreateIndex(
name: "IX_PReportTemplate_CategoryName",
table: "PReportTemplate",
column: "CategoryName");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PReportGenerated");
migrationBuilder.DropTable(
name: "PReportParameter");
migrationBuilder.DropTable(
name: "PReportTemplate");
migrationBuilder.DropTable(
name: "PReportCategory");
}
}
}

View file

@ -1,48 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Demo : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PDemo",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrganizationName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
FullName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
NumberOfBranches = table.Column<int>(type: "int", nullable: false),
NumberOfUsers = table.Column<int>(type: "int", nullable: false),
Message = table.Column<string>(type: "nvarchar(max)", 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_PDemo", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PDemo");
}
}
}

View file

@ -1,237 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Districts : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "PDemo",
type: "nvarchar(20)",
maxLength: 20,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "PDemo",
type: "nvarchar(2000)",
maxLength: 2000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "PDemo",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Address",
table: "PDemo",
type: "nvarchar(512)",
maxLength: 512,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "CountryCode",
table: "PCity",
type: "nvarchar(8)",
maxLength: 8,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(8)",
oldMaxLength: 8,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "PCity",
type: "nvarchar(16)",
maxLength: 16,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(16)",
oldMaxLength: 16,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "PlateCode",
table: "PCity",
type: "nvarchar(20)",
maxLength: 20,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Street",
table: "PBranch",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Street",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_PCity_CountryCode_Code",
table: "PCity",
columns: new[] { "CountryCode", "Code" });
migrationBuilder.CreateTable(
name: "PDistrict",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CountryCode = table.Column<string>(type: "nvarchar(8)", nullable: true),
CityCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Township = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Street = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ZipCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, 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_PDistrict", x => x.Id);
table.ForeignKey(
name: "FK_PDistrict_PCity_CountryCode_CityCode",
columns: x => new { x.CountryCode, x.CityCode },
principalTable: "PCity",
principalColumns: new[] { "CountryCode", "Code" },
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity",
columns: new[] { "CountryCode", "Code" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PDistrict_CountryCode_CityCode_Name_Township_Street_ZipCode",
table: "PDistrict",
columns: new[] { "CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode" },
unique: true,
filter: "[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PDistrict");
migrationBuilder.DropUniqueConstraint(
name: "AK_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.DropIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.DropColumn(
name: "PlateCode",
table: "PCity");
migrationBuilder.DropColumn(
name: "Street",
table: "PBranch");
migrationBuilder.DropColumn(
name: "Street",
table: "AbpTenants");
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "PDemo",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(20)",
oldMaxLength: 20);
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "PDemo",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(2000)",
oldMaxLength: 2000);
migrationBuilder.AlterColumn<string>(
name: "Email",
table: "PDemo",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "Address",
table: "PDemo",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(512)",
oldMaxLength: 512);
migrationBuilder.AlterColumn<string>(
name: "CountryCode",
table: "PCity",
type: "nvarchar(8)",
maxLength: 8,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(8)",
oldMaxLength: 8);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "PCity",
type: "nvarchar(16)",
maxLength: 16,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(16)",
oldMaxLength: 16);
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");
}
}
}

View file

@ -1,93 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class UomChange : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PUom_PUomCategory_CategoryName",
table: "PUom");
migrationBuilder.DropUniqueConstraint(
name: "AK_PUomCategory_Name",
table: "PUomCategory");
migrationBuilder.DropIndex(
name: "IX_PUom_CategoryName",
table: "PUom");
migrationBuilder.DropColumn(
name: "CategoryName",
table: "PUom");
migrationBuilder.AddColumn<Guid>(
name: "UomCategoryId",
table: "PUom",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.CreateIndex(
name: "IX_PUom_UomCategoryId",
table: "PUom",
column: "UomCategoryId");
migrationBuilder.AddForeignKey(
name: "FK_PUom_PUomCategory_UomCategoryId",
table: "PUom",
column: "UomCategoryId",
principalTable: "PUomCategory",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PUom_PUomCategory_UomCategoryId",
table: "PUom");
migrationBuilder.DropIndex(
name: "IX_PUom_UomCategoryId",
table: "PUom");
migrationBuilder.DropColumn(
name: "UomCategoryId",
table: "PUom");
migrationBuilder.AddColumn<string>(
name: "CategoryName",
table: "PUom",
type: "nvarchar(128)",
maxLength: 128,
nullable: false,
defaultValue: "");
migrationBuilder.AddUniqueConstraint(
name: "AK_PUomCategory_Name",
table: "PUomCategory",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_PUom_CategoryName",
table: "PUom",
column: "CategoryName");
migrationBuilder.AddForeignKey(
name: "FK_PUom_PUomCategory_CategoryName",
table: "PUom",
column: "CategoryName",
principalTable: "PUomCategory",
principalColumn: "Name",
onDelete: ReferentialAction.Restrict);
}
}
}

View file

@ -1,58 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Service : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "TenantId",
table: "PDemo",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateTable(
name: "PService",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Type = table.Column<string>(type: "nvarchar(max)", nullable: true),
Features = table.Column<string>(type: "nvarchar(max)", 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_PService", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PService");
migrationBuilder.DropColumn(
name: "TenantId",
table: "PDemo");
}
}
}

View file

@ -1,225 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class GenelAggregateRootChange : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PService");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PService");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PRoute");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PRoute");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PReportTemplate");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PReportTemplate");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PReportGenerated");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PReportGenerated");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PReportCategory");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PReportCategory");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PProduct");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PProduct");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "POrderItem");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "POrderItem");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "POrder");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "POrder");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PBlogPost");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PBlogPost");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PService",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PService",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PRoute",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PRoute",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PReportTemplate",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PReportTemplate",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PReportGenerated",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PReportGenerated",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PReportCategory",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PReportCategory",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PProduct",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PProduct",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "POrderItem",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "POrderItem",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "POrder",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "POrder",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PBlogPost",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PBlogPost",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
}
}
}

View file

@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20250820145845_GenelAggregateRootChange")]
partial class GenelAggregateRootChange
[Migration("20250820190627_GenelDuzenleme")]
partial class GenelDuzenleme
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -1070,7 +1070,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<int>("PostCount")
b.Property<int?>("PostCount")
.HasColumnType("int");
b.Property<string>("Slug")
@ -1100,7 +1100,7 @@ namespace Kurs.Platform.Migrations
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<int>("CommentCount")
b.Property<int?>("CommentCount")
.HasColumnType("int");
b.Property<string>("ContentEn")
@ -1148,7 +1148,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LikeCount")
b.Property<int?>("LikeCount")
.HasColumnType("int");
b.Property<DateTime?>("PublishedAt")
@ -1176,7 +1176,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<int>("ViewCount")
b.Property<int?>("ViewCount")
.HasColumnType("int");
b.HasKey("Id");
@ -2222,16 +2222,16 @@ namespace Kurs.Platform.Migrations
modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Commission")
.HasPrecision(5, 3)
.HasColumnType("decimal(5,3)");
b.Property<int>("Installment")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(32)
@ -3629,7 +3629,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<int>("PostCount")
b.Property<int?>("PostCount")
.HasColumnType("int");
b.Property<string>("Slug")
@ -3638,7 +3638,7 @@ namespace Kurs.Platform.Migrations
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<int>("TopicCount")
b.Property<int?>("TopicCount")
.HasColumnType("int");
b.HasKey("Id");
@ -3679,7 +3679,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("IsAcceptedAnswer")
b.Property<bool?>("IsAcceptedAnswer")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
@ -3696,7 +3696,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LikeCount")
b.Property<int?>("LikeCount")
.HasColumnType("int");
b.Property<Guid?>("ParentPostId")

View file

@ -0,0 +1,839 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class GenelDuzenleme : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PUom_PUomCategory_CategoryName",
table: "PUom");
migrationBuilder.DropUniqueConstraint(
name: "AK_PUomCategory_Name",
table: "PUomCategory");
migrationBuilder.DropIndex(
name: "IX_PUom_CategoryName",
table: "PUom");
migrationBuilder.DropIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.DropColumn(
name: "CategoryName",
table: "PUom");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PRoute");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PRoute");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "PBlogPost");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "PBlogPost");
migrationBuilder.AddColumn<Guid>(
name: "UomCategoryId",
table: "PUom",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AlterColumn<int>(
name: "LikeCount",
table: "PForumPost",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<bool>(
name: "IsAcceptedAnswer",
table: "PForumPost",
type: "bit",
nullable: true,
oldClrType: typeof(bool),
oldType: "bit");
migrationBuilder.AlterColumn<int>(
name: "TopicCount",
table: "PForumCategory",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "PostCount",
table: "PForumCategory",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<string>(
name: "CountryCode",
table: "PCity",
type: "nvarchar(8)",
maxLength: 8,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(8)",
oldMaxLength: 8,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "PCity",
type: "nvarchar(16)",
maxLength: 16,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(16)",
oldMaxLength: 16,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "PlateCode",
table: "PCity",
type: "nvarchar(20)",
maxLength: 20,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Street",
table: "PBranch",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AlterColumn<int>(
name: "ViewCount",
table: "PBlogPost",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "LikeCount",
table: "PBlogPost",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "CommentCount",
table: "PBlogPost",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "PostCount",
table: "PBlogCategory",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AddColumn<string>(
name: "Founder",
table: "AbpTenants",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Street",
table: "AbpTenants",
type: "nvarchar(128)",
maxLength: 128,
nullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_PCity_CountryCode_Code",
table: "PCity",
columns: new[] { "CountryCode", "Code" });
migrationBuilder.CreateTable(
name: "PDemo",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OrganizationName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
FullName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Phone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
Address = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
NumberOfBranches = table.Column<int>(type: "int", nullable: false),
NumberOfUsers = table.Column<int>(type: "int", nullable: false),
Message = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, 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_PDemo", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PDistrict",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CountryCode = table.Column<string>(type: "nvarchar(8)", nullable: true),
CityCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Township = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Street = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ZipCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, 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_PDistrict", x => x.Id);
table.ForeignKey(
name: "FK_PDistrict_PCity_CountryCode_CityCode",
columns: x => new { x.CountryCode, x.CityCode },
principalTable: "PCity",
principalColumns: new[] { "CountryCode", "Code" },
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PInstallmentOption",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Installment = table.Column<int>(type: "int", nullable: false),
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PInstallmentOption", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PListFormImport",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
BlobName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TotalRows = 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_PListFormImport", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PListFormImportExecute",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ImportId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BlobName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExecRows = table.Column<int>(type: "int", nullable: false),
ValidRows = table.Column<int>(type: "int", nullable: false),
ErrorRows = table.Column<int>(type: "int", nullable: false),
Progress = table.Column<double>(type: "float", nullable: false),
ErrorsJson = table.Column<string>(type: "text", 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_PListFormImportExecute", x => x.Id);
});
migrationBuilder.CreateTable(
name: "POrder",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
InstitutionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
Founder = 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: false),
Mobile = table.Column<long>(type: "bigint", nullable: false),
Fax = table.Column<long>(type: "bigint", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
Subtotal = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
Commission = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
Total = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
PaymentMethod = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Installments = table.Column<int>(type: "int", nullable: true),
InstallmentName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
PaymentDataJson = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, 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_POrder", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PPaymentMethod",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(450)", 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),
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PPaymentMethod", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PProduct",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Order = table.Column<int>(type: "int", nullable: false),
MonthlyPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
YearlyPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
IsQuantityBased = table.Column<bool>(type: "bit", nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(300)", maxLength: 300, 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_PProduct", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PReportCategory",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, 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_PReportCategory", x => x.Id);
table.UniqueConstraint("AK_PReportCategory_Name", x => x.Name);
});
migrationBuilder.CreateTable(
name: "PService",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Icon = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Title = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
Type = table.Column<string>(type: "nvarchar(max)", nullable: true),
Features = table.Column<string>(type: "nvarchar(max)", 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_PService", x => x.Id);
});
migrationBuilder.CreateTable(
name: "POrderItem",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProductId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProductName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
BillingCycle = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Quantity = table.Column<int>(type: "int", nullable: false),
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, 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_POrderItem", x => x.Id);
table.ForeignKey(
name: "FK_POrderItem_POrder_OrderId",
column: x => x.OrderId,
principalTable: "POrder",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PReportTemplate",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
HtmlContent = table.Column<string>(type: "nvarchar(max)", nullable: false),
CategoryName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Tags = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, 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_PReportTemplate", x => x.Id);
table.ForeignKey(
name: "FK_PReportTemplate_PReportCategory_CategoryName",
column: x => x.CategoryName,
principalTable: "PReportCategory",
principalColumn: "Name",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PReportGenerated",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TemplateName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
GeneratedContent = table.Column<string>(type: "nvarchar(max)", nullable: false),
Parameters = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
GeneratedAt = table.Column<DateTime>(type: "datetime2", 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_PReportGenerated", x => x.Id);
table.ForeignKey(
name: "FK_PReportGenerated_PReportTemplate_TemplateId",
column: x => x.TemplateId,
principalTable: "PReportTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PReportParameter",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ReportTemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Placeholder = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
DefaultValue = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Required = table.Column<bool>(type: "bit", nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, 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_PReportParameter", x => x.Id);
table.ForeignKey(
name: "FK_PReportParameter_PReportTemplate_ReportTemplateId",
column: x => x.ReportTemplateId,
principalTable: "PReportTemplate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_PUom_UomCategoryId",
table: "PUom",
column: "UomCategoryId");
migrationBuilder.CreateIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity",
columns: new[] { "CountryCode", "Code" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PDistrict_CountryCode_CityCode_Name_Township_Street_ZipCode",
table: "PDistrict",
columns: new[] { "CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode" },
unique: true,
filter: "[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_POrderItem_OrderId",
table: "POrderItem",
column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_PReportCategory_Name",
table: "PReportCategory",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PReportGenerated_TemplateId",
table: "PReportGenerated",
column: "TemplateId");
migrationBuilder.CreateIndex(
name: "IX_PReportParameter_ReportTemplateId",
table: "PReportParameter",
column: "ReportTemplateId");
migrationBuilder.CreateIndex(
name: "IX_PReportTemplate_CategoryName",
table: "PReportTemplate",
column: "CategoryName");
migrationBuilder.AddForeignKey(
name: "FK_PUom_PUomCategory_UomCategoryId",
table: "PUom",
column: "UomCategoryId",
principalTable: "PUomCategory",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PUom_PUomCategory_UomCategoryId",
table: "PUom");
migrationBuilder.DropTable(
name: "PDemo");
migrationBuilder.DropTable(
name: "PDistrict");
migrationBuilder.DropTable(
name: "PInstallmentOption");
migrationBuilder.DropTable(
name: "PListFormImport");
migrationBuilder.DropTable(
name: "PListFormImportExecute");
migrationBuilder.DropTable(
name: "POrderItem");
migrationBuilder.DropTable(
name: "PPaymentMethod");
migrationBuilder.DropTable(
name: "PProduct");
migrationBuilder.DropTable(
name: "PReportGenerated");
migrationBuilder.DropTable(
name: "PReportParameter");
migrationBuilder.DropTable(
name: "PService");
migrationBuilder.DropTable(
name: "POrder");
migrationBuilder.DropTable(
name: "PReportTemplate");
migrationBuilder.DropTable(
name: "PReportCategory");
migrationBuilder.DropIndex(
name: "IX_PUom_UomCategoryId",
table: "PUom");
migrationBuilder.DropUniqueConstraint(
name: "AK_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.DropIndex(
name: "IX_PCity_CountryCode_Code",
table: "PCity");
migrationBuilder.DropColumn(
name: "UomCategoryId",
table: "PUom");
migrationBuilder.DropColumn(
name: "PlateCode",
table: "PCity");
migrationBuilder.DropColumn(
name: "Street",
table: "PBranch");
migrationBuilder.DropColumn(
name: "Founder",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "Street",
table: "AbpTenants");
migrationBuilder.AddColumn<string>(
name: "CategoryName",
table: "PUom",
type: "nvarchar(128)",
maxLength: 128,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PRoute",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PRoute",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<int>(
name: "LikeCount",
table: "PForumPost",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<bool>(
name: "IsAcceptedAnswer",
table: "PForumPost",
type: "bit",
nullable: false,
defaultValue: false,
oldClrType: typeof(bool),
oldType: "bit",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "TopicCount",
table: "PForumCategory",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "PostCount",
table: "PForumCategory",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CountryCode",
table: "PCity",
type: "nvarchar(8)",
maxLength: 8,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(8)",
oldMaxLength: 8);
migrationBuilder.AlterColumn<string>(
name: "Code",
table: "PCity",
type: "nvarchar(16)",
maxLength: 16,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<int>(
name: "ViewCount",
table: "PBlogPost",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "LikeCount",
table: "PBlogPost",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "CommentCount",
table: "PBlogPost",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "PBlogPost",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "PBlogPost",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<int>(
name: "PostCount",
table: "PBlogCategory",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_PUomCategory_Name",
table: "PUomCategory",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_PUom_CategoryName",
table: "PUom",
column: "CategoryName");
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.AddForeignKey(
name: "FK_PUom_PUomCategory_CategoryName",
table: "PUom",
column: "CategoryName",
principalTable: "PUomCategory",
principalColumn: "Name",
onDelete: ReferentialAction.Restrict);
}
}
}

View file

@ -1067,7 +1067,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<int>("PostCount")
b.Property<int?>("PostCount")
.HasColumnType("int");
b.Property<string>("Slug")
@ -1097,7 +1097,7 @@ namespace Kurs.Platform.Migrations
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<int>("CommentCount")
b.Property<int?>("CommentCount")
.HasColumnType("int");
b.Property<string>("ContentEn")
@ -1145,7 +1145,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LikeCount")
b.Property<int?>("LikeCount")
.HasColumnType("int");
b.Property<DateTime?>("PublishedAt")
@ -1173,7 +1173,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<int>("ViewCount")
b.Property<int?>("ViewCount")
.HasColumnType("int");
b.HasKey("Id");
@ -2219,16 +2219,16 @@ namespace Kurs.Platform.Migrations
modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Commission")
.HasPrecision(5, 3)
.HasColumnType("decimal(5,3)");
b.Property<int>("Installment")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(32)
@ -3626,7 +3626,7 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<int>("PostCount")
b.Property<int?>("PostCount")
.HasColumnType("int");
b.Property<string>("Slug")
@ -3635,7 +3635,7 @@ namespace Kurs.Platform.Migrations
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<int>("TopicCount")
b.Property<int?>("TopicCount")
.HasColumnType("int");
b.HasKey("Id");
@ -3676,7 +3676,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("IsAcceptedAnswer")
b.Property<bool?>("IsAcceptedAnswer")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
@ -3693,7 +3693,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LikeCount")
b.Property<int?>("LikeCount")
.HasColumnType("int");
b.Property<Guid?>("ParentPostId")

View file

@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
"revision": "0.bfdmrkmijug"
"revision": "0.vt922hqbnl8"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {