Commit 581cf178 authored by gdlcf88's avatar gdlcf88

Completed ProductStore feature, close #2

Completed store management
parent 2737922c
...@@ -6,9 +6,6 @@ namespace EasyAbp.EShop.Products.ProductCategories.Dtos ...@@ -6,9 +6,6 @@ namespace EasyAbp.EShop.Products.ProductCategories.Dtos
{ {
public class CreateUpdateProductCategoryDto public class CreateUpdateProductCategoryDto
{ {
[DisplayName("ProductCategoryStoreId")]
public Guid StoreId { get; set; }
[Required] [Required]
[DisplayName("ProductCategoryCategoryId")] [DisplayName("ProductCategoryCategoryId")]
public Guid CategoryId { get; set; } public Guid CategoryId { get; set; }
......
...@@ -5,8 +5,6 @@ namespace EasyAbp.EShop.Products.ProductCategories.Dtos ...@@ -5,8 +5,6 @@ namespace EasyAbp.EShop.Products.ProductCategories.Dtos
{ {
public class ProductCategoryDto : AuditedEntityDto<Guid> public class ProductCategoryDto : AuditedEntityDto<Guid>
{ {
public Guid StoreId { get; set; }
public Guid CategoryId { get; set; } public Guid CategoryId { get; set; }
public Guid ProductId { get; set; } public Guid ProductId { get; set; }
......
...@@ -8,13 +8,16 @@ namespace EasyAbp.EShop.Products.Products.Dtos ...@@ -8,13 +8,16 @@ namespace EasyAbp.EShop.Products.Products.Dtos
{ {
public class CreateUpdateProductDto : IValidatableObject public class CreateUpdateProductDto : IValidatableObject
{ {
[DisplayName("ProductStoreId")]
public Guid StoreId { get; set; }
[Required] [Required]
[DisplayName("ProductProductTypeId")] [DisplayName("ProductProductTypeId")]
public Guid ProductTypeId { get; set; } public Guid ProductTypeId { get; set; }
/// <summary>
/// This property is set for adding the store to ProductStore in creation, or for permission checking in update.
/// </summary>
[DisplayName("ProductStoreId")]
public Guid StoreId { get; set; }
[DisplayName("ProductCategory")] [DisplayName("ProductCategory")]
public ICollection<Guid> CategoryIds { get; set; } public ICollection<Guid> CategoryIds { get; set; }
......
...@@ -6,10 +6,10 @@ namespace EasyAbp.EShop.Products.Products.Dtos ...@@ -6,10 +6,10 @@ namespace EasyAbp.EShop.Products.Products.Dtos
{ {
public class ProductDto : FullAuditedEntityDto<Guid> public class ProductDto : FullAuditedEntityDto<Guid>
{ {
public Guid StoreId { get; set; }
public Guid ProductTypeId { get; set; } public Guid ProductTypeId { get; set; }
public ICollection<Guid> CategoryIds { get; set; }
public string DisplayName { get; set; } public string DisplayName { get; set; }
public InventoryStrategy InventoryStrategy { get; set; } public InventoryStrategy InventoryStrategy { get; set; }
......
using System; using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Products.Dtos; using EasyAbp.EShop.Products.Products.Dtos;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
...@@ -13,6 +14,6 @@ namespace EasyAbp.EShop.Products.Products ...@@ -13,6 +14,6 @@ namespace EasyAbp.EShop.Products.Products
CreateUpdateProductDto, CreateUpdateProductDto,
CreateUpdateProductDto> CreateUpdateProductDto>
{ {
Task DeleteAsync(Guid id, Guid storeId);
} }
} }
\ No newline at end of file
...@@ -5,9 +5,9 @@ using System.Threading.Tasks; ...@@ -5,9 +5,9 @@ using System.Threading.Tasks;
using EasyAbp.EShop.Products.Authorization; using EasyAbp.EShop.Products.Authorization;
using EasyAbp.EShop.Products.ProductCategories; using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.Products.Dtos; using EasyAbp.EShop.Products.Products.Dtos;
using Volo.Abp.Application.Dtos; using EasyAbp.EShop.Products.ProductStores;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Threading;
namespace EasyAbp.EShop.Products.Products namespace EasyAbp.EShop.Products.Products
{ {
...@@ -20,33 +20,25 @@ namespace EasyAbp.EShop.Products.Products ...@@ -20,33 +20,25 @@ namespace EasyAbp.EShop.Products.Products
protected override string GetPolicyName { get; set; } = ProductsPermissions.Products.Default; protected override string GetPolicyName { get; set; } = ProductsPermissions.Products.Default;
protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Default; protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Default;
private readonly IProductStoreRepository _productStoreRepository;
private readonly IProductCategoryRepository _productCategoryRepository; private readonly IProductCategoryRepository _productCategoryRepository;
private readonly IProductRepository _repository; private readonly IProductRepository _repository;
public ProductAppService( public ProductAppService(
IProductStoreRepository productStoreRepository,
IProductCategoryRepository productCategoryRepository, IProductCategoryRepository productCategoryRepository,
IProductRepository repository) : base(repository) IProductRepository repository) : base(repository)
{ {
_productStoreRepository = productStoreRepository;
_productCategoryRepository = productCategoryRepository; _productCategoryRepository = productCategoryRepository;
_repository = repository; _repository = repository;
} }
protected override IQueryable<Product> CreateFilteredQuery(GetProductListDto input) protected override IQueryable<Product> CreateFilteredQuery(GetProductListDto input)
{ {
var query = base.CreateFilteredQuery(input); return input.CategoryId.HasValue
? _repository.GetQueryable(input.StoreId, input.CategoryId.Value)
if (input.CategoryId.HasValue) : _repository.GetQueryable(input.StoreId);
{
var productIds = AsyncHelper
.RunSync(() => _productCategoryRepository.GetListByCategoryId(input.CategoryId.Value, input.StoreId))
.Select(pc => pc.ProductId).ToList();
query = query.Where(p => productIds.Contains(p.Id));
}
query = query.Where(p => p.StoreId == input.StoreId);
return query;
} }
public override async Task<ProductDto> CreateAsync(CreateUpdateProductDto input) public override async Task<ProductDto> CreateAsync(CreateUpdateProductDto input)
...@@ -61,15 +53,25 @@ namespace EasyAbp.EShop.Products.Products ...@@ -61,15 +53,25 @@ namespace EasyAbp.EShop.Products.Products
await Repository.InsertAsync(product, autoSave: true); await Repository.InsertAsync(product, autoSave: true);
await UpdateProductCategoriesAsync(product.Id, product.StoreId, input.CategoryIds); await AddProductToStoreAsync(product.Id, input.StoreId);
await UpdateProductCategoriesAsync(product.Id, input.CategoryIds);
return MapToGetOutputDto(product); return MapToGetOutputDto(product);
} }
protected virtual async Task AddProductToStoreAsync(Guid productId, Guid storeId)
{
await _productStoreRepository.InsertAsync(new ProductStore(GuidGenerator.Create(), CurrentTenant.Id,
storeId, productId, true), true);
}
public override async Task<ProductDto> UpdateAsync(Guid id, CreateUpdateProductDto input) public override async Task<ProductDto> UpdateAsync(Guid id, CreateUpdateProductDto input)
{ {
await CheckUpdatePolicyAsync(); await CheckUpdatePolicyAsync();
await CheckStoreIsProductOwnerAsync(id, input.StoreId);
var product = await GetEntityByIdAsync(id); var product = await GetEntityByIdAsync(id);
MapToEntity(input, product); MapToEntity(input, product);
...@@ -78,12 +80,22 @@ namespace EasyAbp.EShop.Products.Products ...@@ -78,12 +80,22 @@ namespace EasyAbp.EShop.Products.Products
await Repository.UpdateAsync(product, autoSave: true); await Repository.UpdateAsync(product, autoSave: true);
await UpdateProductCategoriesAsync(product.Id, product.StoreId, input.CategoryIds); await UpdateProductCategoriesAsync(product.Id, input.CategoryIds);
return MapToGetOutputDto(product); return MapToGetOutputDto(product);
} }
private async Task UpdateProductAttributesAsync(Product product, CreateUpdateProductDto input) protected virtual async Task CheckStoreIsProductOwnerAsync(Guid id, Guid storeId)
{
var productStore = await _productStoreRepository.GetAsync(id, storeId);
if (!productStore.IsOwner)
{
throw new StoreIsNotProductOwnerException(id, storeId);
}
}
protected virtual async Task UpdateProductAttributesAsync(Product product, CreateUpdateProductDto input)
{ {
foreach (var attributeDto in input.ProductAttributes) foreach (var attributeDto in input.ProductAttributes)
{ {
...@@ -122,21 +134,39 @@ namespace EasyAbp.EShop.Products.Products ...@@ -122,21 +134,39 @@ namespace EasyAbp.EShop.Products.Products
product.ProductAttributes.RemoveAll(a => exceptAttributeNames.Contains(a.DisplayName)); product.ProductAttributes.RemoveAll(a => exceptAttributeNames.Contains(a.DisplayName));
} }
[RemoteService(IsMetadataEnabled = false)]
public override async Task DeleteAsync(Guid id) public override async Task DeleteAsync(Guid id)
{
throw new NotImplementedException();
}
public override async Task<ProductDto> GetAsync(Guid id)
{
var dto = await base.GetAsync(id);
dto.CategoryIds = (await _productCategoryRepository.GetListByProductIdAsync(dto.Id))
.Select(x => x.CategoryId).ToList();
return dto;
}
public async Task DeleteAsync(Guid id, Guid storeId)
{ {
await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(id)); await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(id));
await CheckStoreIsProductOwnerAsync(id, storeId);
await base.DeleteAsync(id); await base.DeleteAsync(id);
} }
protected virtual async Task UpdateProductCategoriesAsync(Guid productId, Guid storeId, IEnumerable<Guid> categoryIds) protected virtual async Task UpdateProductCategoriesAsync(Guid productId, IEnumerable<Guid> categoryIds)
{ {
await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(productId)); await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(productId));
foreach (var categoryId in categoryIds) foreach (var categoryId in categoryIds)
{ {
await _productCategoryRepository.InsertAsync(new ProductCategory(GuidGenerator.Create(), await _productCategoryRepository.InsertAsync(
CurrentTenant.Id, storeId, categoryId, productId)); new ProductCategory(GuidGenerator.Create(), CurrentTenant.Id, categoryId, productId), true);
} }
} }
} }
......
using System;
using Volo.Abp;
namespace EasyAbp.EShop.Products.Products
{
public class StoreIsNotProductOwnerException : BusinessException
{
public StoreIsNotProductOwnerException(Guid productId, Guid storeId) : base(
message: $"Store {storeId} is not a owner of the product {productId}")
{
}
}
}
\ No newline at end of file
...@@ -18,12 +18,14 @@ namespace EasyAbp.EShop.Products ...@@ -18,12 +18,14 @@ namespace EasyAbp.EShop.Products
/* You can configure your AutoMapper mapping configuration here. /* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations * Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */ * into multiple profile classes for a better organization. */
CreateMap<Product, ProductDto>(); CreateMap<Product, ProductDto>()
.Ignore(dto => dto.CategoryIds);
CreateMap<ProductDetail, ProductDetailDto>(); CreateMap<ProductDetail, ProductDetailDto>();
CreateMap<ProductAttribute, ProductAttributeDto>(); CreateMap<ProductAttribute, ProductAttributeDto>();
CreateMap<ProductAttributeOption, ProductAttributeOptionDto>(); CreateMap<ProductAttributeOption, ProductAttributeOptionDto>();
CreateMap<ProductSku, ProductSkuDto>(); CreateMap<ProductSku, ProductSkuDto>();
CreateMap<CreateUpdateProductDto, Product>(MemberList.Source) CreateMap<CreateUpdateProductDto, Product>(MemberList.Source)
.ForSourceMember(dto => dto.StoreId, opt => opt.DoNotValidate())
.ForSourceMember(dto => dto.CategoryIds, opt => opt.DoNotValidate()) .ForSourceMember(dto => dto.CategoryIds, opt => opt.DoNotValidate())
.Ignore(p => p.ProductAttributes) .Ignore(p => p.ProductAttributes)
.Ignore(p => p.ProductSkus); .Ignore(p => p.ProductSkus);
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -46,7 +48,6 @@ ...@@ -46,7 +48,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -47,7 +49,6 @@ ...@@ -47,7 +49,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -46,7 +48,6 @@ ...@@ -46,7 +48,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -46,7 +48,6 @@ ...@@ -46,7 +48,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -47,7 +49,6 @@ ...@@ -47,7 +49,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -47,7 +49,6 @@ ...@@ -47,7 +49,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -46,7 +48,6 @@ ...@@ -46,7 +48,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -47,7 +49,6 @@ ...@@ -47,7 +49,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
"Menu:Product": "MenuProduct", "Menu:Product": "MenuProduct",
"Product": "Product", "Product": "Product",
"ProductStore": "ProductStore", "ProductStore": "ProductStore",
"ProductProductTypeId": "ProductProductTypeId",
"ProductProductStoreId": "ProductProductStoreId",
"ProductDisplayName": "ProductDisplayName", "ProductDisplayName": "ProductDisplayName",
"ProductDetailDescription": "ProductDetailDescription", "ProductDetailDescription": "ProductDetailDescription",
"ProductDetailDisplayOrder": "ProductDetailDisplayOrder", "ProductDetailDisplayOrder": "ProductDetailDisplayOrder",
...@@ -47,7 +49,6 @@ ...@@ -47,7 +49,6 @@
"Menu:ProductCategory": "MenuProductCategory", "Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory", "ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId", "ProductCategoryTenantId": "ProductCategoryTenantId",
"ProductCategoryStoreId": "ProductCategoryStoreId",
"ProductCategoryCategoryId": "ProductCategoryCategoryId", "ProductCategoryCategoryId": "ProductCategoryCategoryId",
"ProductCategoryProductId": "ProductCategoryProductId", "ProductCategoryProductId": "ProductCategoryProductId",
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
......
...@@ -8,8 +8,8 @@ namespace EasyAbp.EShop.Products.ProductCategories ...@@ -8,8 +8,8 @@ namespace EasyAbp.EShop.Products.ProductCategories
{ {
public interface IProductCategoryRepository : IRepository<ProductCategory, Guid> public interface IProductCategoryRepository : IRepository<ProductCategory, Guid>
{ {
Task<List<ProductCategory>> GetListByCategoryId(Guid categoryId, Guid storeId, CancellationToken cancellationToken = default); Task<List<ProductCategory>> GetListByCategoryIdAsync(Guid categoryId, CancellationToken cancellationToken = default);
Task<List<ProductCategory>> GetListByProductId(Guid productId, Guid storeId, CancellationToken cancellationToken = default); Task<List<ProductCategory>> GetListByProductIdAsync(Guid productId, CancellationToken cancellationToken = default);
} }
} }
\ No newline at end of file
...@@ -5,12 +5,10 @@ using Volo.Abp.MultiTenancy; ...@@ -5,12 +5,10 @@ using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Products.ProductCategories namespace EasyAbp.EShop.Products.ProductCategories
{ {
public class ProductCategory : AuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore public class ProductCategory : AuditedAggregateRoot<Guid>, IMultiTenant
{ {
public virtual Guid? TenantId { get; protected set; } public virtual Guid? TenantId { get; protected set; }
public virtual Guid StoreId { get; protected set; }
public virtual Guid CategoryId { get; protected set; } public virtual Guid CategoryId { get; protected set; }
public virtual Guid ProductId { get; protected set; } public virtual Guid ProductId { get; protected set; }
...@@ -24,14 +22,12 @@ namespace EasyAbp.EShop.Products.ProductCategories ...@@ -24,14 +22,12 @@ namespace EasyAbp.EShop.Products.ProductCategories
public ProductCategory( public ProductCategory(
Guid id, Guid id,
Guid? tenantId, Guid? tenantId,
Guid storeId,
Guid categoryId, Guid categoryId,
Guid productId, Guid productId,
int displayOrder = 0 int displayOrder = 0
) :base(id) ) :base(id)
{ {
TenantId = tenantId; TenantId = tenantId;
StoreId = storeId;
CategoryId = categoryId; CategoryId = categoryId;
ProductId = productId; ProductId = productId;
DisplayOrder = displayOrder; DisplayOrder = displayOrder;
......
using System;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Products.ProductStores
{
public interface IProductStoreRepository : IRepository<ProductStore, Guid>
{
Task<ProductStore> GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
using System;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Products.ProductStores
{
public class ProductStore : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore
{
public virtual Guid? TenantId { get; protected set; }
public virtual Guid StoreId { get; protected set; }
public virtual Guid ProductId { get; protected set; }
public virtual bool IsOwner { get; protected set; }
protected ProductStore() {}
public ProductStore(
Guid id,
Guid? tenantId,
Guid storeId,
Guid productId,
bool isOwner) : base(id)
{
TenantId = tenantId;
StoreId = storeId;
ProductId = productId;
IsOwner = isOwner;
}
}
}
\ No newline at end of file
using System; using System;
using System.Linq;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Products.Products namespace EasyAbp.EShop.Products.Products
{ {
public interface IProductRepository : IRepository<Product, Guid> public interface IProductRepository : IRepository<Product, Guid>
{ {
IQueryable<Product> GetQueryable(Guid storeId, Guid categoryId);
IQueryable<Product> GetQueryable(Guid storeId);
} }
} }
\ No newline at end of file
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using EasyAbp.EShop.Stores.Stores;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Products.Products namespace EasyAbp.EShop.Products.Products
{ {
public class Product : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore public class Product : FullAuditedAggregateRoot<Guid>
{ {
public virtual Guid? TenantId { get; protected set; }
public virtual Guid StoreId { get; protected set; }
public virtual Guid ProductTypeId { get; protected set; } public virtual Guid ProductTypeId { get; protected set; }
[NotNull] [NotNull]
...@@ -41,8 +35,6 @@ namespace EasyAbp.EShop.Products.Products ...@@ -41,8 +35,6 @@ namespace EasyAbp.EShop.Products.Products
public Product( public Product(
Guid id, Guid id,
Guid? tenantId,
Guid storeId,
Guid productTypeId, Guid productTypeId,
string displayName, string displayName,
InventoryStrategy inventoryStrategy, InventoryStrategy inventoryStrategy,
...@@ -51,8 +43,6 @@ namespace EasyAbp.EShop.Products.Products ...@@ -51,8 +43,6 @@ namespace EasyAbp.EShop.Products.Products
int displayOrder int displayOrder
) :base(id) ) :base(id)
{ {
TenantId = tenantId;
StoreId = storeId;
ProductTypeId = productTypeId; ProductTypeId = productTypeId;
DisplayName = displayName; DisplayName = displayName;
InventoryStrategy = inventoryStrategy; InventoryStrategy = inventoryStrategy;
......
using EasyAbp.EShop.Products.ProductStores;
using EasyAbp.EShop.Products.ProductCategories; using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductTypes; using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.Categories; using EasyAbp.EShop.Products.Categories;
...@@ -25,6 +26,7 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore ...@@ -25,6 +26,7 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
options.AddRepository<Category, CategoryRepository>(); options.AddRepository<Category, CategoryRepository>();
options.AddRepository<ProductType, ProductTypeRepository>(); options.AddRepository<ProductType, ProductTypeRepository>();
options.AddRepository<ProductCategory, ProductCategoryRepository>(); options.AddRepository<ProductCategory, ProductCategoryRepository>();
options.AddRepository<ProductStore, ProductStoreRepository>();
}); });
} }
} }
......
...@@ -5,6 +5,7 @@ using EasyAbp.EShop.Products.Products; ...@@ -5,6 +5,7 @@ using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Categories; using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.ProductTypes; using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.ProductCategories; using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductStores;
namespace EasyAbp.EShop.Products.EntityFrameworkCore namespace EasyAbp.EShop.Products.EntityFrameworkCore
{ {
...@@ -22,5 +23,6 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore ...@@ -22,5 +23,6 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
DbSet<Category> Categories { get; set; } DbSet<Category> Categories { get; set; }
DbSet<ProductType> ProductTypes { get; set; } DbSet<ProductType> ProductTypes { get; set; }
DbSet<ProductCategory> ProductCategories { get; set; } DbSet<ProductCategory> ProductCategories { get; set; }
DbSet<ProductStore> ProductStores { get; set; }
} }
} }
...@@ -5,6 +5,7 @@ using EasyAbp.EShop.Products.Products; ...@@ -5,6 +5,7 @@ using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Categories; using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.ProductTypes; using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.ProductCategories; using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductStores;
namespace EasyAbp.EShop.Products.EntityFrameworkCore namespace EasyAbp.EShop.Products.EntityFrameworkCore
{ {
...@@ -22,6 +23,7 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore ...@@ -22,6 +23,7 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
public DbSet<Category> Categories { get; set; } public DbSet<Category> Categories { get; set; }
public DbSet<ProductType> ProductTypes { get; set; } public DbSet<ProductType> ProductTypes { get; set; }
public DbSet<ProductCategory> ProductCategories { get; set; } public DbSet<ProductCategory> ProductCategories { get; set; }
public DbSet<ProductStore> ProductStores { get; set; }
public ProductsDbContext(DbContextOptions<ProductsDbContext> options) public ProductsDbContext(DbContextOptions<ProductsDbContext> options)
: base(options) : base(options)
......
using EasyAbp.EShop.Products.ProductStores;
using EasyAbp.EShop.Products.ProductCategories; using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductTypes; using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.Categories; using EasyAbp.EShop.Products.Categories;
...@@ -102,6 +103,13 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore ...@@ -102,6 +103,13 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
b.ConfigureByConvention(); b.ConfigureByConvention();
/* Configure more properties here */ /* Configure more properties here */
}); });
builder.Entity<ProductStore>(b =>
{
b.ToTable(options.TablePrefix + "ProductStores", options.Schema);
b.ConfigureByConvention();
/* Configure more properties here */
});
} }
} }
} }
...@@ -16,18 +16,16 @@ namespace EasyAbp.EShop.Products.ProductCategories ...@@ -16,18 +16,16 @@ namespace EasyAbp.EShop.Products.ProductCategories
{ {
} }
public virtual async Task<List<ProductCategory>> GetListByCategoryId(Guid categoryId, Guid storeId, public virtual async Task<List<ProductCategory>> GetListByCategoryIdAsync(Guid categoryId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await GetQueryable().Where(pc => pc.CategoryId == categoryId && pc.StoreId == storeId) return await GetQueryable().Where(pc => pc.CategoryId == categoryId).ToListAsync(cancellationToken);
.ToListAsync(cancellationToken);
} }
public virtual async Task<List<ProductCategory>> GetListByProductId(Guid productId, Guid storeId, public virtual async Task<List<ProductCategory>> GetListByProductIdAsync(Guid productId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
return await GetQueryable().Where(pc => pc.ProductId == productId && pc.StoreId == storeId) return await GetQueryable().Where(pc => pc.ProductId == productId).ToListAsync(cancellationToken);
.ToListAsync(cancellationToken);
} }
} }
} }
\ No newline at end of file
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Products.ProductStores
{
public class ProductStoreRepository : EfCoreRepository<ProductsDbContext, ProductStore, Guid>, IProductStoreRepository
{
public ProductStoreRepository(IDbContextProvider<ProductsDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public virtual async Task<ProductStore> GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default)
{
var entity = await GetQueryable().Where(x => x.ProductId == productId && x.StoreId == storeId)
.FirstOrDefaultAsync(cancellationToken);
if (entity == null)
{
throw new EntityNotFoundException(typeof(ProductStore), new {ProductId = productId, StoreId = storeId});
}
return entity;
}
}
}
\ No newline at end of file
...@@ -20,5 +20,22 @@ namespace EasyAbp.EShop.Products.Products ...@@ -20,5 +20,22 @@ namespace EasyAbp.EShop.Products.Products
.Include(x => x.ProductAttributes).ThenInclude(x => x.ProductAttributeOptions) .Include(x => x.ProductAttributes).ThenInclude(x => x.ProductAttributeOptions)
.Include(x => x.ProductSkus); .Include(x => x.ProductSkus);
} }
public IQueryable<Product> GetQueryable(Guid storeId, Guid categoryId)
{
return from product in DbContext.Products
join productStore in DbContext.ProductStores on product.Id equals productStore.ProductId
join productCategory in DbContext.ProductCategories on product.Id equals productCategory.ProductId
where productStore.StoreId == storeId && productCategory.CategoryId == categoryId
select product;
}
public IQueryable<Product> GetQueryable(Guid storeId)
{
return from product in DbContext.Products
join productStore in DbContext.ProductStores on product.Id equals productStore.ProductId
where productStore.StoreId == storeId
select product;
}
} }
} }
\ No newline at end of file
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Application.Contracts\EasyAbp.EShop.Stores.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Products.HttpApi\EasyAbp.EShop.Products.HttpApi.csproj" /> <ProjectReference Include="..\EasyAbp.EShop.Products.HttpApi\EasyAbp.EShop.Products.HttpApi.csproj" />
</ItemGroup> </ItemGroup>
......
...@@ -17,7 +17,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -17,7 +17,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
public class CreateModalModel : ProductsPageModel public class CreateModalModel : ProductsPageModel
{ {
[BindProperty] [BindProperty]
public CreateUpdateProductViewModel Product { get; set; } public CreateEditProductViewModel Product { get; set; }
public ICollection<SelectListItem> ProductTypes { get; set; } public ICollection<SelectListItem> ProductTypes { get; set; }
...@@ -37,7 +37,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -37,7 +37,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
_service = service; _service = service;
} }
public async Task OnGetAsync(Guid storeId) public virtual async Task OnGetAsync(Guid storeId, Guid? categoryId)
{ {
ProductTypes = ProductTypes =
(await _productTypeAppService.GetListAsync(new PagedAndSortedResultRequestDto (await _productTypeAppService.GetListAsync(new PagedAndSortedResultRequestDto
...@@ -49,15 +49,20 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -49,15 +49,20 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount}))?.Items {MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount}))?.Items
.Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList(); .Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
Product = new CreateUpdateProductViewModel Product = new CreateEditProductViewModel
{ {
StoreId = storeId StoreId = storeId
}; };
if (categoryId.HasValue)
{
Product.CategoryIds = new List<Guid>(new[] {categoryId.Value});
}
} }
public async Task<IActionResult> OnPostAsync() public virtual async Task<IActionResult> OnPostAsync()
{ {
await _service.CreateAsync(ObjectMapper.Map<CreateUpdateProductViewModel, CreateUpdateProductDto>(Product)); await _service.CreateAsync(ObjectMapper.Map<CreateEditProductViewModel, CreateUpdateProductDto>(Product));
return NoContent(); return NoContent();
} }
} }
......
...@@ -20,7 +20,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -20,7 +20,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
public Guid Id { get; set; } public Guid Id { get; set; }
[BindProperty] [BindProperty]
public CreateUpdateProductViewModel Product { get; set; } public CreateEditProductViewModel Product { get; set; }
public ICollection<SelectListItem> ProductTypes { get; set; } public ICollection<SelectListItem> ProductTypes { get; set; }
...@@ -40,7 +40,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -40,7 +40,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
_service = service; _service = service;
} }
public async Task OnGetAsync() public virtual async Task OnGetAsync(Guid storeId)
{ {
ProductTypes = ProductTypes =
(await _productTypeAppService.GetListAsync(new PagedAndSortedResultRequestDto (await _productTypeAppService.GetListAsync(new PagedAndSortedResultRequestDto
...@@ -53,13 +53,16 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product ...@@ -53,13 +53,16 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
.Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList(); .Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
var productDto = await _service.GetAsync(Id); var productDto = await _service.GetAsync(Id);
Product = ObjectMapper.Map<ProductDto, CreateUpdateProductViewModel>(productDto);
Product = ObjectMapper.Map<ProductDto, CreateEditProductViewModel>(productDto);
Product.StoreId = storeId;
} }
public async Task<IActionResult> OnPostAsync() public virtual async Task<IActionResult> OnPostAsync()
{ {
await _service.UpdateAsync(Id, await _service.UpdateAsync(Id,
ObjectMapper.Map<CreateUpdateProductViewModel, CreateUpdateProductDto>(Product)); ObjectMapper.Map<CreateEditProductViewModel, CreateUpdateProductDto>(Product));
return NoContent(); return NoContent();
} }
} }
......
...@@ -18,12 +18,16 @@ ...@@ -18,12 +18,16 @@
{ {
<abp-style src="/Pages/EShop/Products/Products/Product/index.css"/> <abp-style src="/Pages/EShop/Products/Products/Product/index.css"/>
} }
<script>
let storeId = '@Model.StoreId';
let categoryId = '@Model.CategoryId';
</script>
<abp-card> <abp-card>
<abp-card-header> <abp-card-header>
<abp-row> <abp-row>
<abp-column size-md="_6"> <abp-column size-md="_6">
<abp-card-title>@L["Product"]</abp-card-title> <abp-card-title>@L["Product"] - @Model.StoreName</abp-card-title>
</abp-column> </abp-column>
<abp-column size-md="_6" class="text-right"> <abp-column size-md="_6" class="text-right">
<abp-button id="NewProductButton" <abp-button id="NewProductButton"
...@@ -38,7 +42,6 @@ ...@@ -38,7 +42,6 @@
<thead> <thead>
<tr> <tr>
<th>@L["Actions"]</th> <th>@L["Actions"]</th>
<th>@L["ProductStoreId"]</th>
<th>@L["ProductProductTypeId"]</th> <th>@L["ProductProductTypeId"]</th>
<th>@L["ProductDisplayName"]</th> <th>@L["ProductDisplayName"]</th>
<th>@L["ProductInventoryStrategy"]</th> <th>@L["ProductInventoryStrategy"]</th>
......
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{ {
public class IndexModel : ProductsPageModel public class IndexModel : ProductsPageModel
{ {
public async Task OnGetAsync() private readonly IStoreAppService _storeAppService;
[BindProperty(SupportsGet = true)]
public Guid StoreId { get; set; }
[BindProperty(SupportsGet = true)]
public Guid? CategoryId { get; set; }
public string StoreName { get; set; }
public IndexModel(IStoreAppService storeAppService)
{
_storeAppService = storeAppService;
}
public virtual async Task OnGetAsync()
{ {
await Task.CompletedTask; StoreName = (await _storeAppService.GetAsync(StoreId)).Name;
} }
} }
} }
...@@ -9,7 +9,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; ...@@ -9,7 +9,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
{ {
public class CreateUpdateProductViewModel public class CreateEditProductViewModel
{ {
[HiddenInput] [HiddenInput]
[Display(Name = "ProductStore")] [Display(Name = "ProductStore")]
......
...@@ -14,7 +14,9 @@ $(function () { ...@@ -14,7 +14,9 @@ $(function () {
autoWidth: false, autoWidth: false,
scrollCollapse: true, scrollCollapse: true,
order: [[1, "asc"]], order: [[1, "asc"]],
ajax: abp.libs.datatables.createAjax(service.getList), ajax: abp.libs.datatables.createAjax(service.getList, function () {
return { storeId: storeId, categoryId: categoryId }
}),
columnDefs: [ columnDefs: [
{ {
rowAction: { rowAction: {
...@@ -23,7 +25,7 @@ $(function () { ...@@ -23,7 +25,7 @@ $(function () {
{ {
text: l('Edit'), text: l('Edit'),
action: function (data) { action: function (data) {
editModal.open({ id: data.record.id }); editModal.open({ id: data.record.id, storeId: storeId });
} }
}, },
{ {
...@@ -32,7 +34,7 @@ $(function () { ...@@ -32,7 +34,7 @@ $(function () {
return l('ProductDeletionConfirmationMessage', data.record.id); return l('ProductDeletionConfirmationMessage', data.record.id);
}, },
action: function (data) { action: function (data) {
service.delete(data.record.id) service.delete({ id: data.record.id, storeId: storeId })
.then(function () { .then(function () {
abp.notify.info(l('SuccessfullyDeleted')); abp.notify.info(l('SuccessfullyDeleted'));
dataTable.ajax.reload(); dataTable.ajax.reload();
...@@ -42,7 +44,6 @@ $(function () { ...@@ -42,7 +44,6 @@ $(function () {
] ]
} }
}, },
{ data: "storeId" },
{ data: "productTypeId" }, { data: "productTypeId" },
{ data: "displayName" }, { data: "displayName" },
{ data: "inventoryStrategy" }, { data: "inventoryStrategy" },
...@@ -61,6 +62,6 @@ $(function () { ...@@ -61,6 +62,6 @@ $(function () {
$('#NewProductButton').click(function (e) { $('#NewProductButton').click(function (e) {
e.preventDefault(); e.preventDefault();
createModal.open(); createModal.open({ storeId: storeId, categoryId: categoryId });
}); });
}); });
\ No newline at end of file
...@@ -10,6 +10,7 @@ using EasyAbp.EShop.Products.Localization; ...@@ -10,6 +10,7 @@ using EasyAbp.EShop.Products.Localization;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using EasyAbp.EShop.Products.Localization; using EasyAbp.EShop.Products.Localization;
using EasyAbp.EShop.Stores.Stores;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation;
...@@ -17,7 +18,7 @@ namespace EasyAbp.EShop.Products.Web ...@@ -17,7 +18,7 @@ namespace EasyAbp.EShop.Products.Web
{ {
public class ProductsMenuContributor : IMenuContributor public class ProductsMenuContributor : IMenuContributor
{ {
public async Task ConfigureMenuAsync(MenuConfigurationContext context) public virtual async Task ConfigureMenuAsync(MenuConfigurationContext context)
{ {
if (context.Menu.Name == StandardMenus.Main) if (context.Menu.Name == StandardMenus.Main)
{ {
...@@ -49,8 +50,12 @@ namespace EasyAbp.EShop.Products.Web ...@@ -49,8 +50,12 @@ namespace EasyAbp.EShop.Products.Web
if (await authorizationService.IsGrantedAsync(ProductsPermissions.Products.Default)) if (await authorizationService.IsGrantedAsync(ProductsPermissions.Products.Default))
{ {
var storeAppService = context.ServiceProvider.GetRequiredService<IStoreAppService>();
var defaultStore = (await storeAppService.GetDefaultAsync())?.Id;
productManagementMenuItem.AddItem( productManagementMenuItem.AddItem(
new ApplicationMenuItem("Product", l["Menu:Product"], "/EShop/Products/Products/Product") new ApplicationMenuItem("Product", l["Menu:Product"], "/EShop/Products/Products/Product?storeId=" + defaultStore)
); );
} }
......
...@@ -17,7 +17,8 @@ namespace EasyAbp.EShop.Products.Web ...@@ -17,7 +17,8 @@ namespace EasyAbp.EShop.Products.Web
/* You can configure your AutoMapper mapping configuration here. /* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations * Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */ * into multiple profile classes for a better organization. */
CreateMap<ProductDto, CreateUpdateProductViewModel>() CreateMap<ProductDto, CreateEditProductViewModel>()
.Ignore(dto => dto.StoreId)
// .Ignore(x => x.ProductAttributes); // .Ignore(x => x.ProductAttributes);
.ForMember(dest => dest.ProductAttributeNames, .ForMember(dest => dest.ProductAttributeNames,
opt => opt.MapFrom(source => opt => opt.MapFrom(source =>
...@@ -27,7 +28,7 @@ namespace EasyAbp.EShop.Products.Web ...@@ -27,7 +28,7 @@ namespace EasyAbp.EShop.Products.Web
x.ProductAttributes x.ProductAttributes
.Select(a => a.ProductAttributeOptions.Select(o => o.DisplayName).JoinAsString(",")) .Select(a => a.ProductAttributeOptions.Select(o => o.DisplayName).JoinAsString(","))
.JoinAsString(Environment.NewLine))); .JoinAsString(Environment.NewLine)));
CreateMap<CreateUpdateProductViewModel, CreateUpdateProductDto>() CreateMap<CreateEditProductViewModel, CreateUpdateProductDto>()
.ForMember(dest => dest.ProductAttributes, .ForMember(dest => dest.ProductAttributes,
opt => opt.MapFrom(x => opt => opt.MapFrom(x =>
x.ProductAttributeNames.Split(",", StringSplitOptions.RemoveEmptyEntries).Select((s, i) => x.ProductAttributeNames.Split(",", StringSplitOptions.RemoveEmptyEntries).Select((s, i) =>
......
using System.Threading.Tasks;
using Shouldly;
using Xunit;
namespace EasyAbp.EShop.Products.ProductStores
{
public class ProductStoreDomainTests : ProductsDomainTestBase
{
public ProductStoreDomainTests()
{
}
[Fact]
public async Task Test1()
{
// Arrange
// Assert
// Assert
}
}
}
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.ProductStores;
using Volo.Abp.Domain.Repositories;
using Xunit;
namespace EasyAbp.EShop.Products.EntityFrameworkCore.ProductStores
{
public class ProductStoreRepositoryTests : ProductsEntityFrameworkCoreTestBase
{
private readonly IRepository<ProductStore, Guid> _productStoreRepository;
public ProductStoreRepositoryTests()
{
_productStoreRepository = GetRequiredService<IRepository<ProductStore, Guid>>();
}
[Fact]
public async Task Test1()
{
await WithUnitOfWorkAsync(async () =>
{
// Arrange
// Act
//Assert
});
}
}
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -8,7 +8,12 @@ namespace EasyAbp.EShop.Stores.Authorization ...@@ -8,7 +8,12 @@ namespace EasyAbp.EShop.Stores.Authorization
{ {
public override void Define(IPermissionDefinitionContext context) public override void Define(IPermissionDefinitionContext context)
{ {
//var moduleGroup = context.AddGroup(StoresPermissions.GroupName, L("Permission:Stores")); var moduleGroup = context.AddGroup(StoresPermissions.GroupName, L("Permission:Stores"));
var stores = moduleGroup.AddPermission(StoresPermissions.Stores.Default, L("Permission:Store"));
stores.AddChild(StoresPermissions.Stores.Create, L("Permission:Create"));
stores.AddChild(StoresPermissions.Stores.Update, L("Permission:Update"));
stores.AddChild(StoresPermissions.Stores.Delete, L("Permission:Delete"));
} }
private static LocalizableString L(string name) private static LocalizableString L(string name)
......
...@@ -10,5 +10,13 @@ namespace EasyAbp.EShop.Stores.Authorization ...@@ -10,5 +10,13 @@ namespace EasyAbp.EShop.Stores.Authorization
{ {
return ReflectionHelper.GetPublicConstantsRecursively(typeof(StoresPermissions)); return ReflectionHelper.GetPublicConstantsRecursively(typeof(StoresPermissions));
} }
public class Stores
{
public const string Default = GroupName + ".Store";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
}
} }
} }
\ No newline at end of file
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace EasyAbp.EShop.Stores.Stores.Dtos
{
public class CreateUpdateStoreDto
{
[Required]
[DisplayName("StoreName")]
public string Name { get; set; }
}
}
\ No newline at end of file
using System;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Stores.Stores.Dtos
{
public class StoreDto : FullAuditedEntityDto<Guid>
{
public string Name { get; set; }
}
}
\ No newline at end of file
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Stores.Stores
{
public interface IStoreAppService :
ICrudAppService<
StoreDto,
Guid,
PagedAndSortedResultRequestDto,
CreateUpdateStoreDto,
CreateUpdateStoreDto>
{
Task<StoreDto> GetDefaultAsync();
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Stores.Stores
{
public class StoreAppService : CrudAppService<Store, StoreDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateStoreDto, CreateUpdateStoreDto>,
IStoreAppService
{
private readonly IStoreRepository _repository;
public StoreAppService(IStoreRepository repository) : base(repository)
{
_repository = repository;
}
public async Task<StoreDto> GetDefaultAsync()
{
// Todo: need to be improved
return ObjectMapper.Map<Store, StoreDto>(await _repository.FirstOrDefaultAsync());
}
}
}
\ No newline at end of file
using AutoMapper; using EasyAbp.EShop.Stores.Stores;
using EasyAbp.EShop.Stores.Stores.Dtos;
using AutoMapper;
namespace EasyAbp.EShop.Stores namespace EasyAbp.EShop.Stores
{ {
...@@ -9,6 +11,8 @@ namespace EasyAbp.EShop.Stores ...@@ -9,6 +11,8 @@ namespace EasyAbp.EShop.Stores
/* You can configure your AutoMapper mapping configuration here. /* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations * Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */ * into multiple profile classes for a better organization. */
CreateMap<Store, StoreDto>();
CreateMap<CreateUpdateStoreDto, Store>(MemberList.Source);
} }
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Localization\Stores\*.json" /> <EmbeddedResource Include="EasyAbp\EShop\Stores\Localization\Stores\*.json" />
<Content Remove="Localization\Stores\*.json" /> <Content Remove="EasyAbp\EShop\Stores\Localization\Stores\*.json" />
</ItemGroup> </ItemGroup>
</Project> </Project>
...@@ -17,7 +17,7 @@ namespace EasyAbp.EShop.Stores ...@@ -17,7 +17,7 @@ namespace EasyAbp.EShop.Stores
{ {
Configure<AbpVirtualFileSystemOptions>(options => Configure<AbpVirtualFileSystemOptions>(options =>
{ {
options.FileSets.AddEmbedded<EShopStoresDomainSharedModule>("EasyAbp.EShop.Stores"); options.FileSets.AddEmbedded<EShopStoresDomainSharedModule>();
}); });
Configure<AbpLocalizationOptions>(options => Configure<AbpLocalizationOptions>(options =>
...@@ -25,12 +25,12 @@ namespace EasyAbp.EShop.Stores ...@@ -25,12 +25,12 @@ namespace EasyAbp.EShop.Stores
options.Resources options.Resources
.Add<StoresResource>("en") .Add<StoresResource>("en")
.AddBaseTypes(typeof(AbpValidationResource)) .AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/Stores"); .AddVirtualJson("/EasyAbp/EShop/Stores/Localization/Stores");
}); });
Configure<AbpExceptionLocalizationOptions>(options => Configure<AbpExceptionLocalizationOptions>(options =>
{ {
options.MapCodeNamespace("Stores", typeof(StoresResource)); options.MapCodeNamespace("EasyAbp.EShop.Stores", typeof(StoresResource));
}); });
} }
} }
......
{
"culture": "cs",
"texts": {
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "en",
"texts": {
"ManageYourProfile": "Manage your profile",
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "pl",
"texts": {
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "pt-BR",
"texts": {
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "sl",
"texts": {
"ManageYourProfile": "Upravljajte svojim profilom",
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "tr",
"texts": {
"ManageYourProfile": "Profil y�netimi",
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "vi",
"texts": {
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "zh-Hans",
"texts": {
"ManageYourProfile": "管理个人资料",
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "zh-Hant",
"texts": {
"ManageYourProfile": "管理個人資料",
"Menu:Store": "MenuStore",
"Store": "Store",
"StoreName": "StoreName",
"CreateStore": "CreateStore",
"EditStore": "EditStore",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted"
}
}
\ No newline at end of file
{
"culture": "en",
"texts": {
"ManageYourProfile": "Manage your profile"
}
}
\ No newline at end of file
{
"culture": "sl",
"texts": {
"ManageYourProfile": "Upravljajte svojim profilom"
}
}
\ No newline at end of file
{
"culture": "tr",
"texts": {
"ManageYourProfile": "Profil ynetimi"
}
}
\ No newline at end of file
{
"culture": "zh-Hans",
"texts": {
"ManageYourProfile": "管理个人资料"
}
}
\ No newline at end of file
{
"culture": "zh-Hant",
"texts": {
"ManageYourProfile": "管理個人資料"
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
using System;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Stores.Stores
{
public interface IStoreRepository : IRepository<Store, Guid>
{
Task<Store> FirstOrDefaultAsync(CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
using System; using System;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
...@@ -7,5 +8,19 @@ namespace EasyAbp.EShop.Stores.Stores ...@@ -7,5 +8,19 @@ namespace EasyAbp.EShop.Stores.Stores
public class Store : FullAuditedAggregateRoot<Guid>, IMultiTenant public class Store : FullAuditedAggregateRoot<Guid>, IMultiTenant
{ {
public virtual Guid? TenantId { get; protected set; } public virtual Guid? TenantId { get; protected set; }
[NotNull]
public virtual string Name { get; protected set; }
// Todo: more properties.
protected Store() {}
public Store(
Guid id,
[NotNull] string name) : base(id)
{
Name = name;
}
} }
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -12,4 +12,8 @@ ...@@ -12,4 +12,8 @@
<ProjectReference Include="..\EasyAbp.EShop.Stores.Domain\EasyAbp.EShop.Stores.Domain.csproj" /> <ProjectReference Include="..\EasyAbp.EShop.Stores.Domain\EasyAbp.EShop.Stores.Domain.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="EasyAbp\EShop\Stores" />
</ItemGroup>
</Project> </Project>
using Microsoft.Extensions.DependencyInjection; using EasyAbp.EShop.Stores.Stores;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
...@@ -17,6 +18,7 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore ...@@ -17,6 +18,7 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore
/* Add custom repositories here. Example: /* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>(); * options.AddRepository<Question, EfCoreQuestionRepository>();
*/ */
options.AddRepository<Store, StoreRepository>();
}); });
} }
} }
......
using Volo.Abp.Data; using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using EasyAbp.EShop.Stores.Stores;
namespace EasyAbp.EShop.Stores.EntityFrameworkCore namespace EasyAbp.EShop.Stores.EntityFrameworkCore
{ {
...@@ -9,5 +11,6 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore ...@@ -9,5 +11,6 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore
/* Add DbSet for each Aggregate Root here. Example: /* Add DbSet for each Aggregate Root here. Example:
* DbSet<Question> Questions { get; } * DbSet<Question> Questions { get; }
*/ */
DbSet<Store> Stores { get; set; }
} }
} }
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using EasyAbp.EShop.Stores.Stores;
namespace EasyAbp.EShop.Stores.EntityFrameworkCore namespace EasyAbp.EShop.Stores.EntityFrameworkCore
{ {
...@@ -10,6 +11,7 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore ...@@ -10,6 +11,7 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore
/* Add DbSet for each Aggregate Root here. Example: /* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; } * public DbSet<Question> Questions { get; set; }
*/ */
public DbSet<Store> Stores { get; set; }
public StoresDbContext(DbContextOptions<StoresDbContext> options) public StoresDbContext(DbContextOptions<StoresDbContext> options)
: base(options) : base(options)
......
using System; using EasyAbp.EShop.Stores.Stores;
using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace EasyAbp.EShop.Stores.EntityFrameworkCore namespace EasyAbp.EShop.Stores.EntityFrameworkCore
{ {
...@@ -38,6 +40,13 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore ...@@ -38,6 +40,13 @@ namespace EasyAbp.EShop.Stores.EntityFrameworkCore
b.HasIndex(q => q.CreationTime); b.HasIndex(q => q.CreationTime);
}); });
*/ */
builder.Entity<Store>(b =>
{
b.ToTable(options.TablePrefix + "Stores", options.Schema);
b.ConfigureByConvention();
/* Configure more properties here */
});
} }
} }
} }
using System;
using System.Threading;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Stores.Stores
{
public class StoreRepository : EfCoreRepository<StoresDbContext, Store, Guid>, IStoreRepository
{
public StoreRepository(IDbContextProvider<StoresDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public async Task<Store> FirstOrDefaultAsync(CancellationToken cancellationToken = default)
{
return await WithDetails().FirstOrDefaultAsync(cancellationToken: cancellationToken);
}
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Stores</RootNamespace> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -12,4 +12,8 @@ ...@@ -12,4 +12,8 @@
<ProjectReference Include="..\EasyAbp.EShop.Stores.Domain\EasyAbp.EShop.Stores.Domain.csproj" /> <ProjectReference Include="..\EasyAbp.EShop.Stores.Domain\EasyAbp.EShop.Stores.Domain.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="EasyAbp\EShop\Stores" />
</ItemGroup>
</Project> </Project>
...@@ -36,7 +36,17 @@ ...@@ -36,7 +36,17 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Pages\EShop" />
<Folder Include="Pages\EShop\Stores\Stores" />
<Folder Include="wwwroot\" /> <Folder Include="wwwroot\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Pages\Stores\Index.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Stores\Store\CreateModal.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Stores\Store\EditModal.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Stores\Store\Index.cshtml" />
<_ContentIncludedByDefault Remove="Pages\Stores\_ViewImports.cshtml" />
</ItemGroup>
</Project> </Project>
namespace EasyAbp.EShop.Stores.Web.Pages.Stores namespace EasyAbp.EShop.Stores.Web.Pages.EShop.Stores
{ {
public class IndexModel : StoresPageModel public class IndexModel : StoresPageModel
{ {
......
@page
@inherits EasyAbp.EShop.Stores.Web.Pages.StoresPage
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@model EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.CreateModalModel
@{
Layout = null;
}
<abp-dynamic-form abp-model="Store" data-ajaxForm="true" asp-page="CreateModal">
<abp-modal>
<abp-modal-header title="@L["CreateStore"].Value"></abp-modal-header>
<abp-modal-body>
<abp-form-content />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>
</abp-dynamic-form>
\ No newline at end of file
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores;
using EasyAbp.EShop.Stores.Stores.Dtos;
using EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.ViewModels;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store
{
public class CreateModalModel : StoresPageModel
{
[BindProperty]
public CreateEditStoreViewModel Store { get; set; }
private readonly IStoreAppService _service;
public CreateModalModel(IStoreAppService service)
{
_service = service;
}
public async Task<IActionResult> OnPostAsync()
{
await _service.CreateAsync(ObjectMapper.Map<CreateEditStoreViewModel, CreateUpdateStoreDto>(Store));
return NoContent();
}
}
}
\ No newline at end of file
@page
@inherits EasyAbp.EShop.Stores.Web.Pages.StoresPage
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@model EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.EditModalModel
@{
Layout = null;
}
<abp-dynamic-form abp-model="Store" data-ajaxForm="true" asp-page="EditModal">
<abp-modal>
<abp-modal-header title="@L["EditStore"].Value"></abp-modal-header>
<abp-modal-body>
<abp-input asp-for="Id" />
<abp-form-content />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>
</abp-dynamic-form>
\ No newline at end of file
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores;
using EasyAbp.EShop.Stores.Stores.Dtos;
using EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.ViewModels;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store
{
public class EditModalModel : StoresPageModel
{
[HiddenInput]
[BindProperty(SupportsGet = true)]
public Guid Id { get; set; }
[BindProperty]
public CreateEditStoreViewModel Store { get; set; }
private readonly IStoreAppService _service;
public EditModalModel(IStoreAppService service)
{
_service = service;
}
public async Task OnGetAsync()
{
var dto = await _service.GetAsync(Id);
Store = ObjectMapper.Map<StoreDto, CreateEditStoreViewModel>(dto);
}
public async Task<IActionResult> OnPostAsync()
{
await _service.UpdateAsync(Id, ObjectMapper.Map<CreateEditStoreViewModel, CreateUpdateStoreDto>(Store));
return NoContent();
}
}
}
\ No newline at end of file
@page
@inherits EasyAbp.EShop.Stores.Web.Pages.StoresPage
@model EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.IndexModel
@section scripts
{
<abp-script src="/Pages/EShop/Stores/Stores/Store/index.js" />
}
@section styles
{
<abp-style src="/Pages/EShop/Stores/Stores/Store/index.css"/>
}
<abp-card>
<abp-card-header>
<abp-row>
<abp-column size-md="_2">
<h2>@L["Store"]</h2>
</abp-column>
<abp-column size-md="_10" class="text-right">
<abp-button id="NewStoreButton"
text="@L["CreateStore"].Value"
icon="plus"
button-type="Primary" />
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" id="StoreTable">
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["Name"]</th>
</tr>
</thead>
</abp-table>
</abp-card-body>
</abp-card>
\ No newline at end of file
using System.Threading.Tasks;
namespace EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store
{
public class IndexModel : StoresPageModel
{
public async Task OnGetAsync()
{
await Task.CompletedTask;
}
}
}
$(function () {
var l = abp.localization.getResource('Stores');
var service = easyAbp.eShop.stores.stores.store;
var createModal = new abp.ModalManager(abp.appPath + 'EShop/Stores/Stores/Store/CreateModal');
var editModal = new abp.ModalManager(abp.appPath + 'EShop/Stores/Stores/Store/EditModal');
var dataTable = $('#StoreTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
paging: true,
searching: false,
autoWidth: false,
scrollCollapse: true,
order: [[1, "asc"]],
ajax: abp.libs.datatables.createAjax(service.getList),
columnDefs: [
{
rowAction: {
items:
[
{
text: l('Edit'),
action: function (data) {
editModal.open({ id: data.record.id });
}
},
{
text: l('Delete'),
confirmMessage: function (data) {
return l('StoreDeletionConfirmationMessage', data.record.id);
},
action: function (data) {
service.delete(data.record.id)
.then(function () {
abp.notify.info(l('SuccessfullyDeleted'));
dataTable.ajax.reload();
});
}
}
]
}
},
{ data: "name" },
]
}));
createModal.onResult(function () {
dataTable.ajax.reload();
});
editModal.onResult(function () {
dataTable.ajax.reload();
});
$('#NewStoreButton').click(function (e) {
e.preventDefault();
createModal.open();
});
});
\ No newline at end of file
using System.ComponentModel.DataAnnotations;
namespace EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.ViewModels
{
public class CreateEditStoreViewModel
{
[Required]
[Display(Name = "StoreName")]
public string Name { get; set; }
}
}
\ No newline at end of file
using System.Threading.Tasks; using System.Collections.Generic;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Authorization;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using EasyAbp.EShop.Stores.Localization;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation;
namespace EasyAbp.EShop.Stores.Web namespace EasyAbp.EShop.Stores.Web
...@@ -13,11 +19,28 @@ namespace EasyAbp.EShop.Stores.Web ...@@ -13,11 +19,28 @@ namespace EasyAbp.EShop.Stores.Web
} }
} }
private Task ConfigureMainMenu(MenuConfigurationContext context) private async Task ConfigureMainMenu(MenuConfigurationContext context)
{ {
//Add main menu items. var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<StoresResource>>(); //Add main menu items.
return Task.CompletedTask; var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
var storeManagementMenuItem = new ApplicationMenuItem("StoreManagement", l["Menu:StoreManagement"]);
if (await authorizationService.IsGrantedAsync(StoresPermissions.Stores.Default))
{
storeManagementMenuItem.AddItem(
new ApplicationMenuItem("Store", l["Menu:Store"], "/EShop/Stores/Stores/Store")
);
}
if (!storeManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == "EasyAbpEShop",
() => new ApplicationMenuItem("EasyAbpEShop", l["Menu:EasyAbpEShop"]));
eShopMenuItem.Items.Add(storeManagementMenuItem);
}
} }
} }
} }
using AutoMapper; using EasyAbp.EShop.Stores.Stores.Dtos;
using AutoMapper;
using EasyAbp.EShop.Stores.Web.Pages.EShop.Stores.Stores.Store.ViewModels;
namespace EasyAbp.EShop.Stores.Web namespace EasyAbp.EShop.Stores.Web
{ {
...@@ -9,6 +11,8 @@ namespace EasyAbp.EShop.Stores.Web ...@@ -9,6 +11,8 @@ namespace EasyAbp.EShop.Stores.Web
/* You can configure your AutoMapper mapping configuration here. /* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations * Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */ * into multiple profile classes for a better organization. */
CreateMap<StoreDto, CreateEditStoreViewModel>();
CreateMap<CreateEditStoreViewModel, CreateUpdateStoreDto>();
} }
} }
} }
using Shouldly;
using System.Threading.Tasks;
using Xunit;
namespace EasyAbp.EShop.Stores.Stores
{
public class StoreAppServiceTests : StoresApplicationTestBase
{
private readonly IStoreAppService _storeAppService;
public StoreAppServiceTests()
{
_storeAppService = GetRequiredService<IStoreAppService>();
}
[Fact]
public async Task Test1()
{
// Arrange
// Act
// Assert
}
}
}
using System.Threading.Tasks;
using Shouldly;
using Xunit;
namespace EasyAbp.EShop.Stores.Stores
{
public class StoreDomainTests : StoresDomainTestBase
{
public StoreDomainTests()
{
}
[Fact]
public async Task Test1()
{
// Arrange
// Assert
// Assert
}
}
}
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Domain.Repositories;
using Xunit;
namespace EasyAbp.EShop.Stores.EntityFrameworkCore.Stores
{
public class StoreRepositoryTests : StoresEntityFrameworkCoreTestBase
{
private readonly IRepository<Store, Guid> _storeRepository;
public StoreRepositoryTests()
{
_storeRepository = GetRequiredService<IRepository<Store, Guid>>();
}
[Fact]
public async Task Test1()
{
await WithUnitOfWorkAsync(async () =>
{
// Arrange
// Act
//Assert
});
}
}
}
// <auto-generated />
using System;
using EasyMall.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace EasyMall.Migrations
{
[DbContext(typeof(EasyMallMigrationsDbContext))]
[Migration("20200427153957_AddedProductStore")]
partial class AddedProductStore
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ParentCategoryId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsOwner")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductStores");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("MultiTenancySide")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("ProductsProductTypes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<int>("InventoryStrategy")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsPublished")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("ProductTypeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProducts");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductAttributes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductAttributeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductAttributeId");
b.ToTable("ProductsProductAttributeOptions");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.HasKey("ProductId");
b.ToTable("ProductsProductDetails");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<int>("Inventory")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("OrderMinQuantity")
.HasColumnType("int");
b.Property<decimal>("OriginalPrice")
.HasColumnType("decimal(18,6)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,6)");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("SerializedAttributeOptionIds")
.HasColumnType("nvarchar(max)");
b.Property<int>("Sold")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductSkus");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode")
.HasColumnType("int");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Url")
.HasColumnName("Url")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime")
.HasColumnType("datetime2");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType")
.HasColumnType("tinyint");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("EntityChangeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime")
.HasColumnType("datetime2");
b.Property<DateTime>("NextTryTime")
.HasColumnType("datetime2");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint")
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpFeatureValues");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Description")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Regex")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<int>("ValueType")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault")
.HasColumnType("bit");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic")
.HasColumnType("bit");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Email")
.IsRequired()
.HasColumnName("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("Name")
.HasColumnName("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.IsRequired()
.HasColumnName("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(196)")
.HasMaxLength(196);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Name")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("ApiResourceId", "Name");
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Name", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenType")
.HasColumnType("int");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("bit");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("bit");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("bit");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("bit");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("bit");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("int");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<int?>("ConsentLifetime")
.HasColumnType("int");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("int");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("int");
b.Property<bool>("IncludeJwtId")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LogoUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ProtocolType")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("int");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("int");
b.Property<bool>("RequireClientSecret")
.HasColumnType("bit");
b.Property<bool>("RequireConsent")
.HasColumnType("bit");
b.Property<bool>("RequirePkce")
.HasColumnType("bit");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("int");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("bit");
b.Property<string>("UserCodeType")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<int?>("UserSsoLifetime")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("IdentityServerClients");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Origin")
.HasColumnType("nvarchar(150)")
.HasMaxLength(150);
b.HasKey("ClientId", "Origin");
b.ToTable("IdentityServerClientCorsOrigins");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("GrantType")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "GrantType");
b.ToTable("IdentityServerClientGrantTypes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Provider")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Provider");
b.ToTable("IdentityServerClientIdPRestrictions");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("IdentityServerClientPostLogoutRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.ToTable("IdentityServerClientProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("RedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "RedirectUri");
b.ToTable("IdentityServerClientRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Scope")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Scope");
b.ToTable("IdentityServerClientScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("DeviceCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.IsRequired()
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("UserCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("Id");
b.HasIndex("DeviceCode")
.IsUnique();
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.ToTable("IdentityServerDeviceFlowCodes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
{
b.Property<string>("Key")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(50)")
.HasMaxLength(50);
b.HasKey("Key");
b.HasIndex("Expiration");
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2048)")
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductAttributes")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.ProductAttribute", null)
.WithMany("ProductAttributeOptions")
.HasForeignKey("ProductAttributeId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithOne("ProductDetail")
.HasForeignKey("EasyAbp.EShop.Products.Products.ProductDetail", "ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductSkus")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null)
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId", "Name")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedProductStore : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StoreId",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "TenantId",
table: "ProductsProducts");
migrationBuilder.AddColumn<string>(
name: "Currency",
table: "ProductsProductSkus",
nullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
nullable: false,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.CreateTable(
name: "ProductsProductStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
ProductId = table.Column<Guid>(nullable: false),
IsOwner = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductStores", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProductsProductStores");
migrationBuilder.DropColumn(
name: "Currency",
table: "ProductsProductSkus");
migrationBuilder.AddColumn<Guid>(
name: "StoreId",
table: "ProductsProducts",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "TenantId",
table: "ProductsProducts",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(Guid));
}
}
}
// <auto-generated />
using System;
using EasyMall.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace EasyMall.Migrations
{
[DbContext(typeof(EasyMallMigrationsDbContext))]
[Migration("20200427175718_RemovedStoreIdFromProductCategory")]
partial class RemovedStoreIdFromProductCategory
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ParentCategoryId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsOwner")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductStores");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("MultiTenancySide")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("ProductsProductTypes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<int>("InventoryStrategy")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsPublished")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("ProductTypeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProducts");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductAttributes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductAttributeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductAttributeId");
b.ToTable("ProductsProductAttributeOptions");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.HasKey("ProductId");
b.ToTable("ProductsProductDetails");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<int>("Inventory")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("OrderMinQuantity")
.HasColumnType("int");
b.Property<decimal>("OriginalPrice")
.HasColumnType("decimal(18,6)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,6)");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("SerializedAttributeOptionIds")
.HasColumnType("nvarchar(max)");
b.Property<int>("Sold")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductSkus");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode")
.HasColumnType("int");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Url")
.HasColumnName("Url")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime")
.HasColumnType("datetime2");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType")
.HasColumnType("tinyint");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("EntityChangeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime")
.HasColumnType("datetime2");
b.Property<DateTime>("NextTryTime")
.HasColumnType("datetime2");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint")
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpFeatureValues");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Description")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Regex")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<int>("ValueType")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault")
.HasColumnType("bit");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic")
.HasColumnType("bit");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Email")
.IsRequired()
.HasColumnName("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("Name")
.HasColumnName("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.IsRequired()
.HasColumnName("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(196)")
.HasMaxLength(196);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Name")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("ApiResourceId", "Name");
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Name", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenType")
.HasColumnType("int");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("bit");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("bit");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("bit");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("bit");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("bit");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("int");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<int?>("ConsentLifetime")
.HasColumnType("int");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("int");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("int");
b.Property<bool>("IncludeJwtId")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LogoUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ProtocolType")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("int");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("int");
b.Property<bool>("RequireClientSecret")
.HasColumnType("bit");
b.Property<bool>("RequireConsent")
.HasColumnType("bit");
b.Property<bool>("RequirePkce")
.HasColumnType("bit");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("int");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("bit");
b.Property<string>("UserCodeType")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<int?>("UserSsoLifetime")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("IdentityServerClients");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Origin")
.HasColumnType("nvarchar(150)")
.HasMaxLength(150);
b.HasKey("ClientId", "Origin");
b.ToTable("IdentityServerClientCorsOrigins");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("GrantType")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "GrantType");
b.ToTable("IdentityServerClientGrantTypes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Provider")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Provider");
b.ToTable("IdentityServerClientIdPRestrictions");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("IdentityServerClientPostLogoutRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.ToTable("IdentityServerClientProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("RedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "RedirectUri");
b.ToTable("IdentityServerClientRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Scope")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Scope");
b.ToTable("IdentityServerClientScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("DeviceCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.IsRequired()
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("UserCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("Id");
b.HasIndex("DeviceCode")
.IsUnique();
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.ToTable("IdentityServerDeviceFlowCodes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
{
b.Property<string>("Key")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(50)")
.HasMaxLength(50);
b.HasKey("Key");
b.HasIndex("Expiration");
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2048)")
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductAttributes")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.ProductAttribute", null)
.WithMany("ProductAttributeOptions")
.HasForeignKey("ProductAttributeId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithOne("ProductDetail")
.HasForeignKey("EasyAbp.EShop.Products.Products.ProductDetail", "ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductSkus")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null)
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId", "Name")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class RemovedStoreIdFromProductCategory : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StoreId",
table: "ProductsProductCategories");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
}
}
// <auto-generated />
using System;
using EasyMall.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace EasyMall.Migrations
{
[DbContext(typeof(EasyMallMigrationsDbContext))]
[Migration("20200427184312_AddedStore")]
partial class AddedStore
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ParentCategoryId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsOwner")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductStores");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("MultiTenancySide")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("ProductsProductTypes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<int>("InventoryStrategy")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsPublished")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MediaResources")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("ProductTypeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProducts");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductAttributes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisplayOrder")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ProductAttributeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProductAttributeId");
b.ToTable("ProductsProductAttributeOptions");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.HasKey("ProductId");
b.ToTable("ProductsProductDetails");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<int>("Inventory")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<int>("OrderMinQuantity")
.HasColumnType("int");
b.Property<decimal>("OriginalPrice")
.HasColumnType("decimal(18,6)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,6)");
b.Property<Guid?>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<string>("SerializedAttributeOptionIds")
.HasColumnType("nvarchar(max)");
b.Property<int>("Sold")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProductId");
b.ToTable("ProductsProductSkus");
});
modelBuilder.Entity("EasyAbp.EShop.Stores.Stores.Store", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("StoresStores");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode")
.HasColumnType("int");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Url")
.HasColumnName("Url")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime")
.HasColumnType("datetime2");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType")
.HasColumnType("tinyint");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("EntityChangeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime")
.HasColumnType("datetime2");
b.Property<DateTime>("NextTryTime")
.HasColumnType("datetime2");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint")
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpFeatureValues");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Description")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Regex")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<int>("ValueType")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault")
.HasColumnType("bit");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic")
.HasColumnType("bit");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Email")
.IsRequired()
.HasColumnName("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("Name")
.HasColumnName("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.IsRequired()
.HasColumnName("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(196)")
.HasMaxLength(196);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Name")
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("ApiResourceId", "Name");
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Name", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("int");
b.Property<int>("AccessTokenType")
.HasColumnType("int");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("bit");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("bit");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("bit");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("bit");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("bit");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("int");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<int?>("ConsentLifetime")
.HasColumnType("int");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("int");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("bit");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("int");
b.Property<bool>("IncludeJwtId")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LogoUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ProtocolType")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("int");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("int");
b.Property<bool>("RequireClientSecret")
.HasColumnType("bit");
b.Property<bool>("RequireConsent")
.HasColumnType("bit");
b.Property<bool>("RequirePkce")
.HasColumnType("bit");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("int");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("bit");
b.Property<string>("UserCodeType")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<int?>("UserSsoLifetime")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("IdentityServerClients");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Origin")
.HasColumnType("nvarchar(150)")
.HasMaxLength(150);
b.HasKey("ClientId", "Origin");
b.ToTable("IdentityServerClientCorsOrigins");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("GrantType")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.HasKey("ClientId", "GrantType");
b.ToTable("IdentityServerClientGrantTypes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Provider")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Provider");
b.ToTable("IdentityServerClientIdPRestrictions");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("IdentityServerClientPostLogoutRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.ToTable("IdentityServerClientProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("RedirectUri")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "RedirectUri");
b.ToTable("IdentityServerClientRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Scope")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ClientId", "Scope");
b.ToTable("IdentityServerClientScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.Property<Guid>("ClientId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("DeviceCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.IsRequired()
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("UserCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("Id");
b.HasIndex("DeviceCode")
.IsUnique();
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.ToTable("IdentityServerDeviceFlowCodes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
{
b.Property<string>("Key")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(50)")
.HasMaxLength(50);
b.HasKey("Key");
b.HasIndex("Expiration");
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2048)")
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(1024)")
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductAttributes")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.ProductAttribute", null)
.WithMany("ProductAttributeOptions")
.HasForeignKey("ProductAttributeId");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithOne("ProductDetail")
.HasForeignKey("EasyAbp.EShop.Products.Products.ProductDetail", "ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
{
b.HasOne("EasyAbp.EShop.Products.Products.Product", null)
.WithMany("ProductSkus")
.HasForeignKey("ProductId");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null)
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId", "Name")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null)
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedStore : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "StoresStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_StoresStores", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "StoresStores");
}
}
}
...@@ -125,7 +125,67 @@ namespace EasyMall.Migrations ...@@ -125,7 +125,67 @@ namespace EasyMall.Migrations
b.Property<Guid>("ProductId") b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("StoreId") b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<bool>("IsOwner")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ProductId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StoreId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
...@@ -134,7 +194,7 @@ namespace EasyMall.Migrations ...@@ -134,7 +194,7 @@ namespace EasyMall.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("ProductsProductCategories"); b.ToTable("ProductsProductStores");
}); });
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b => modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
...@@ -262,13 +322,6 @@ namespace EasyMall.Migrations ...@@ -262,13 +322,6 @@ namespace EasyMall.Migrations
b.Property<Guid>("ProductTypeId") b.Property<Guid>("ProductTypeId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("ProductsProducts"); b.ToTable("ProductsProducts");
...@@ -411,6 +464,9 @@ namespace EasyMall.Migrations ...@@ -411,6 +464,9 @@ namespace EasyMall.Migrations
.HasColumnName("CreatorId") .HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId") b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId") .HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
...@@ -461,6 +517,63 @@ namespace EasyMall.Migrations ...@@ -461,6 +517,63 @@ namespace EasyMall.Migrations
b.ToTable("ProductsProductSkus"); b.ToTable("ProductsProductSkus");
}); });
modelBuilder.Entity("EasyAbp.EShop.Stores.Stores.Store", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("StoresStores");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment