Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EShop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
EShop
Commits
9f524666
Commit
9f524666
authored
Apr 21, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed product management (except SKU management)
parent
b8f69bae
Changes
39
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
5156 additions
and
63 deletions
+5156
-63
CreateUpdateProductAttributeDto.cs
...Products/Products/Dtos/CreateUpdateProductAttributeDto.cs
+21
-0
CreateUpdateProductAttributeOptionDto.cs
...ts/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs
+18
-0
CreateUpdateProductDto.cs
...bp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs
+30
-2
ProductAttributeDto.cs
...syAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs
+3
-1
ProductAttributeOptionDto.cs
...EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs
+2
-0
ProductDto.cs
...tracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs
+5
-3
ProductAppService.cs
...tion/EasyAbp/EShop/Products/Products/ProductAppService.cs
+93
-4
ProductsApplicationAutoMapperProfile.cs
...bp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
+2
-1
cs.json
...ared/EasyAbp/EShop/Products/Localization/Products/cs.json
+12
-3
en.json
...ared/EasyAbp/EShop/Products/Localization/Products/en.json
+12
-3
pl.json
...ared/EasyAbp/EShop/Products/Localization/Products/pl.json
+12
-3
pt-BR.json
...d/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
+12
-3
sl.json
...ared/EasyAbp/EShop/Products/Localization/Products/sl.json
+12
-3
tr.json
...ared/EasyAbp/EShop/Products/Localization/Products/tr.json
+12
-3
vi.json
...ared/EasyAbp/EShop/Products/Localization/Products/vi.json
+12
-3
zh-Hans.json
...EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
+12
-3
zh-Hant.json
...EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
+12
-3
IProductCategoryRepository.cs
.../Products/ProductCategories/IProductCategoryRepository.cs
+2
-2
ProductCategory.cs
...syAbp/EShop/Products/ProductCategories/ProductCategory.cs
+1
-1
Product.cs
...roducts.Domain/EasyAbp/EShop/Products/Products/Product.cs
+11
-3
ProductAttribute.cs
...omain/EasyAbp/EShop/Products/Products/ProductAttribute.cs
+21
-1
ProductAttributeOption.cs
...EasyAbp/EShop/Products/Products/ProductAttributeOption.cs
+15
-0
ProductSku.cs
...ucts.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
+21
-0
ProductsDbContextModelCreatingExtensions.cs
...FrameworkCore/ProductsDbContextModelCreatingExtensions.cs
+2
-0
ProductCategoryRepository.cs
...p/Products/ProductCategories/ProductCategoryRepository.cs
+2
-2
ProductRepository.cs
...Core/EasyAbp/EShop/Products/Products/ProductRepository.cs
+10
-0
CreateModal.cshtml
.../Pages/EShop/Products/Products/Product/CreateModal.cshtml
+0
-1
CreateModal.cshtml.cs
...ges/EShop/Products/Products/Product/CreateModal.cshtml.cs
+17
-5
EditModal.cshtml.cs
...Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
+34
-5
CreateUpdateProductAttributeOptionViewModel.cs
...ViewModels/CreateUpdateProductAttributeOptionViewModel.cs
+17
-0
CreateUpdateProductAttributeViewModel.cs
...oduct/ViewModels/CreateUpdateProductAttributeViewModel.cs
+20
-0
CreateUpdateProductDetailViewModel.cs
.../Product/ViewModels/CreateUpdateProductDetailViewModel.cs
+17
-0
CreateUpdateProductViewModel.cs
...oducts/Product/ViewModels/CreateUpdateProductViewModel.cs
+56
-0
ProductsWebAutoMapperProfile.cs
...asyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs
+33
-3
20200421093934_AddedDisplayOrder.Designer.cs
...s/Migrations/20200421093934_AddedDisplayOrder.Designer.cs
+2248
-0
20200421093934_AddedDisplayOrder.cs
...Migrations/Migrations/20200421093934_AddedDisplayOrder.cs
+43
-0
20200421101524_SetPricePrecision.Designer.cs
...s/Migrations/20200421101524_SetPricePrecision.Designer.cs
+2248
-0
20200421101524_SetPricePrecision.cs
...Migrations/Migrations/20200421101524_SetPricePrecision.cs
+45
-0
EasyMallMigrationsDbContextModelSnapshot.cs
...ns/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs
+11
-2
No files found.
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeDto.cs
0 → 100644
View file @
9f524666
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel.DataAnnotations
;
namespace
EasyAbp.EShop.Products.Products.Dtos
{
public
class
CreateUpdateProductAttributeDto
{
[
Required
]
[
DisplayName
(
"ProductAttributeDisplayName"
)]
public
string
DisplayName
{
get
;
set
;
}
[
DisplayName
(
"ProductAttributeDescription"
)]
public
string
Description
{
get
;
set
;
}
[
DisplayName
(
"ProductAttributeDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
public
ICollection
<
CreateUpdateProductAttributeOptionDto
>
ProductAttributeOptions
{
get
;
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs
0 → 100644
View file @
9f524666
using
System.ComponentModel
;
using
System.ComponentModel.DataAnnotations
;
namespace
EasyAbp.EShop.Products.Products.Dtos
{
public
class
CreateUpdateProductAttributeOptionDto
{
[
Required
]
[
DisplayName
(
"ProductAttributeOptionDisplayName"
)]
public
string
DisplayName
{
get
;
set
;
}
[
DisplayName
(
"ProductAttributeOptionDescription"
)]
public
string
Description
{
get
;
set
;
}
[
DisplayName
(
"ProductAttributeOptionDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs
View file @
9f524666
...
@@ -2,10 +2,11 @@ using System;
...
@@ -2,10 +2,11 @@ using System;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations
;
using
System.Linq
;
namespace
EasyAbp.EShop.Products.Products.Dtos
namespace
EasyAbp.EShop.Products.Products.Dtos
{
{
public
class
CreateUpdateProductDto
public
class
CreateUpdateProductDto
:
IValidatableObject
{
{
[
DisplayName
(
"ProductStoreId"
)]
[
DisplayName
(
"ProductStoreId"
)]
public
Guid
?
StoreId
{
get
;
set
;
}
public
Guid
?
StoreId
{
get
;
set
;
}
...
@@ -15,7 +16,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -15,7 +16,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
Guid
ProductTypeId
{
get
;
set
;
}
public
Guid
ProductTypeId
{
get
;
set
;
}
[
DisplayName
(
"ProductCategory"
)]
[
DisplayName
(
"ProductCategory"
)]
public
I
Enumerable
<
Guid
>
CategoryIds
{
get
;
set
;
}
public
I
Collection
<
Guid
>
CategoryIds
{
get
;
set
;
}
[
Required
]
[
Required
]
[
DisplayName
(
"ProductDisplayName"
)]
[
DisplayName
(
"ProductDisplayName"
)]
...
@@ -23,13 +24,40 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -23,13 +24,40 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
CreateUpdateProductDetailDto
ProductDetail
{
get
;
set
;
}
public
CreateUpdateProductDetailDto
ProductDetail
{
get
;
set
;
}
public
ICollection
<
CreateUpdateProductAttributeDto
>
ProductAttributes
{
get
;
set
;
}
[
DisplayName
(
"ProductInventoryStrategy"
)]
[
DisplayName
(
"ProductInventoryStrategy"
)]
public
InventoryStrategy
InventoryStrategy
{
get
;
set
;
}
public
InventoryStrategy
InventoryStrategy
{
get
;
set
;
}
[
DisplayName
(
"ProductDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
[
DisplayName
(
"ProductMediaResources"
)]
[
DisplayName
(
"ProductMediaResources"
)]
public
string
MediaResources
{
get
;
set
;
}
public
string
MediaResources
{
get
;
set
;
}
[
DisplayName
(
"ProductIsPublished"
)]
[
DisplayName
(
"ProductIsPublished"
)]
public
bool
IsPublished
{
get
;
set
;
}
public
bool
IsPublished
{
get
;
set
;
}
public
IEnumerable
<
ValidationResult
>
Validate
(
ValidationContext
validationContext
)
{
if
(
ProductAttributes
.
Select
(
a
=>
a
.
DisplayName
.
Trim
()).
Distinct
().
Count
()
!=
ProductAttributes
.
Count
)
{
yield
return
new
ValidationResult
(
"DisplayNames of ProductAttributes should be unique!"
,
new
[]
{
"ProductAttributes"
}
);
}
var
optionNameList
=
ProductAttributes
.
SelectMany
(
a
=>
a
.
ProductAttributeOptions
)
.
Select
(
o
=>
o
.
DisplayName
.
Trim
()).
ToList
();
if
(
optionNameList
.
Distinct
().
Count
()
!=
optionNameList
.
Count
)
{
yield
return
new
ValidationResult
(
"DisplayNames of ProductAttributeOptions should be unique!"
,
new
[]
{
"ProductAttributeOptions"
}
);
}
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs
View file @
9f524666
...
@@ -12,6 +12,8 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -12,6 +12,8 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
string
Description
{
get
;
set
;
}
public
string
Description
{
get
;
set
;
}
public
IEnumerable
<
ProductAttributeOptionDto
>
ProductAttributeOptions
{
get
;
set
;
}
public
int
DisplayOrder
{
get
;
set
;
}
public
ICollection
<
ProductAttributeOptionDto
>
ProductAttributeOptions
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs
View file @
9f524666
...
@@ -10,5 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -10,5 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
string
DisplayName
{
get
;
set
;
}
public
string
DisplayName
{
get
;
set
;
}
public
string
Description
{
get
;
set
;
}
public
string
Description
{
get
;
set
;
}
public
int
DisplayOrder
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs
View file @
9f524666
...
@@ -10,7 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -10,7 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
Guid
ProductTypeId
{
get
;
set
;
}
public
Guid
ProductTypeId
{
get
;
set
;
}
public
I
Enumerable
<
Guid
>
CategoryIds
{
get
;
set
;
}
public
I
Collection
<
Guid
>
CategoryIds
{
get
;
set
;
}
public
string
DisplayName
{
get
;
set
;
}
public
string
DisplayName
{
get
;
set
;
}
...
@@ -18,12 +18,14 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -18,12 +18,14 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
string
MediaResources
{
get
;
set
;
}
public
string
MediaResources
{
get
;
set
;
}
public
int
DisplayOrder
{
get
;
set
;
}
public
bool
IsPublished
{
get
;
set
;
}
public
bool
IsPublished
{
get
;
set
;
}
public
ProductDetailDto
ProductDetail
{
get
;
set
;
}
public
ProductDetailDto
ProductDetail
{
get
;
set
;
}
public
I
Enumerable
<
ProductAttributeDto
>
ProductAttributes
{
get
;
set
;
}
public
I
Collection
<
ProductAttributeDto
>
ProductAttributes
{
get
;
set
;
}
public
I
Enumerable
<
ProductSkuDto
>
ProductSkus
{
get
;
set
;
}
public
I
Collection
<
ProductSkuDto
>
ProductSkus
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
View file @
9f524666
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
EasyAbp.EShop.Products.Authorization
;
using
EasyAbp.EShop.Products.Authorization
;
...
@@ -54,13 +55,101 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -54,13 +55,101 @@ namespace EasyAbp.EShop.Products.Products
{
{
await
CheckCreatePolicyAsync
();
await
CheckCreatePolicyAsync
();
var
entity
=
MapToEntity
(
input
);
var
product
=
MapToEntity
(
input
);
TryToSetTenantId
(
entity
);
TryToSetTenantId
(
product
);
await
Repository
.
InsertAsync
(
entity
,
autoSave
:
true
);
await
UpdateProductAttributesAsync
(
product
,
input
);
return
MapToGetOutputDto
(
entity
);
await
Repository
.
InsertAsync
(
product
,
autoSave
:
true
);
await
UpdateProductCategoriesAsync
(
product
.
Id
,
product
.
StoreId
,
input
.
CategoryIds
);
return
MapToGetOutputDto
(
product
);
}
public
override
async
Task
<
ProductDto
>
UpdateAsync
(
Guid
id
,
CreateUpdateProductDto
input
)
{
await
CheckUpdatePolicyAsync
();
var
product
=
await
GetEntityByIdAsync
(
id
);
MapToEntity
(
input
,
product
);
await
UpdateProductAttributesAsync
(
product
,
input
);
await
Repository
.
UpdateAsync
(
product
,
autoSave
:
true
);
await
UpdateProductCategoriesAsync
(
product
.
Id
,
product
.
StoreId
,
input
.
CategoryIds
);
return
MapToGetOutputDto
(
product
);
}
private
async
Task
UpdateProductAttributesAsync
(
Product
product
,
CreateUpdateProductDto
input
)
{
foreach
(
var
attributeDto
in
input
.
ProductAttributes
)
{
var
attribute
=
product
.
ProductAttributes
.
FirstOrDefault
(
a
=>
a
.
DisplayName
==
attributeDto
.
DisplayName
);
if
(
attribute
==
null
)
{
attribute
=
new
ProductAttribute
(
GuidGenerator
.
Create
(),
attributeDto
.
DisplayName
,
attributeDto
.
Description
);
product
.
ProductAttributes
.
Add
(
attribute
);
}
foreach
(
var
optionDto
in
attributeDto
.
ProductAttributeOptions
)
{
var
option
=
attribute
.
ProductAttributeOptions
.
FirstOrDefault
(
o
=>
o
.
DisplayName
==
optionDto
.
DisplayName
);
if
(
option
==
null
)
{
option
=
new
ProductAttributeOption
(
GuidGenerator
.
Create
(),
optionDto
.
DisplayName
,
optionDto
.
Description
);
attribute
.
ProductAttributeOptions
.
Add
(
option
);
}
}
var
exceptOptionNames
=
attribute
.
ProductAttributeOptions
.
Select
(
o
=>
o
.
DisplayName
)
.
Except
(
attributeDto
.
ProductAttributeOptions
.
Select
(
o
=>
o
.
DisplayName
));
attribute
.
ProductAttributeOptions
.
RemoveAll
(
o
=>
exceptOptionNames
.
Contains
(
o
.
DisplayName
));
}
var
exceptAttributeNames
=
product
.
ProductAttributes
.
Select
(
a
=>
a
.
DisplayName
)
.
Except
(
input
.
ProductAttributes
.
Select
(
a
=>
a
.
DisplayName
));
product
.
ProductAttributes
.
RemoveAll
(
a
=>
exceptAttributeNames
.
Contains
(
a
.
DisplayName
));
}
public
override
async
Task
DeleteAsync
(
Guid
id
)
{
await
_productCategoryRepository
.
DeleteAsync
(
x
=>
x
.
ProductId
.
Equals
(
id
));
await
base
.
DeleteAsync
(
id
);
}
public
override
async
Task
<
ProductDto
>
GetAsync
(
Guid
id
)
{
var
dto
=
await
base
.
GetAsync
(
id
);
dto
.
CategoryIds
=
(
await
_productCategoryRepository
.
GetListByProductId
(
dto
.
Id
,
dto
.
StoreId
))
.
Select
(
x
=>
x
.
CategoryId
).
ToList
();
return
dto
;
}
protected
virtual
async
Task
UpdateProductCategoriesAsync
(
Guid
productId
,
Guid
?
storeId
,
IEnumerable
<
Guid
>
categoryIds
)
{
await
_productCategoryRepository
.
DeleteAsync
(
x
=>
x
.
ProductId
.
Equals
(
productId
));
foreach
(
var
categoryId
in
categoryIds
)
{
await
_productCategoryRepository
.
InsertAsync
(
new
ProductCategory
(
GuidGenerator
.
Create
(),
CurrentTenant
.
Id
,
storeId
,
categoryId
,
productId
));
}
}
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
View file @
9f524666
...
@@ -26,10 +26,11 @@ namespace EasyAbp.EShop.Products
...
@@ -26,10 +26,11 @@ namespace EasyAbp.EShop.Products
CreateMap
<
ProductSku
,
ProductSkuDto
>();
CreateMap
<
ProductSku
,
ProductSkuDto
>();
CreateMap
<
CreateUpdateProductDto
,
Product
>(
MemberList
.
Source
)
CreateMap
<
CreateUpdateProductDto
,
Product
>(
MemberList
.
Source
)
.
ForSourceMember
(
dto
=>
dto
.
CategoryIds
,
opt
=>
opt
.
DoNotValidate
())
.
ForSourceMember
(
dto
=>
dto
.
CategoryIds
,
opt
=>
opt
.
DoNotValidate
())
.
Ignore
(
p
=>
p
.
ProductDetail
)
.
Ignore
(
p
=>
p
.
ProductAttributes
)
.
Ignore
(
p
=>
p
.
ProductAttributes
)
.
Ignore
(
p
=>
p
.
ProductSkus
);
.
Ignore
(
p
=>
p
.
ProductSkus
);
CreateMap
<
CreateUpdateProductDetailDto
,
ProductDetail
>(
MemberList
.
Source
);
CreateMap
<
CreateUpdateProductDetailDto
,
ProductDetail
>(
MemberList
.
Source
);
CreateMap
<
CreateUpdateProductAttributeDto
,
ProductAttribute
>(
MemberList
.
Source
);
CreateMap
<
CreateUpdateProductAttributeOptionDto
,
ProductAttributeOption
>(
MemberList
.
Source
);
CreateMap
<
Category
,
CategoryDto
>();
CreateMap
<
Category
,
CategoryDto
>();
CreateMap
<
CreateUpdateCategoryDto
,
Category
>(
MemberList
.
Source
);
CreateMap
<
CreateUpdateCategoryDto
,
Category
>(
MemberList
.
Source
);
CreateMap
<
ProductType
,
ProductTypeDto
>();
CreateMap
<
ProductType
,
ProductTypeDto
>();
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
View file @
9f524666
...
@@ -3,14 +3,23 @@
...
@@ -3,14 +3,23 @@
"texts"
:
{
"texts"
:
{
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
View file @
9f524666
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
"ManageYourProfile"
:
"Manage your profile"
,
"ManageYourProfile"
:
"Manage your profile"
,
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
View file @
9f524666
...
@@ -3,14 +3,23 @@
...
@@ -3,14 +3,23 @@
"texts"
:
{
"texts"
:
{
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
View file @
9f524666
...
@@ -3,14 +3,23 @@
...
@@ -3,14 +3,23 @@
"texts"
:
{
"texts"
:
{
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
View file @
9f524666
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
"ManageYourProfile"
:
"Upravljajte svojim profilom"
,
"ManageYourProfile"
:
"Upravljajte svojim profilom"
,
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
View file @
9f524666
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
"ManageYourProfile"
:
"Profil y�netimi"
,
"ManageYourProfile"
:
"Profil y�netimi"
,
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
View file @
9f524666
...
@@ -3,14 +3,23 @@
...
@@ -3,14 +3,23 @@
"texts"
:
{
"texts"
:
{
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
View file @
9f524666
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
"ManageYourProfile"
:
"管理个人资料"
,
"ManageYourProfile"
:
"管理个人资料"
,
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
View file @
9f524666
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
"ManageYourProfile"
:
"管理個人資料"
,
"ManageYourProfile"
:
"管理個人資料"
,
"Menu:Product"
:
"MenuProduct"
,
"Menu:Product"
:
"MenuProduct"
,
"Product"
:
"Product"
,
"Product"
:
"Product"
,
"ProductTenantId"
:
"ProductTenantId"
,
"ProductStore"
:
"ProductStore"
,
"ProductStoreId"
:
"ProductStoreId"
,
"ProductProductTypeId"
:
"ProductProductTypeId"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDisplayName"
:
"ProductDisplayName"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDescription"
:
"ProductDetailDescription"
,
"ProductDetailDisplayOrder"
:
"ProductDetailDisplayOrder"
,
"ProductAttributeNames"
:
"ProductAttributeNames"
,
"ProductAttributeNamesPlaceholder"
:
"ProductAttributeNamesPlaceholder"
,
"ProductAttributeOptionNames"
:
"ProductAttributeOptionNames"
,
"ProductAttributeOptionNamesPlaceholder"
:
"ProductAttributeOptionNamesPlaceholder"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductInventoryStrategy"
:
"ProductInventoryStrategy"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductIsPublished"
:
"ProductIsPublished"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductMediaResources"
:
"ProductMediaResources"
,
"ProductAttributeDisplayName"
:
"ProductAttributeDisplayName"
,
"ProductAttributeDescription"
:
"ProductAttributeDescription"
,
"ProductAttributeDisplayOrder"
:
"ProductAttributeDisplayOrder"
,
"ProductAttributeOptionDisplayName"
:
"ProductAttributeOptionDisplayName"
,
"ProductAttributeOptionDescription"
:
"ProductAttributeOptionDescription"
,
"ProductAttributeOptionDisplayOrder"
:
"ProductAttributeOptionDisplayOrder"
,
"CreateProduct"
:
"CreateProduct"
,
"CreateProduct"
:
"CreateProduct"
,
"EditProduct"
:
"EditProduct"
,
"EditProduct"
:
"EditProduct"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
"ProductDeletionConfirmationMessage"
:
"Are you sure to delete the product {0}?"
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/IProductCategoryRepository.cs
View file @
9f524666
...
@@ -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
<
IEnumerable
<
ProductCategory
>>
GetListByCategoryId
(
Guid
categoryId
,
Guid
?
storeId
,
CancellationToken
cancellationToken
=
default
);
Task
<
List
<
ProductCategory
>>
GetListByCategoryId
(
Guid
categoryId
,
Guid
?
storeId
,
CancellationToken
cancellationToken
=
default
);
Task
<
IEnumerable
<
ProductCategory
>>
GetListByProductId
(
Guid
productId
,
Guid
?
storeId
,
CancellationToken
cancellationToken
=
default
);
Task
<
List
<
ProductCategory
>>
GetListByProductId
(
Guid
productId
,
Guid
?
storeId
,
CancellationToken
cancellationToken
=
default
);
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/ProductCategory.cs
View file @
9f524666
...
@@ -27,7 +27,7 @@ namespace EasyAbp.EShop.Products.ProductCategories
...
@@ -27,7 +27,7 @@ namespace EasyAbp.EShop.Products.ProductCategories
Guid
?
storeId
,
Guid
?
storeId
,
Guid
categoryId
,
Guid
categoryId
,
Guid
productId
,
Guid
productId
,
int
displayOrder
int
displayOrder
=
0
)
:
base
(
id
)
)
:
base
(
id
)
{
{
TenantId
=
tenantId
;
TenantId
=
tenantId
;
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs
View file @
9f524666
...
@@ -23,16 +23,20 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -23,16 +23,20 @@ namespace EasyAbp.EShop.Products.Products
[
CanBeNull
]
[
CanBeNull
]
public
virtual
string
MediaResources
{
get
;
protected
set
;
}
public
virtual
string
MediaResources
{
get
;
protected
set
;
}
public
virtual
int
DisplayOrder
{
get
;
protected
set
;
}
public
virtual
bool
IsPublished
{
get
;
protected
set
;
}
public
virtual
bool
IsPublished
{
get
;
protected
set
;
}
public
virtual
ProductDetail
ProductDetail
{
get
;
protected
set
;
}
public
virtual
ProductDetail
ProductDetail
{
get
;
protected
set
;
}
public
virtual
I
Enumerable
<
ProductAttribute
>
ProductAttributes
{
get
;
protected
set
;
}
public
virtual
I
Collection
<
ProductAttribute
>
ProductAttributes
{
get
;
protected
set
;
}
public
virtual
I
Enumerable
<
ProductSku
>
ProductSkus
{
get
;
protected
set
;
}
public
virtual
I
Collection
<
ProductSku
>
ProductSkus
{
get
;
protected
set
;
}
protected
Product
()
protected
Product
()
{
{
ProductAttributes
=
new
List
<
ProductAttribute
>();
ProductSkus
=
new
List
<
ProductSku
>();
}
}
public
Product
(
public
Product
(
...
@@ -43,7 +47,8 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -43,7 +47,8 @@ namespace EasyAbp.EShop.Products.Products
string
displayName
,
string
displayName
,
InventoryStrategy
inventoryStrategy
,
InventoryStrategy
inventoryStrategy
,
bool
isPublished
,
bool
isPublished
,
string
mediaResources
string
mediaResources
,
int
displayOrder
)
:
base
(
id
)
)
:
base
(
id
)
{
{
TenantId
=
tenantId
;
TenantId
=
tenantId
;
...
@@ -53,6 +58,9 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -53,6 +58,9 @@ namespace EasyAbp.EShop.Products.Products
InventoryStrategy
=
inventoryStrategy
;
InventoryStrategy
=
inventoryStrategy
;
IsPublished
=
isPublished
;
IsPublished
=
isPublished
;
MediaResources
=
mediaResources
;
MediaResources
=
mediaResources
;
DisplayOrder
=
displayOrder
;
ProductAttributes
=
new
List
<
ProductAttribute
>();
ProductSkus
=
new
List
<
ProductSku
>();
}
}
}
}
}
}
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs
View file @
9f524666
...
@@ -13,6 +13,26 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -13,6 +13,26 @@ namespace EasyAbp.EShop.Products.Products
[
CanBeNull
]
[
CanBeNull
]
public
virtual
string
Description
{
get
;
protected
set
;
}
public
virtual
string
Description
{
get
;
protected
set
;
}
public
virtual
IEnumerable
<
ProductAttributeOption
>
ProductAttributeOptions
{
get
;
protected
set
;
}
public
virtual
int
DisplayOrder
{
get
;
protected
set
;
}
public
virtual
ICollection
<
ProductAttributeOption
>
ProductAttributeOptions
{
get
;
protected
set
;
}
protected
ProductAttribute
()
{
ProductAttributeOptions
=
new
List
<
ProductAttributeOption
>();
}
public
ProductAttribute
(
Guid
id
,
[
NotNull
]
string
displayName
,
[
CanBeNull
]
string
description
,
int
displayOrder
=
0
)
:
base
(
id
)
{
DisplayName
=
displayName
;
Description
=
description
;
DisplayOrder
=
displayOrder
;
ProductAttributeOptions
=
new
List
<
ProductAttributeOption
>();
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs
View file @
9f524666
...
@@ -11,5 +11,20 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -11,5 +11,20 @@ namespace EasyAbp.EShop.Products.Products
[
CanBeNull
]
[
CanBeNull
]
public
virtual
string
Description
{
get
;
protected
set
;
}
public
virtual
string
Description
{
get
;
protected
set
;
}
public
virtual
int
DisplayOrder
{
get
;
protected
set
;
}
protected
ProductAttributeOption
()
{}
public
ProductAttributeOption
(
Guid
id
,
[
NotNull
]
string
displayName
,
[
CanBeNull
]
string
description
,
int
displayOrder
=
0
)
:
base
(
id
)
{
DisplayName
=
displayName
;
Description
=
description
;
DisplayOrder
=
displayOrder
;
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
View file @
9f524666
using
System
;
using
System
;
using
JetBrains.Annotations
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.Domain.Entities.Auditing
;
namespace
EasyAbp.EShop.Products.Products
namespace
EasyAbp.EShop.Products.Products
{
{
public
class
ProductSku
:
FullAuditedEntity
<
Guid
>
public
class
ProductSku
:
FullAuditedEntity
<
Guid
>
{
{
[
NotNull
]
public
virtual
string
SerializedAttributeOptionIds
{
get
;
protected
set
;
}
public
virtual
string
SerializedAttributeOptionIds
{
get
;
protected
set
;
}
public
virtual
decimal
OriginalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
OriginalPrice
{
get
;
protected
set
;
}
...
@@ -16,5 +18,24 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -16,5 +18,24 @@ namespace EasyAbp.EShop.Products.Products
public
virtual
int
Sold
{
get
;
protected
set
;
}
public
virtual
int
Sold
{
get
;
protected
set
;
}
public
virtual
int
OrderMinQuantity
{
get
;
protected
set
;
}
public
virtual
int
OrderMinQuantity
{
get
;
protected
set
;
}
protected
ProductSku
()
{}
public
ProductSku
(
Guid
id
,
[
NotNull
]
string
serializedAttributeOptionIds
,
decimal
originalPrice
,
decimal
price
,
int
inventory
,
int
sold
,
int
orderMinQuantity
)
:
base
(
id
)
{
SerializedAttributeOptionIds
=
serializedAttributeOptionIds
;
OriginalPrice
=
originalPrice
;
Price
=
price
;
Inventory
=
inventory
;
Sold
=
sold
;
OrderMinQuantity
=
orderMinQuantity
;
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs
View file @
9f524666
...
@@ -78,6 +78,8 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
...
@@ -78,6 +78,8 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore
b
.
ToTable
(
options
.
TablePrefix
+
"ProductSkus"
,
options
.
Schema
);
b
.
ToTable
(
options
.
TablePrefix
+
"ProductSkus"
,
options
.
Schema
);
b
.
ConfigureByConvention
();
b
.
ConfigureByConvention
();
/* Configure more properties here */
/* Configure more properties here */
b
.
Property
(
x
=>
x
.
Price
).
HasColumnType
(
"decimal(18,6)"
);
b
.
Property
(
x
=>
x
.
OriginalPrice
).
HasColumnType
(
"decimal(18,6)"
);
});
});
builder
.
Entity
<
Category
>(
b
=>
builder
.
Entity
<
Category
>(
b
=>
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductCategories/ProductCategoryRepository.cs
View file @
9f524666
...
@@ -16,14 +16,14 @@ namespace EasyAbp.EShop.Products.ProductCategories
...
@@ -16,14 +16,14 @@ namespace EasyAbp.EShop.Products.ProductCategories
{
{
}
}
public
async
Task
<
IEnumerable
<
ProductCategory
>>
GetListByCategoryId
(
Guid
categoryId
,
Guid
?
storeId
,
public
virtual
async
Task
<
List
<
ProductCategory
>>
GetListByCategoryId
(
Guid
categoryId
,
Guid
?
storeId
,
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
&&
pc
.
StoreId
==
storeId
)
.
ToListAsync
(
cancellationToken
);
.
ToListAsync
(
cancellationToken
);
}
}
public
async
Task
<
IEnumerable
<
ProductCategory
>>
GetListByProductId
(
Guid
productId
,
Guid
?
storeId
,
public
virtual
async
Task
<
List
<
ProductCategory
>>
GetListByProductId
(
Guid
productId
,
Guid
?
storeId
,
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
&&
pc
.
StoreId
==
storeId
)
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs
View file @
9f524666
using
System
;
using
System
;
using
System.Linq
;
using
EasyAbp.EShop.Products.EntityFrameworkCore
;
using
EasyAbp.EShop.Products.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore
;
using
Volo.Abp.Domain.Repositories.EntityFrameworkCore
;
using
Volo.Abp.Domain.Repositories.EntityFrameworkCore
;
using
Volo.Abp.EntityFrameworkCore
;
using
Volo.Abp.EntityFrameworkCore
;
...
@@ -10,5 +12,13 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -10,5 +12,13 @@ namespace EasyAbp.EShop.Products.Products
public
ProductRepository
(
IDbContextProvider
<
ProductsDbContext
>
dbContextProvider
)
:
base
(
dbContextProvider
)
public
ProductRepository
(
IDbContextProvider
<
ProductsDbContext
>
dbContextProvider
)
:
base
(
dbContextProvider
)
{
{
}
}
public
override
IQueryable
<
Product
>
WithDetails
()
{
return
base
.
WithDetails
()
.
Include
(
x
=>
x
.
ProductDetail
)
.
Include
(
x
=>
x
.
ProductAttributes
).
ThenInclude
(
x
=>
x
.
ProductAttributeOptions
)
.
Include
(
x
=>
x
.
ProductSkus
);
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml
View file @
9f524666
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<abp-modal>
<abp-modal>
<abp-modal-header title="@L["CreateProduct"].Value"></abp-modal-header>
<abp-modal-header title="@L["CreateProduct"].Value"></abp-modal-header>
<abp-modal-body>
<abp-modal-body>
<abp-select asp-for="Product.CategoryIds" asp-items="@Model.Categories" class="data-select" data-live-search="true" multiple />
<abp-form-content />
<abp-form-content />
</abp-modal-body>
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
View file @
9f524666
...
@@ -6,6 +6,8 @@ using EasyAbp.EShop.Products.Categories;
...
@@ -6,6 +6,8 @@ using EasyAbp.EShop.Products.Categories;
using
EasyAbp.EShop.Products.Categories.Dtos
;
using
EasyAbp.EShop.Products.Categories.Dtos
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
EasyAbp.EShop.Products.ProductTypes
;
using
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc.Rendering
;
using
Microsoft.AspNetCore.Mvc.Rendering
;
using
Volo.Abp.Application.Dtos
;
using
Volo.Abp.Application.Dtos
;
...
@@ -15,29 +17,39 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
...
@@ -15,29 +17,39 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
public
class
CreateModalModel
:
ProductsPageModel
public
class
CreateModalModel
:
ProductsPageModel
{
{
[
BindProperty
]
[
BindProperty
]
public
CreateUpdateProduct
Dto
Product
{
get
;
set
;
}
public
CreateUpdateProduct
ViewModel
Product
{
get
;
set
;
}
public
I
Enumerable
<
SelectListItem
>
Categori
es
{
get
;
set
;
}
public
I
Collection
<
SelectListItem
>
ProductTyp
es
{
get
;
set
;
}
public
ICollection
<
SelectListItem
>
Categories
{
get
;
set
;
}
private
readonly
IProductTypeAppService
_productTypeAppService
;
private
readonly
ICategoryAppService
_categoryAppService
;
private
readonly
ICategoryAppService
_categoryAppService
;
private
readonly
IProductAppService
_service
;
private
readonly
IProductAppService
_service
;
public
CreateModalModel
(
public
CreateModalModel
(
IProductTypeAppService
productTypeAppService
,
ICategoryAppService
categoryAppService
,
ICategoryAppService
categoryAppService
,
IProductAppService
service
)
IProductAppService
service
)
{
{
_productTypeAppService
=
productTypeAppService
;
_categoryAppService
=
categoryAppService
;
_categoryAppService
=
categoryAppService
;
_service
=
service
;
_service
=
service
;
}
}
public
async
Task
OnGetAsync
(
Guid
?
storeId
)
public
async
Task
OnGetAsync
(
Guid
?
storeId
)
{
{
ProductTypes
=
(
await
_productTypeAppService
.
GetListAsync
(
new
PagedAndSortedResultRequestDto
{
MaxResultCount
=
LimitedResultRequestDto
.
MaxMaxResultCount
})).
Items
.
Select
(
dto
=>
new
SelectListItem
(
dto
.
DisplayName
,
dto
.
Id
.
ToString
())).
ToList
();
Categories
=
Categories
=
(
await
_categoryAppService
.
GetListAsync
(
new
PagedAndSortedResultRequestDto
(
await
_categoryAppService
.
GetListAsync
(
new
PagedAndSortedResultRequestDto
{
MaxResultCount
=
LimitedResultRequestDto
.
MaxMaxResultCount
}))?.
Items
{
MaxResultCount
=
LimitedResultRequestDto
.
MaxMaxResultCount
}))?.
Items
.
Select
(
dto
=>
new
SelectListItem
(
dto
.
DisplayName
,
dto
.
Id
.
ToString
()));
.
Select
(
dto
=>
new
SelectListItem
(
dto
.
DisplayName
,
dto
.
Id
.
ToString
()))
.
ToList
()
;
Product
=
new
CreateUpdateProduct
Dto
Product
=
new
CreateUpdateProduct
ViewModel
{
{
StoreId
=
storeId
StoreId
=
storeId
};
};
...
@@ -45,7 +57,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
...
@@ -45,7 +57,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
public
async
Task
<
IActionResult
>
OnPostAsync
()
public
async
Task
<
IActionResult
>
OnPostAsync
()
{
{
await
_service
.
CreateAsync
(
Product
);
await
_service
.
CreateAsync
(
ObjectMapper
.
Map
<
CreateUpdateProductViewModel
,
CreateUpdateProductDto
>(
Product
)
);
return
NoContent
();
return
NoContent
();
}
}
}
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
View file @
9f524666
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
EasyAbp.EShop.Products.Categories
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
EasyAbp.EShop.Products.ProductTypes
;
using
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
;
using
Microsoft.AspNetCore.Mvc.Rendering
;
using
Volo.Abp.Application.Dtos
;
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{
{
...
@@ -13,24 +20,46 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
...
@@ -13,24 +20,46 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
public
Guid
Id
{
get
;
set
;
}
public
Guid
Id
{
get
;
set
;
}
[
BindProperty
]
[
BindProperty
]
public
CreateUpdateProduct
Dto
Product
{
get
;
set
;
}
public
CreateUpdateProduct
ViewModel
Product
{
get
;
set
;
}
public
ICollection
<
SelectListItem
>
ProductTypes
{
get
;
set
;
}
public
ICollection
<
SelectListItem
>
Categories
{
get
;
set
;
}
private
readonly
IProductTypeAppService
_productTypeAppService
;
private
readonly
ICategoryAppService
_categoryAppService
;
private
readonly
IProductAppService
_service
;
private
readonly
IProductAppService
_service
;
public
EditModalModel
(
IProductAppService
service
)
public
EditModalModel
(
IProductTypeAppService
productTypeAppService
,
ICategoryAppService
categoryAppService
,
IProductAppService
service
)
{
{
_productTypeAppService
=
productTypeAppService
;
_categoryAppService
=
categoryAppService
;
_service
=
service
;
_service
=
service
;
}
}
public
async
Task
OnGetAsync
()
public
async
Task
OnGetAsync
()
{
{
var
dto
=
await
_service
.
GetAsync
(
Id
);
ProductTypes
=
Product
=
ObjectMapper
.
Map
<
ProductDto
,
CreateUpdateProductDto
>(
dto
);
(
await
_productTypeAppService
.
GetListAsync
(
new
PagedAndSortedResultRequestDto
{
MaxResultCount
=
LimitedResultRequestDto
.
MaxMaxResultCount
})).
Items
.
Select
(
dto
=>
new
SelectListItem
(
dto
.
DisplayName
,
dto
.
Id
.
ToString
())).
ToList
();
Categories
=
(
await
_categoryAppService
.
GetListAsync
(
new
PagedAndSortedResultRequestDto
{
MaxResultCount
=
LimitedResultRequestDto
.
MaxMaxResultCount
}))?.
Items
.
Select
(
dto
=>
new
SelectListItem
(
dto
.
DisplayName
,
dto
.
Id
.
ToString
())).
ToList
();
var
productDto
=
await
_service
.
GetAsync
(
Id
);
Product
=
ObjectMapper
.
Map
<
ProductDto
,
CreateUpdateProductViewModel
>(
productDto
);
}
}
public
async
Task
<
IActionResult
>
OnPostAsync
()
public
async
Task
<
IActionResult
>
OnPostAsync
()
{
{
await
_service
.
UpdateAsync
(
Id
,
Product
);
await
_service
.
UpdateAsync
(
Id
,
ObjectMapper
.
Map
<
CreateUpdateProductViewModel
,
CreateUpdateProductDto
>(
Product
));
return
NoContent
();
return
NoContent
();
}
}
}
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateUpdateProductAttributeOptionViewModel.cs
0 → 100644
View file @
9f524666
using
System.ComponentModel.DataAnnotations
;
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
{
public
class
CreateUpdateProductAttributeOptionViewModel
{
[
Required
]
[
Display
(
Name
=
"ProductAttributeOptionDisplayName"
)]
public
string
DisplayName
{
get
;
set
;
}
[
Display
(
Name
=
"ProductAttributeOptionDescription"
)]
public
string
Description
{
get
;
set
;
}
[
Display
(
Name
=
"ProductAttributeOptionDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
=
0
;
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateUpdateProductAttributeViewModel.cs
0 → 100644
View file @
9f524666
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
{
public
class
CreateUpdateProductAttributeViewModel
{
[
Required
]
[
Display
(
Name
=
"ProductAttributeDisplayName"
)]
public
string
DisplayName
{
get
;
set
;
}
[
Display
(
Name
=
"ProductAttributeDescription"
)]
public
string
Description
{
get
;
set
;
}
[
Display
(
Name
=
"ProductAttributeDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
=
0
;
public
List
<
CreateUpdateProductAttributeOptionViewModel
>
ProductAttributeOptions
{
get
;
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateUpdateProductDetailViewModel.cs
0 → 100644
View file @
9f524666
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel.DataAnnotations
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
;
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
{
public
class
CreateUpdateProductDetailViewModel
{
[
TextArea
(
Rows
=
4
)]
[
Display
(
Name
=
"ProductDetailDescription"
)]
public
string
Description
{
get
;
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateUpdateProductViewModel.cs
0 → 100644
View file @
9f524666
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel.DataAnnotations
;
using
EasyAbp.EShop.Products.Products
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
Microsoft.AspNetCore.Mvc
;
using
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
;
namespace
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
{
public
class
CreateUpdateProductViewModel
{
[
HiddenInput
]
[
Display
(
Name
=
"ProductStore"
)]
public
Guid
?
StoreId
{
get
;
set
;
}
[
Required
]
[
SelectItems
(
"ProductTypes"
)]
[
Display
(
Name
=
"ProductType"
)]
public
Guid
ProductTypeId
{
get
;
set
;
}
[
SelectItems
(
"Categories"
)]
[
Display
(
Name
=
"ProductCategory"
)]
public
List
<
Guid
>
CategoryIds
{
get
;
set
;
}
[
Required
]
[
Display
(
Name
=
"ProductDisplayName"
)]
public
string
DisplayName
{
get
;
set
;
}
public
CreateUpdateProductDetailViewModel
ProductDetail
{
get
;
set
;
}
[
Required
]
[
Placeholder
(
"ProductAttributeNamesPlaceholder"
)]
[
Display
(
Name
=
"ProductAttributeNames"
)]
public
string
ProductAttributeNames
{
get
;
set
;
}
[
Required
]
[
TextArea
(
Rows
=
4
)]
[
Placeholder
(
"ProductAttributeOptionNamesPlaceholder"
)]
[
Display
(
Name
=
"ProductAttributeOptionNames"
)]
public
string
ProductAttributeOptionNames
{
get
;
set
;
}
[
Display
(
Name
=
"ProductInventoryStrategy"
)]
public
InventoryStrategy
InventoryStrategy
{
get
;
set
;
}
[
Display
(
Name
=
"ProductDisplayOrder"
)]
public
int
DisplayOrder
{
get
;
set
;
}
=
0
;
[
Display
(
Name
=
"ProductMediaResources"
)]
public
string
MediaResources
{
get
;
set
;
}
[
Display
(
Name
=
"ProductIsPublished"
)]
public
bool
IsPublished
{
get
;
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs
View file @
9f524666
using
EasyAbp.EShop.Products.Products.Dtos
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
EasyAbp.EShop.Products.Products.Dtos
;
using
EasyAbp.EShop.Products.Categories.Dtos
;
using
EasyAbp.EShop.Products.Categories.Dtos
;
using
EasyAbp.EShop.Products.ProductTypes.Dtos
;
using
EasyAbp.EShop.Products.ProductTypes.Dtos
;
using
AutoMapper
;
using
AutoMapper
;
using
EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels
;
using
Volo.Abp.AutoMapper
;
using
Volo.Abp.AutoMapper
;
namespace
EasyAbp.EShop.Products.Web
namespace
EasyAbp.EShop.Products.Web
...
@@ -13,8 +17,34 @@ namespace EasyAbp.EShop.Products.Web
...
@@ -13,8 +17,34 @@ 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
,
CreateUpdateProductDto
>();
CreateMap
<
ProductDto
,
CreateUpdateProductViewModel
>()
CreateMap
<
ProductDetailDto
,
CreateUpdateProductDetailDto
>();
// .Ignore(x => x.ProductAttributes);
.
ForMember
(
dest
=>
dest
.
ProductAttributeNames
,
opt
=>
opt
.
MapFrom
(
source
=>
source
.
ProductAttributes
.
Select
(
x
=>
x
.
DisplayName
).
JoinAsString
(
","
)))
.
ForMember
(
dest
=>
dest
.
ProductAttributeOptionNames
,
opt
=>
opt
.
MapFrom
(
x
=>
x
.
ProductAttributes
.
Select
(
a
=>
a
.
ProductAttributeOptions
.
Select
(
o
=>
o
.
DisplayName
).
JoinAsString
(
","
))
.
JoinAsString
(
Environment
.
NewLine
)));
CreateMap
<
CreateUpdateProductViewModel
,
CreateUpdateProductDto
>()
.
ForMember
(
dest
=>
dest
.
ProductAttributes
,
opt
=>
opt
.
MapFrom
(
x
=>
x
.
ProductAttributeNames
.
Split
(
","
,
StringSplitOptions
.
RemoveEmptyEntries
).
Select
((
s
,
i
)
=>
new
CreateUpdateProductAttributeDto
{
DisplayName
=
s
,
ProductAttributeOptions
=
new
List
<
CreateUpdateProductAttributeOptionDto
>(
x
.
ProductAttributeOptionNames
.
SplitToLines
(
StringSplitOptions
.
RemoveEmptyEntries
)[
i
]
.
Split
(
","
,
StringSplitOptions
.
RemoveEmptyEntries
).
Select
(
o
=>
new
CreateUpdateProductAttributeOptionDto
{
DisplayName
=
o
}))
})));
CreateMap
<
ProductDetailDto
,
CreateUpdateProductDetailViewModel
>();
CreateMap
<
CreateUpdateProductDetailViewModel
,
CreateUpdateProductDetailDto
>();
CreateMap
<
ProductAttributeDto
,
CreateUpdateProductAttributeViewModel
>();
CreateMap
<
CreateUpdateProductAttributeViewModel
,
CreateUpdateProductAttributeDto
>();
CreateMap
<
ProductAttributeOptionDto
,
CreateUpdateProductAttributeOptionViewModel
>();
CreateMap
<
CreateUpdateProductAttributeOptionViewModel
,
CreateUpdateProductAttributeOptionDto
>();
CreateMap
<
CategoryDto
,
CreateUpdateCategoryDto
>();
CreateMap
<
CategoryDto
,
CreateUpdateCategoryDto
>();
CreateMap
<
ProductTypeDto
,
CreateUpdateProductTypeDto
>();
CreateMap
<
ProductTypeDto
,
CreateUpdateProductTypeDto
>();
}
}
...
...
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.Designer.cs
0 → 100644
View file @
9f524666
// <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
(
"20200421093934_AddedDisplayOrder"
)]
partial
class
AddedDisplayOrder
{
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.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
.
Property
<
Guid
?>(
"StoreId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
?>(
"TenantId"
)
.
HasColumnName
(
"TenantId"
)
.
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
<
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,2)"
);
b
.
Property
<
decimal
>(
"Price"
)
.
HasColumnType
(
"decimal(18,2)"
);
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
}
}
}
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.cs
0 → 100644
View file @
9f524666
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
EasyMall.Migrations
{
public
partial
class
AddedDisplayOrder
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AddColumn
<
int
>(
name
:
"DisplayOrder"
,
table
:
"ProductsProducts"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"DisplayOrder"
,
table
:
"ProductsProductAttributes"
,
nullable
:
false
,
defaultValue
:
0
);
migrationBuilder
.
AddColumn
<
int
>(
name
:
"DisplayOrder"
,
table
:
"ProductsProductAttributeOptions"
,
nullable
:
false
,
defaultValue
:
0
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropColumn
(
name
:
"DisplayOrder"
,
table
:
"ProductsProducts"
);
migrationBuilder
.
DropColumn
(
name
:
"DisplayOrder"
,
table
:
"ProductsProductAttributes"
);
migrationBuilder
.
DropColumn
(
name
:
"DisplayOrder"
,
table
:
"ProductsProductAttributeOptions"
);
}
}
}
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.Designer.cs
0 → 100644
View file @
9f524666
// <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
(
"20200421101524_SetPricePrecision"
)]
partial
class
SetPricePrecision
{
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.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
.
Property
<
Guid
?>(
"StoreId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
?>(
"TenantId"
)
.
HasColumnName
(
"TenantId"
)
.
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
<
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
}
}
}
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.cs
0 → 100644
View file @
9f524666
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
EasyMall.Migrations
{
public
partial
class
SetPricePrecision
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"Price"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,6)"
,
nullable
:
false
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,2)"
);
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"OriginalPrice"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,6)"
,
nullable
:
false
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,2)"
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"Price"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,2)"
,
nullable
:
false
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,6)"
);
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"OriginalPrice"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,2)"
,
nullable
:
false
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,6)"
);
}
}
}
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs
View file @
9f524666
...
@@ -229,6 +229,9 @@ namespace EasyMall.Migrations
...
@@ -229,6 +229,9 @@ namespace EasyMall.Migrations
b
.
Property
<
string
>(
"DisplayName"
)
b
.
Property
<
string
>(
"DisplayName"
)
.
HasColumnType
(
"nvarchar(max)"
);
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"DisplayOrder"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"ExtraProperties"
)
b
.
Property
<
string
>(
"ExtraProperties"
)
.
HasColumnName
(
"ExtraProperties"
)
.
HasColumnName
(
"ExtraProperties"
)
.
HasColumnType
(
"nvarchar(max)"
);
.
HasColumnType
(
"nvarchar(max)"
);
...
@@ -299,6 +302,9 @@ namespace EasyMall.Migrations
...
@@ -299,6 +302,9 @@ namespace EasyMall.Migrations
b
.
Property
<
string
>(
"DisplayName"
)
b
.
Property
<
string
>(
"DisplayName"
)
.
HasColumnType
(
"nvarchar(max)"
);
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"DisplayOrder"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
bool
>(
"IsDeleted"
)
b
.
Property
<
bool
>(
"IsDeleted"
)
.
ValueGeneratedOnAdd
()
.
ValueGeneratedOnAdd
()
.
HasColumnName
(
"IsDeleted"
)
.
HasColumnName
(
"IsDeleted"
)
...
@@ -351,6 +357,9 @@ namespace EasyMall.Migrations
...
@@ -351,6 +357,9 @@ namespace EasyMall.Migrations
b
.
Property
<
string
>(
"DisplayName"
)
b
.
Property
<
string
>(
"DisplayName"
)
.
HasColumnType
(
"nvarchar(max)"
);
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
>(
"DisplayOrder"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
bool
>(
"IsDeleted"
)
b
.
Property
<
bool
>(
"IsDeleted"
)
.
ValueGeneratedOnAdd
()
.
ValueGeneratedOnAdd
()
.
HasColumnName
(
"IsDeleted"
)
.
HasColumnName
(
"IsDeleted"
)
...
@@ -431,10 +440,10 @@ namespace EasyMall.Migrations
...
@@ -431,10 +440,10 @@ namespace EasyMall.Migrations
.
HasColumnType
(
"int"
);
.
HasColumnType
(
"int"
);
b
.
Property
<
decimal
>(
"OriginalPrice"
)
b
.
Property
<
decimal
>(
"OriginalPrice"
)
.
HasColumnType
(
"decimal(18,
2
)"
);
.
HasColumnType
(
"decimal(18,
6
)"
);
b
.
Property
<
decimal
>(
"Price"
)
b
.
Property
<
decimal
>(
"Price"
)
.
HasColumnType
(
"decimal(18,
2
)"
);
.
HasColumnType
(
"decimal(18,
6
)"
);
b
.
Property
<
Guid
?>(
"ProductId"
)
b
.
Property
<
Guid
?>(
"ProductId"
)
.
HasColumnType
(
"uniqueidentifier"
);
.
HasColumnType
(
"uniqueidentifier"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment