Tenant düzeltmesi
This commit is contained in:
parent
2cacec19c7
commit
c2f8bbe083
15 changed files with 325 additions and 480 deletions
|
|
@ -5,6 +5,8 @@ namespace Kurs.Platform.Orders;
|
||||||
|
|
||||||
public class InstallmentOptionDto : EntityDto<Guid>
|
public class InstallmentOptionDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public int Installment { get; set; }
|
public int Installment { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ namespace Kurs.Platform.Orders;
|
||||||
|
|
||||||
public class PaymentMethodDto : EntityDto<Guid>
|
public class PaymentMethodDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
public string Logo { get; set; }
|
public string Logo { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ namespace Kurs.Platform.Orders;
|
||||||
|
|
||||||
public class ProductDto : EntityDto<Guid>
|
public class ProductDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string Category { get; set; }
|
public string Category { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -31,21 +31,19 @@ public class BlogAppService : PlatformAppService, IBlogAppService
|
||||||
|
|
||||||
public async Task<BlogPostDto> CreatePostAsync(CreateUpdateBlogPostDto input)
|
public async Task<BlogPostDto> CreatePostAsync(CreateUpdateBlogPostDto input)
|
||||||
{
|
{
|
||||||
var post = new BlogPost(
|
var post = new BlogPost
|
||||||
GuidGenerator.Create(),
|
{
|
||||||
input.Title,
|
Title = input.Title,
|
||||||
input.Slug,
|
Slug = input.Slug,
|
||||||
input.ContentTr,
|
ContentTr = input.ContentTr,
|
||||||
input.ContentEn,
|
ContentEn = input.ContentEn,
|
||||||
input.Summary,
|
Summary = input.Summary,
|
||||||
input.ReadTime,
|
ReadTime = input.ReadTime,
|
||||||
input.CoverImage,
|
CoverImage = input.CoverImage,
|
||||||
input.CategoryId,
|
CategoryId = input.CategoryId,
|
||||||
_currentUser.Id.Value,
|
AuthorId = _currentUser.Id.Value,
|
||||||
true,
|
IsPublished = true,
|
||||||
DateTime.UtcNow,
|
};
|
||||||
(Guid?)CurrentTenant.Id
|
|
||||||
);
|
|
||||||
|
|
||||||
await _postRepository.InsertAsync(post, autoSave: true);
|
await _postRepository.InsertAsync(post, autoSave: true);
|
||||||
|
|
||||||
|
|
@ -167,17 +165,15 @@ public class BlogAppService : PlatformAppService, IBlogAppService
|
||||||
[Authorize("App.BlogManagement.Create")]
|
[Authorize("App.BlogManagement.Create")]
|
||||||
public async Task<BlogCategoryDto> CreateCategoryAsync(CreateUpdateBlogCategoryDto input)
|
public async Task<BlogCategoryDto> CreateCategoryAsync(CreateUpdateBlogCategoryDto input)
|
||||||
{
|
{
|
||||||
var category = new BlogCategory(
|
var category = new BlogCategory
|
||||||
GuidGenerator.Create(),
|
{
|
||||||
input.Name,
|
Name = input.Name,
|
||||||
input.Slug,
|
Slug = input.Slug,
|
||||||
input.Description,
|
Description = input.Description,
|
||||||
CurrentTenant.Id
|
Icon = input.Icon,
|
||||||
);
|
DisplayOrder = input.DisplayOrder,
|
||||||
|
IsActive = input.IsActive
|
||||||
category.Icon = input.Icon;
|
};
|
||||||
category.DisplayOrder = input.DisplayOrder;
|
|
||||||
category.IsActive = input.IsActive;
|
|
||||||
|
|
||||||
await _categoryRepository.InsertAsync(category);
|
await _categoryRepository.InsertAsync(category);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,19 +85,19 @@ public class ClassroomAppService : PlatformAppService, IClassroomAppService
|
||||||
|
|
||||||
public async Task<ClassroomDto> CreateAsync(ClassroomDto input)
|
public async Task<ClassroomDto> CreateAsync(ClassroomDto input)
|
||||||
{
|
{
|
||||||
var classSession = new Classroom(
|
var classSession = new Classroom
|
||||||
GuidGenerator.Create(),
|
{
|
||||||
input.Name,
|
Name = input.Name,
|
||||||
input.Description,
|
Description = input.Description,
|
||||||
input.Subject,
|
Subject = input.Subject,
|
||||||
CurrentUser.Id,
|
TeacherId = CurrentUser.Id,
|
||||||
CurrentUser.Name,
|
TeacherName = CurrentUser.Name,
|
||||||
input.ScheduledStartTime,
|
ScheduledStartTime = input.ScheduledStartTime,
|
||||||
input.ScheduledStartTime.AddMinutes(input.Duration),
|
ScheduledEndTime = input.ScheduledStartTime.AddMinutes(input.Duration),
|
||||||
input.Duration,
|
Duration = input.Duration,
|
||||||
input.MaxParticipants,
|
MaxParticipants = input.MaxParticipants,
|
||||||
input.SettingsJson = JsonSerializer.Serialize(input.SettingsDto)
|
SettingsJson = JsonSerializer.Serialize(input.SettingsDto)
|
||||||
);
|
};
|
||||||
|
|
||||||
await _classSessionRepository.InsertAsync(classSession);
|
await _classSessionRepository.InsertAsync(classSession);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,18 +152,16 @@ public class ForumAppService : PlatformAppService, IForumAppService
|
||||||
[Authorize("App.ForumManagement.Create")]
|
[Authorize("App.ForumManagement.Create")]
|
||||||
public async Task<ForumCategoryDto> CreateCategoryAsync(CreateForumCategoryDto input)
|
public async Task<ForumCategoryDto> CreateCategoryAsync(CreateForumCategoryDto input)
|
||||||
{
|
{
|
||||||
var category = new ForumCategory(
|
var category = new ForumCategory
|
||||||
GuidGenerator.Create(),
|
|
||||||
input.Name,
|
|
||||||
input.Slug,
|
|
||||||
input.Description,
|
|
||||||
input.Icon,
|
|
||||||
input.DisplayOrder,
|
|
||||||
input.TenantId
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
Name = input.Name,
|
||||||
|
Slug = input.Slug,
|
||||||
|
Description = input.Description,
|
||||||
|
Icon = input.Icon,
|
||||||
|
DisplayOrder = input.DisplayOrder,
|
||||||
IsActive = input.IsActive,
|
IsActive = input.IsActive,
|
||||||
IsLocked = input.IsLocked
|
IsLocked = input.IsLocked
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await _categoryRepository.InsertAsync(category);
|
await _categoryRepository.InsertAsync(category);
|
||||||
|
|
|
||||||
|
|
@ -1225,28 +1225,28 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items =
|
new() { Order=2, ColCount=2, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=2, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=2, DataField="City", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=3, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=3, DataField="District", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -1857,7 +1857,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -1960,30 +1960,30 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
}),
|
}),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=2, DataField="OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=3, DataField="Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=4, DataField="VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=5, DataField="TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=6, DataField="Mobile", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order=7, DataField="Phone", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Fax", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order=9, DataField="IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
new() { Order=2, ColCount=2, ColSpan=1, ItemType="group", Items =
|
new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=1, DataField="Country", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=2, DataField="City", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=2, DataField="City", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=3, DataField="District", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=3, DataField="District", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=4, DataField="Street", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
new EditingFormItemDto { Order=5, DataField="PostalCode", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=showClearButton },
|
||||||
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=6, DataField="Address", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=7, DataField="Address2", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=8, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=9, DataField="Website", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -704,7 +704,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _uomCategoryRepository.InsertAsync(new UomCategory { Name = item.Name });
|
await _uomCategoryRepository.InsertAsync(new UomCategory { Name = item.Name }, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -753,13 +753,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _skillTypeRepository.InsertAsync
|
await _skillTypeRepository.InsertAsync(new SkillType { Name = item.Name }, autoSave: true);
|
||||||
(
|
|
||||||
new SkillType
|
|
||||||
{
|
|
||||||
Name = item.Name
|
|
||||||
}
|
|
||||||
, autoSave: true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -776,7 +770,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
SkillTypeId = skillType.Id
|
SkillTypeId = skillType.Id
|
||||||
}, autoSave: true);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -796,7 +790,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
Progress = item.Progress,
|
Progress = item.Progress,
|
||||||
IsDefault = item.IsDefault,
|
IsDefault = item.IsDefault,
|
||||||
SkillTypeId = skillType.Id,
|
SkillTypeId = skillType.Id,
|
||||||
}, autoSave: true);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -844,7 +838,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
PostCount = item.PostCount
|
PostCount = item.PostCount
|
||||||
};
|
};
|
||||||
|
|
||||||
await _blogCategoryRepository.InsertAsync(newCategory);
|
await _blogCategoryRepository.InsertAsync(newCategory, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -890,7 +884,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
DisplayOrder = item.DisplayOrder
|
DisplayOrder = item.DisplayOrder
|
||||||
};
|
};
|
||||||
|
|
||||||
await _forumCategoryRepository.InsertAsync(newCategory);
|
await _forumCategoryRepository.InsertAsync(newCategory, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -983,10 +977,12 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _installmentOptionRepository.InsertAsync(new InstallmentOption(
|
await _installmentOptionRepository.InsertAsync(new InstallmentOption
|
||||||
item.Installment,
|
{
|
||||||
item.Name,
|
Installment = item.Installment,
|
||||||
item.Commission));
|
Name = item.Name,
|
||||||
|
Commission = item.Commission
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1311,10 +1307,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _eventTypeRepository.InsertAsync(new EventType
|
await _eventTypeRepository.InsertAsync(new EventType { Name = item.Name }, autoSave: true);
|
||||||
{
|
|
||||||
Name = item.Name
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1324,10 +1317,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _eventCategoryRepository.InsertAsync(new EventCategory
|
await _eventCategoryRepository.InsertAsync(new EventCategory { Name = item.Name }, autoSave: true);
|
||||||
{
|
|
||||||
Name = item.Name
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1383,7 +1373,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Status = item.Status
|
Status = item.Status
|
||||||
});
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1422,7 +1412,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
MinStudentCount = item.MinStudentCount,
|
MinStudentCount = item.MinStudentCount,
|
||||||
MaxStudentCount = item.MaxStudentCount,
|
MaxStudentCount = item.MaxStudentCount,
|
||||||
Status = item.Status
|
Status = item.Status
|
||||||
});
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,20 +1,14 @@
|
||||||
using System;
|
using System;
|
||||||
using Volo.Abp.Domain.Entities;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
public class InstallmentOption : Entity<Guid>
|
public class InstallmentOption : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public int Installment { get; set; }
|
public int Installment { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
|
|
||||||
public InstallmentOption() { }
|
|
||||||
|
|
||||||
public InstallmentOption(int installment, string name, decimal commission)
|
|
||||||
{
|
|
||||||
Installment = installment;
|
|
||||||
Name = name;
|
|
||||||
Commission = commission;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
public class PaymentMethod : FullAuditedEntity<Guid>
|
public class PaymentMethod : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public decimal Commission { get; set; }
|
public decimal Commission { get; set; }
|
||||||
public string Logo { get; set; }
|
public string Logo { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
namespace Kurs.Platform.Entities;
|
namespace Kurs.Platform.Entities;
|
||||||
|
|
||||||
public class Product : FullAuditedEntity<Guid>
|
public class Product : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string Category { get; set; }
|
public string Category { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251006221403_Initial")]
|
[Migration("20251007062517_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -3178,14 +3178,48 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasPrecision(5, 3)
|
.HasPrecision(5, 3)
|
||||||
.HasColumnType("decimal(5,3)");
|
.HasColumnType("decimal(5,3)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<int>("Installment")
|
b.Property<int>("Installment")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(32)
|
.HasMaxLength(32)
|
||||||
.HasColumnType("nvarchar(32)");
|
.HasColumnType("nvarchar(32)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("WInstallmentOption", (string)null);
|
b.ToTable("WInstallmentOption", (string)null);
|
||||||
|
|
@ -4748,6 +4782,10 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("WPaymentMethod", (string)null);
|
b.ToTable("WPaymentMethod", (string)null);
|
||||||
|
|
@ -4816,6 +4854,10 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Property<int>("Order")
|
b.Property<int>("Order")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.Property<decimal?>("YearlyPrice")
|
b.Property<decimal?>("YearlyPrice")
|
||||||
.HasPrecision(18, 2)
|
.HasPrecision(18, 2)
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
@ -1890,9 +1890,17 @@ namespace Kurs.Platform.Migrations
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Installment = table.Column<int>(type: "int", nullable: false),
|
Installment = table.Column<int>(type: "int", nullable: false),
|
||||||
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, 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)
|
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, 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 =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -1945,6 +1953,7 @@ namespace Kurs.Platform.Migrations
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false),
|
Commission = table.Column<decimal>(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false),
|
||||||
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
|
Logo = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
|
||||||
|
|
@ -1966,6 +1975,7 @@ namespace Kurs.Platform.Migrations
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
|
|
@ -3175,14 +3175,48 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasPrecision(5, 3)
|
.HasPrecision(5, 3)
|
||||||
.HasColumnType("decimal(5,3)");
|
.HasColumnType("decimal(5,3)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<int>("Installment")
|
b.Property<int>("Installment")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(32)
|
.HasMaxLength(32)
|
||||||
.HasColumnType("nvarchar(32)");
|
.HasColumnType("nvarchar(32)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("WInstallmentOption", (string)null);
|
b.ToTable("WInstallmentOption", (string)null);
|
||||||
|
|
@ -4745,6 +4779,10 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("WPaymentMethod", (string)null);
|
b.ToTable("WPaymentMethod", (string)null);
|
||||||
|
|
@ -4813,6 +4851,10 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Property<int>("Order")
|
b.Property<int>("Order")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
b.Property<decimal?>("YearlyPrice")
|
b.Property<decimal?>("YearlyPrice")
|
||||||
.HasPrecision(18, 2)
|
.HasPrecision(18, 2)
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue