0% found this document useful (0 votes)
16 views3 pages

Ecommer

The document outlines a data model for a user management system, detailing various entities such as User, Role, Product, Order, and their respective attributes. It includes relationships between these entities, data types for each attribute, and enumerations for statuses and types. The structure supports functionalities like user management, product categorization, and order processing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Ecommer

The document outlines a data model for a user management system, detailing various entities such as User, Role, Product, Order, and their respective attributes. It includes relationships between these entities, data types for each attribute, and enumerations for statuses and types. The structure supports functionalities like user management, product categorization, and order processing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Language

0..1 0..1
id int

name string

User code string


0..1 *
id int createById int

email string *
updateById int

name string deletedAt datetime

password string createdAt datetime

phoneNumber string updatedAt datetime

avatar string

status UserStatus

totpSecret string
*
roleId int
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

UserTranslation VerificationCode RefreshToken Permission


0..1
id int id int token string id int
* *
userId int email string userId int name string
*
languageId int code string expiresAt datetime description string

address string type VerificationCodeType createdAt datetime path string

description string expiresAt datetime method string


* *
createById int createdAt datetime createById int
* ProductTranslation *
updateById int updateById int
id int
deletedAt datetime deletedAt datetime
*
Product productId int
createdAt datetime createdAt datetime
0..1 0..1 *
id int languageId int
updatedAt datetime updatedAt datetime
base_price float name string

virtual_price float description string


* *
Role brandId int createById int Category
0..1 * * 0..1 0..1
id int createById int updateById int id int
* *
name string updateById int deletedAt datetime parentCategoryid int
*
description string deletedAt datetime createdAt datetime createById int
*
isActive boolean createdAt datetime updatedAt datetime updateById int
*
createById int updatedAt datetime deletedAt datetime
*
updateById int createdAt datetime
VariantOption
deletedAt datetime updatedAt datetime
0..1
Variant id int
createdAt datetime
0..1
id int value string
updatedAt datetime
*
name string variantId int Sku
* * 0..1
productId int createById int id int
* *
CategoryTranslation createById int updateById int value string
*
id int updateById int deletedAt datetime price float
*
categoryId int deletedAt datetime createdAt datetime stock int
*
languageId int createdAt datetime updatedAt datetime images string[]
*
name string updatedAt datetime productId int
*
description string createById int
* *
createById int updateById int
*
updateById int deletedAt datetime

deletedAt datetime createdAt datetime

createdAt datetime updatedAt datetime

updatedAt datetime

Brand
0..1
id int

logo string
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

BrandTranslation

id int
*
brandId int
*
languageId int

name string

description string
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

CartItem

id int

quanlity int
*
skuId int
*
userId int

createdAt datetime

updatedAt datetime

ProductSKUSnapshot

id int

productName String

price float

images string[]

skuValue string
*
skuId int
*
orderId int

createdAt datetime

Order
0..1
id int
*
userId int

status OrderStatus
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

Review

id int

content string

rating int
*
productId int
*
userId int

createdAt datetime

updatedAt datetime

PaymentTransaction

id int

gateway string

transactionDate datetime

accountNumber string

subAccount string

amountIn int

amountOut int

accumulated int

code string

transactionContent string

referenceNumber string

body string

createdAt datetime

Message

id int
*
fromUserId int
*
toUserId int

content string

readAt datetime

ProductsCategories
*
product_id int
*
category_id int

SkusVariantOptions
PermissionsRoles *
sku_id Int
*
permission_id Int *
variant_option_id Int
*
role_id Int
Language
0..1 0..1
id int

name string

User code string


0..1 *
id int createById int

email string *
updateById int

name string deletedAt datetime

password string createdAt datetime

phoneNumber string updatedAt datetime

avatar string

status UserStatus

totpSecret string
*
roleId int
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

UserTranslation VerificationCode RefreshToken Permission


0..1
id int id int token string id int
* *
userId int email string userId int name string
*
languageId int code string expiresAt datetime description string

address string type VerificationCodeType createdAt datetime path string

description string expiresAt datetime method string


* *
createById int createdAt datetime createById int
* ProductTranslation *
updateById int updateById int
id int
deletedAt datetime deletedAt datetime
*
Product productId int
createdAt datetime createdAt datetime
0..1 0..1 *
id int languageId int
updatedAt datetime updatedAt datetime
base_price float name string

virtual_price float description string


* *
Role brandId int createById int Category
0..1 * * 0..1 0..1
id int createById int updateById int id int
* *
name string updateById int deletedAt datetime parentCategoryid int
*
description string deletedAt datetime createdAt datetime createById int
*
isActive boolean createdAt datetime updatedAt datetime updateById int
*
createById int updatedAt datetime deletedAt datetime
*
updateById int createdAt datetime
VariantOption
deletedAt datetime updatedAt datetime
0..1
Variant id int
createdAt datetime
0..1
id int value string
updatedAt datetime
*
name string variantId int Sku
* * 0..1
productId int createById int id int
* *
CategoryTranslation createById int updateById int value string
*
id int updateById int deletedAt datetime price float
*
categoryId int deletedAt datetime createdAt datetime stock int
*
languageId int createdAt datetime updatedAt datetime images string[]
*
name string updatedAt datetime productId int
*
description string createById int
* *
createById int updateById int
*
updateById int deletedAt datetime

deletedAt datetime createdAt datetime

createdAt datetime updatedAt datetime

updatedAt datetime

Brand
0..1
id int

logo string
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

BrandTranslation

id int
*
brandId int
*
languageId int

name string

description string
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

CartItem

id int

quanlity int
*
skuId int
*
userId int

createdAt datetime

updatedAt datetime

ProductSKUSnapshot

id int

productName String

price float

images string[]

skuValue string
*
skuId int
*
orderId int

createdAt datetime

Order
0..1
id int
*
userId int

status OrderStatus
*
createById int
*
updateById int

deletedAt datetime

createdAt datetime

updatedAt datetime

Review

id int

content string

rating int
*
productId int
*
userId int

createdAt datetime

updatedAt datetime

PaymentTransaction

id int

gateway string

transactionDate datetime

accountNumber string

subAccount string

amountIn int

amountOut int

accumulated int

code string

transactionContent string

referenceNumber string

body string

createdAt datetime

Message

id int
*
fromUserId int
*
toUserId int

content string

readAt datetime

ProductsCategories
*
product_id int
*
category_id int

SkusVariantOptions
PermissionsRoles *
sku_id Int
*
permission_id Int *
variant_option_id Int
*
role_id Int
Enum OrderStatus {
PENDING_CONFIRMATION
PENDING_PICKUP
PENDING_DELIVERY
DELIVERED
RETURNED
CANCELLED
}

Enum VerificationCode {
REGISTER
FORGOT_PASSWORD
}

Enum UserStatus {
ACTIVE
BLOCKED
}

You might also like