Showing
4 changed files
with
322 additions
and
0 deletions
1 | +erp_supplier库: | ||
2 | +1、base_product: | ||
3 | +ALTER TABLE `erp_supplier`.`base_product` | ||
4 | +CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:1,否:null)', | ||
5 | +ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `brand_folder`, | ||
6 | +ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
7 | +MODIFY COLUMN `goods_season` smallint(5) NULL DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
8 | +ADD COLUMN `is_vip` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `age_level`, | ||
9 | +ADD COLUMN `is_limitbuy` enum('Y','N') NULL DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
10 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '限购开始时间' AFTER `is_limitbuy`, | ||
11 | +ADD COLUMN `limit_end_time` int(10) NULL DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
12 | +ADD COLUMN `expect_shelf_time` int(10) NULL DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
13 | +ADD COLUMN `is_outlets` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `expect_shelf_time`, | ||
14 | +ADD COLUMN `seasons` varchar(100) DEFAULT '' COMMENT '适销季 夏:summer 冬:winter 四季:seasons', | ||
15 | +ADD COLUMN `reason` varchar(255) DEFAULT '' COMMENT '审批驳回原因', | ||
16 | +ADD COLUMN `editId` int(10) COMMENT '修改人id', | ||
17 | +ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
18 | +ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
19 | +ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
20 | +ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
21 | +ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
22 | + | ||
23 | + | ||
24 | +/**建立索引***/ | ||
25 | +ALTER TABLE `erp_supplier`.`base_product` | ||
26 | +ADD INDEX `brand_id` (`brand_id`) comment '', | ||
27 | +ADD INDEX `shop_id` (`shop_id`) comment '', | ||
28 | +ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
29 | +ADD INDEX `is_auditing` (`is_auditing`) comment '', | ||
30 | +ADD INDEX `attribute` (`attribute`) comment '', | ||
31 | +ADD INDEX `is_jit` (`is_jit`) comment '', | ||
32 | +ADD INDEX `is_advance` (`is_advance`) comment '', | ||
33 | +ADD INDEX `is_outlets` (`is_outlets`) comment ''; | ||
34 | + | ||
35 | +2、base_goods: | ||
36 | +ALTER TABLE `erp_supplier`.`base_goods` | ||
37 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
38 | + | ||
39 | + | ||
40 | +3、base_single: | ||
41 | + | ||
42 | +ALTER TABLE `erp_supplier`.`base_single` | ||
43 | +ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`, | ||
44 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存' AFTER `bar_code`, | ||
45 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
46 | + | ||
47 | + | ||
48 | +erp_product库: | ||
49 | +1、product: | ||
50 | + | ||
51 | +ALTER TABLE `erp_product`.`product` | ||
52 | +ADD COLUMN `goods_years` smallint(5) DEFAULT 0, | ||
53 | +ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
54 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`, | ||
55 | +ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
56 | +ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
57 | +ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
58 | +ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
59 | +CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)', | ||
60 | +MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`, | ||
61 | +ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`, | ||
62 | +ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`, | ||
63 | +ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
64 | +ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
65 | +ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
66 | +ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
67 | +ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
68 | +ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
69 | + | ||
70 | + | ||
71 | +/***添加索引****/ | ||
72 | +ALTER TABLE `erp_product`.`product` | ||
73 | +ADD INDEX `brand_id` (`brand_id`) comment '', | ||
74 | +ADD INDEX `shop_id` (`shop_id`) comment '', | ||
75 | +ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
76 | +ADD INDEX `attribute` (`attribute`) comment '', | ||
77 | +ADD INDEX `is_jit` (`is_jit`) comment '', | ||
78 | +ADD INDEX `is_outlets` (`is_outlets`) comment '', | ||
79 | +ADD INDEX `is_advance` (`is_advance`) comment ''; | ||
80 | + | ||
81 | +2、goods: | ||
82 | +ALTER TABLE `erp_product`.`goods` | ||
83 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
84 | + | ||
85 | +3、storage: | ||
86 | + | ||
87 | +ALTER TABLE `erp_product`.`storage` | ||
88 | +ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`, | ||
89 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存' AFTER `bar_code`, | ||
90 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
91 | + | ||
92 | + | ||
93 | +ALTER TABLE `erp_product`.`storage` | ||
94 | +DROP COLUMN `presale_storage_num`; | ||
95 | + | ||
96 | + | ||
97 | +4、product_price: | ||
98 | + | ||
99 | +ALTER TABLE `erp_product`.`product_price` | ||
100 | +CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID', | ||
101 | +ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`; | ||
102 | + |
1 | +ALTER TABLE `yh_shops`.`product` | ||
2 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间', | ||
3 | +ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
4 | +ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
5 | +ADD COLUMN `product_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
6 | +ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `product_code`, | ||
7 | +ADD COLUMN `goods_years` smallint(5) DEFAULT '0' COMMENT '货品年', | ||
8 | +ADD COLUMN `goods_season` smallint(5) DEFAULT '0' COMMENT '货品季', | ||
9 | +MODIFY COLUMN `is_outlets` enum('Y','N') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否', | ||
10 | +ADD COLUMN `outlets_setting` enum('B','N','S') DEFAULT 'N' COMMENT '奥特莱斯设置B:品牌设置;S:店铺设置,N:不设置', | ||
11 | +ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`; | ||
12 | +ALTER TABLE `product` | ||
13 | +MODIFY COLUMN `is_outlets` enum('Y','B','N') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否' AFTER `storage`; | ||
14 | + | ||
15 | +ALTER TABLE `product` | ||
16 | +ADD COLUMN `series` varchar(100) NULL DEFAULT NULL AFTER `outlets_setting`, | ||
17 | +ADD COLUMN `models` varchar(100) NULL DEFAULT NULL AFTER `series`, | ||
18 | +ADD COLUMN `product_tag` varchar(100) NULL DEFAULT NULL AFTER `models`, | ||
19 | +ADD COLUMN `product_elements` varchar(200) NULL DEFAULT NULL AFTER `product_tag`, | ||
20 | +ADD COLUMN `product_style` varchar(200) NULL AFTER `product_elements`, | ||
21 | +ADD COLUMN `grade` char(20) NULL DEFAULT NULL COMMENT '重点款型(是:K,否:null)' AFTER `product_style`, | ||
22 | +ADD COLUMN `brand_folder` int(5) NULL DEFAULT NULL AFTER `grad; | ||
23 | + | ||
24 | + | ||
25 | +ALTER TABLE `storage` | ||
26 | +ADD COLUMN `factory_code` varchar(100) NULL AFTER `create_time`, | ||
27 | +ADD COLUMN `is_suppled` enum('N','Y') NOT NULL DEFAULT 'Y' COMMENT '能否补货' AFTER `factory_code`, | ||
28 | +ADD COLUMN `product_skc` int(11) NOT NULL DEFAULT 0 AFTER `is_suppled`; | ||
29 | +--------------------- | ||
30 | +ALTER TABLE `goods` | ||
31 | +ADD COLUMN `factory_code` varchar(100) NULL; | ||
32 | +-------------------------- | ||
33 | + CREATE TABLE `product_ext` ( | ||
34 | + `product_skn` int(11) NOT NULL DEFAULT '0' COMMENT '商品erp标识', | ||
35 | + `product_desc` text COMMENT '描述', | ||
36 | + `recommend` text COMMENT '小编推荐', | ||
37 | + `is_hostsell` enum('Y','N') DEFAULT 'N' COMMENT '是否热销 Y:是N:否', | ||
38 | + `shelves_day` int(11) DEFAULT NULL COMMENT '售罄后几天后下架', | ||
39 | + `search_keys` varchar(500) DEFAULT NULL COMMENT '搜索关键词 以英文逗号分隔', | ||
40 | + `vedio_url` varchar(100) DEFAULT NULL COMMENT '视频链接', | ||
41 | + `make_crafts` varchar(50) DEFAULT NULL COMMENT '制作工艺', | ||
42 | + `brand_series` varchar(50) DEFAULT NULL COMMENT '品牌系列', | ||
43 | + `brand_model` varchar(50) DEFAULT NULL COMMENT '品牌款型', | ||
44 | + `reject_reason` varchar(500) DEFAULT NULL COMMENT '驳回原因', | ||
45 | + PRIMARY KEY (`product_skn`) | ||
46 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
database/baseProductAndNestSale/net_sale.sql
0 → 100644
1 | +-- 1.数据库(erp_product) | ||
2 | + | ||
3 | +--1.1 产品(erp_product.product) | ||
4 | +alter table erp_product.product add column is_screen enum('Y', 'N') default 'N' COMMENT '是否已拍摄标识'; | ||
5 | +alter table erp_product.product add column is_measure enum('Y', 'N') default 'N' COMMENT '是否已测量标识'; | ||
6 | +alter table erp_product.product add column status smallint default 1 COMMENT ' 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过'; | ||
7 | +alter table erp_product.product add column first_shelve_time int(10) unsigned DEFAULT '0' COMMENT '首次上架时间'; | ||
8 | +alter table erp_product.product add column shelve_time int(10) unsigned DEFAULT '0' COMMENT '上架时间可作为上新参考'; | ||
9 | +alter table erp_product.product add column `stock` smallint(6) DEFAULT 0 COMMENT '库存'; | ||
10 | +alter table erp_product.product add column `next_status` smallint COMMENT '下一流程状态'; | ||
11 | +Alter table erp_product.product ADD column `founder` int(11) COMMENT '操作人'; | ||
12 | +Alter table erp_product.product ADD column `is_info_miss` enum('Y', 'N') default 'Y' COMMENT '是否信息缺失'; | ||
13 | +create index product_edittime on product(`edit_time`); | ||
14 | + | ||
15 | +create table product_ext( | ||
16 | + product_skn int COMMENT '商品erp标识', | ||
17 | + product_desc text COMMENT '描述', -- 废弃 | ||
18 | + recommend text COMMENT '小编推荐', -- 新增字段 | ||
19 | + is_hostsell enum('Y', 'N') default 'N' COMMENT '是否热销 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
20 | + sales_phrase varchar(100) COMMENT '促销短语', -- 需要割接 之前直接操作的前台表yh_shops.sales_phrase | ||
21 | + is_new enum('Y', 'N') default 'N' COMMENT '是否新品 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
22 | + shelves_day int COMMENT '售罄后几天后下架', -- 废弃 | ||
23 | + sell_channels set('0','1','2','3','4','5','6','7','8','9') COMMENT '上架渠道', -- 需要割接 之前直接操作的前台表yh_shops.sell_channels | ||
24 | + phrase varchar(500) COMMENT '商品短评', -- 需要割接 之前直接操作的前台表yh_shops.phrase | ||
25 | + search_keys varchar(500) COMMENT '搜索关键词 以英文逗号分隔', -- | ||
26 | + vedio_url varchar(100) COMMENT '视频链接', -- 新增字段 | ||
27 | + make_crafts varchar(50) COMMENT '制作工艺', -- 新增字段 | ||
28 | + brand_series varchar(50) COMMENT '品牌系列', -- 新增字段 | ||
29 | + brand_model varchar(50) COMMENT '品牌款型', -- 新增字段 | ||
30 | + reject_reason varchar(500) COMMENT '驳回原因' -- 无需同步 | ||
31 | +)ENGINE=INNODB DEFAULT CHARSET=utf8; | ||
32 | +Alter table product_ext add primary key(product_skn); | ||
33 | + | ||
34 | +-- 变价表和变价日志表 | ||
35 | +alter table erp_product.product_price modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
36 | +alter table erp_product.product_price_log modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
37 | + | ||
38 | + | ||
39 | +-- 1.4 缺失信息维护 | ||
40 | + | ||
41 | +-- 网销信息缺失类型的全量枚举表(无需同步) | ||
42 | +-- DROP TABLE IF EXISTS `netsale_infomiss`; | ||
43 | + CREATE TABLE netsale_infomiss ( | ||
44 | + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
45 | + `name` varchar(100) DEFAULT NULL, | ||
46 | + PRIMARY KEY (`id`) | ||
47 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型的全量枚举表'; | ||
48 | + | ||
49 | + insert into netsale_infomiss (name) values('文本信息'),('尺码信息'),('搜索/标签'); | ||
50 | + | ||
51 | +-- 商品和网销信息缺失表的关联关系表(无需同步) | ||
52 | +-- DROP TABLE IF EXISTS `netsale_infomiss_relation`; | ||
53 | + CREATE TABLE netsale_infomiss_relation ( | ||
54 | + `product_skn` int(11) unsigned NOT NULL, | ||
55 | + `infomiss_id` int(11) unsigned NOT NULL COMMENT 'netsale_infomiss_sort 的主键', | ||
56 | + PRIMARY KEY (`product_skn`, infomiss_id) | ||
57 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型和商品的关系表'; | ||
58 | + | ||
59 | + | ||
60 | +-- 1.5 商品状态 | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | +-- 2 yh_shops 库 | ||
76 | +-- 2.1 商品的展示店铺 | ||
77 | +create table product_shop_relation( | ||
78 | + product_skn int COMMENT 'SKN', | ||
79 | + shop_id int COMMENT '店铺Id' | ||
80 | +); | ||
81 | +Alter table product_shop_relation add primary key(product_skn, shop_id); | ||
82 | + | ||
83 | +-- 标识商品是否是新平台的商品 | ||
84 | +alter table yh_shops.product add column source_flag enum('0', '1') default '0' COMMENT '新平台发布的商品为1 原来则为0'; | ||
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | ||
92 | +-- 2.5 预上架上新记录表 | ||
93 | + Alter table product_timing ADD column `product_skn` int(11) unsigned default 0; | ||
94 | + Alter table product_timing ADD column `advance_begin_time` int(10) unsigned; -- 预售开始时间 | ||
95 | + Alter table product_timing ADD column `advance_end_time` int(10) unsigned; -- 预售结束时间 | ||
96 | + Alter table product_timing ADD column `on_new_time` int(10) unsigned; -- 预上架上新时间 | ||
97 | + Alter table product_timing ADD column `out_sale_time` int(10) unsigned; -- 售罄后几天下架时间 | ||
98 | + create index timing_skn on product_timing(`product_skn`); | ||
99 | + Alter table product_timing modify column shelve_time int(10) unsigned COMMENT '预上架架时间'; | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | +-- 2.8 平台商品属性值表 | ||
105 | + | ||
106 | + CREATE TABLE product_attribute_property_values ( | ||
107 | + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
108 | + `product_skn` int(11) unsigned NOT NULL, | ||
109 | + `attribute_id` int(11) unsigned NOT NULL COMMENT '品类属性ID', | ||
110 | + `attribute_value_id` int(11) unsigned NOT NULL COMMENT '品类属性值ID', | ||
111 | + `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
112 | + PRIMARY KEY (`id`), | ||
113 | + KEY `attribute_pro_skn_attrid` (`product_skn`,`attribute_id`) | ||
114 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '平台商品属性值表'; | ||
115 | + | ||
116 | +-- 3 数据需要特殊割接 | ||
117 | + | ||
118 | +-- 3.1 上架的时候同步插入product_id 数据割接 老数据需要通过product_id 查询product_skn 插入数据库 | ||
119 | +-- product_timing(不需要) | ||
120 | + | ||
121 | + | ||
122 | + | ||
123 | +-- yh_shops | ||
124 | +ALTER TABLE yh_shops.product_standard_relation ADD COLUMN product_skn INT(11) UNSIGNED; | ||
125 | + | ||
126 | +ALTER TABLE yh_shops.`product_collocation` ADD COLUMN product_skn INT(11) UNSIGNED ; | ||
127 | + | ||
128 | +-- brand_folder | ||
129 | +ALTER TABLE yh_shops.brand_folder ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
130 | +ALTER TABLE yh_shops.brand_folder ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
131 | +ALTER TABLE yh_shops.brand_folder ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
132 | +ALTER TABLE yh_shops.brand_folder CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
133 | +ALTER TABLE yh_shops.brand_folder CHANGE order_by order_by SMALLINT(6) null; | ||
134 | +-- brand_series | ||
135 | +ALTER TABLE yh_shops.`brand_series` ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
136 | +ALTER TABLE yh_shops.`brand_series` ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
137 | +ALTER TABLE yh_shops.`brand_series` ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
138 | + -- add key | ||
139 | +ALTER TABLE yh_shops.`brand_series` ADD KEY key_shops_id (shops_id); | ||
140 | +ALTER TABLE yh_shops.`brand_series` ADD KEY key_brand_id (brand_id); | ||
141 | +-- set null | ||
142 | +ALTER TABLE yh_shops.brand_series CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
143 | +ALTER TABLE yh_shops.brand_series CHANGE order_by order_by SMALLINT(6) null; | ||
144 | + | ||
145 | +-- erp_product | ||
146 | +-- 产品参数 | ||
147 | +CREATE TABLE `product_attribute` ( | ||
148 | + `attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
149 | + `attribute_name` varchar(100) DEFAULT NULL, | ||
150 | + `category_id` int(11) unsigned NOT NULL DEFAULT '0', | ||
151 | + `sale_type` int(11) unsigned DEFAULT '0' COMMENT '1:销售属性 2:非销售属性 3:扩展属性', | ||
152 | + `input_type` enum('radio','checkbox','select','text','textarea') DEFAULT NULL COMMENT 'radio 单选\n checkbox 复选\n select 下拉列表\n text 输入框\n textarea 多行输入', | ||
153 | + `attribute_type` tinyint(3) unsigned DEFAULT NULL COMMENT '1 - 可销售属性\n 2 - 非可销售属性\n 3 - 扩展属性', | ||
154 | + `is_must` enum('Y','N') DEFAULT 'N', | ||
155 | + `is_search` enum('Y','N') DEFAULT 'Y', | ||
156 | + `max_value_len` smallint(5) unsigned DEFAULT '50', | ||
157 | + `is_color` enum('Y','N') DEFAULT 'N', | ||
158 | + `is_allow_alias` enum('Y','N') DEFAULT 'N', | ||
159 | + `order_by` int(11) unsigned DEFAULT '0', | ||
160 | + `state` tinyint(3) unsigned DEFAULT '1', | ||
161 | + `remark` varchar(500) DEFAULT NULL, | ||
162 | + `attribute_values` varchar(1000) DEFAULT NULL COMMENT '红色,白色,黑色', | ||
163 | + `belong` tinyint(3) unsigned DEFAULT '10' COMMENT '10系统\n 20商家', | ||
164 | + `create_time` int(10) unsigned DEFAULT NULL, | ||
165 | + `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
166 | + PRIMARY KEY (`attribute_id`) | ||
167 | +) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 | ||
168 | + | ||
169 | + |
database/baseProductAndNestSale/洗数据脚本.sql
0 → 100644
1 | +INSERT INTO `product_attribute`(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2001,'弹性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
2 | +INSERT INTO `product_attribute`(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2002,'厚度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
3 | +INSERT INTO `product_attribute`(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2003,'柔软度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
4 | +INSERT INTO `product_attribute`(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2004,'透气性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
5 | +INSERT INTO `product_attribute`(attribute_id,`attribute_name`,`category_id`, `input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2005,'洗涤提示',0,'checkbox',2,'[{\"id\":1,\"name\":\"不可熨烫\"},{\"id\":2,\"name\":\"不可转笼翻转干燥\"},{\"id\":3,\"name\":\"30度水温弱速洗\"},{\"id\":4,\"name\":\"不可氯漂\"},{\"id\":5,\"name\":\"不可干洗\"},{\"id\":6,\"name\":\"不可拧干\"},{\"id\":7,\"name\":\"分色洗涤\"}]', 3);" |
-
Please register or login to post a comment