Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 总体修改愿望
- * 规范每个表的created_at字段、updated_at字段;在需要软删除的表(例如商品等表)使用deleted_at字段。方便框架自行管理。
- * 编写数据库migration,规定将来对数据库改动也必须使用migration,以便于部署,同时也可以在git上显示、追溯数据库的变动记录。
- * 改动较大,建议重建。
- # 基本表结构愿望
- - 基本信息
- * Language(语言)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- name||
- parentId|FK: Language->id|缺省时用于查询父语言的翻译
- localeId|FK: Locale->id|
- created_at||
- updated_at||
- * Locale(地区)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- code||存放"de","en"这种地区代码
- created_at||
- updated_at||
- * Locale_translation(地区-翻译) ```本表用于显示某种语言下其他语言的名称```
- 字段|指示|备注
- -|-|-
- localeId|PK FK: Locale->id|混合主键
- languageId|PK FK: Language->id|混合主键
- created_at||
- updated_at||
- * Media(多媒体)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- mediaFolderId|FK: MediaFolder|
- mimeType||image/png 之类的
- fileName||
- fileExtension||
- fileSize||
- metaData|Json|图片视频的分辨率,视频音频的长度等
- uploaded_at||没有uploaded_at的视为上传失败的
- created_at||
- updated_at||
- * MediaFolder(多媒体文件夹)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- parentId|FK: MediaFolder|
- name||
- created_at||
- updated_at||
- * Country
- * Country_translation
- * CountryState
- * CountryState_translation
- * Currency
- * Currency_translation
- - 商品附属信息
- * Attribute(商品属性)
- * Attribute_translation(商品属性翻译)
- * AttributeGroup(商品属性组)
- * AttributeGroup_translation(商品属性组翻译)
- * Category(分类)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- name||
- parentId|FK: Category->id|父分类id
- path|Json(List)|FK: category->id,指示分类路径
- orderNumber||排序用字段
- depth||分类深度(元数据)
- isActive||是否激活
- childCount||子分类计数
- mediaId|FK: Media->id|分类图片之类的
- created_at||
- updated_at||
- * Category_Tag(分类-标签多对多)
- 字段|指示|备注
- -|-|-
- categoryId|PK FK: Category->id|混合主键
- tagId|PK FK: Tag->id|混合主键
- * Category_translation(分类翻译)
- 字段|指示|备注
- -|-|-
- categoryId|PK FK: Category->id|混合主键
- languageId|PK FK: Language->id|混合主键
- name||
- breadcrum|Json(List)|与category的path相对应的翻译内容
- created_at||
- updated_at||
- * Manufacturer(制造商)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- link||网站链接
- mediaId|FK: Media->id|制作商logo
- created_at||
- updated_at||
- * Manufacturer_translation(制造商翻译)
- 字段|指示|备注
- -|-|-
- manufacturerId|PK FK: Manufacturer->id|混合主键
- languageId|PK FK: Language->id|混合主键
- name||
- description||
- created_at||
- updated_at||
- * Tag(标签)(单语言)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- name||
- created_at||
- updated_at||
- * Tax(税)(单语言)
- 字段|指示|备注
- -|-|-
- id|PK AI|
- name||
- taxRate||
- created_at||
- updated_at||
- * Price(价格规则组)
- * Rule(价格规则)
- - 商品信息
- * Product
- * Product_Category(商品-分类多对多)(最终结果)
- * Product_Category_tree(商品-分类多对多)(完整结构树)
- * Product_Manufacturer_translation(商品-制造商翻译)
- * Product_Media(商品-图片多对多)(商品内置的1对1是主图片,这里是其他附属图片)
- * Product_Attribute(商品-商品属性多对多)
- * Product_Price(商品-价格规则组多对多)
- * Product_Tag(商品-标签多对多)
- * Product_translation(商品翻译)
- - 订单信息
- * Order
- * OrderAddress
- * Order_Customer
- * OrderDelivery
- * Order_Item
- - 购物车
- * Cart
- - 客户信息
- * Customer
- * CustomerAddress
- * CustomerGroup
- * CustomerGroup_translation
- - 自动邮件系统
- * MailHeaderFooter
- * MailHeaderFooter_translation
- * MailTemplate
- * MailTemplate_translation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement