|
|
||
|---|---|---|
| assets | ||
| database | ||
| lang | ||
| routes | ||
| src | ||
| views | ||
| .gitignore | ||
| README.md | ||
| composer.json | ||
| goods-attr.json | ||
README.md
Dcat Admin Extension Goods
Dcat-admin 商品管理
安装
- 进入项目目录
mkdir packages && cd packagesgit clone https://gitea.peidikeji.cn/pdkj/dcat-admin-goods.gitcomposer config repositories.peidikeji/dcat-admin-user path ./packages/dcat-admin-goodscomposer require peidikeji/dcat-admin-goods:dev-developphp artisan vendor:publish --provider=Peidikeji\Goods\GoodsServiceProvider
数据表
商品分类: goods_category
| column | type | nullable | default | comment |
|---|---|---|---|---|
| id | bigint | not null | - | 主键 |
| name | varchar(191) | not null | - | 分类名称 |
| image | varchar(191) | null | - | 分类图片 |
| description | varchar(191) | null | - | 描述 |
| parent_id | bigint | not null | 0 | 上级 id |
| level | int | not null | 1 | 层级 |
| sort | int | not null | 1 | 排序(asc) |
| is_enable | int | not null | 1 | 是否可用(0, 1) |
| path | varchar(191) | not null | '-' | 所有上级 id(1-2-3-, -) |
| created_at | timestamp | null | - | 创建时间 |
| updated_at | timestamp | null | - | 更新时间 |
商品类别: goods_type
| column | type | nullable | default | comment |
|---|---|---|---|---|
| id | bigint | not null | - | 主键 |
| name | varchar(191) | not null | - | 名称 |
| attr | json | null | - | 属性展示 |
| spec | json | null | - | 规格筛选 |
| part | json | null | - | 配件多选 |
goods_type.attr 存储格式
[
{"name": "主体", "values": ["入网型号", "上市年份"]},
{"name": "基本信息", "values": ["尺寸", "颜色", "CPU型号", "重量"]}
]
goods_type.spec 存储格式
[
{"name": "颜色", "values": ["红色", "白色", "灰色"]},
{"name": "版本", "values": ["128G", "256G", "512G", "1TB"]}
]
goods_type.part 存储格式
[
{"name": "配件", "values": ["耳机", "快充", "手机壳"]},
]