Showing
1 changed file
with
106 additions
and
0 deletions
inferface-document/database/base_product.sql
0 → 100644
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 `model_code` varchar(50) COMMENT '款型编号' AFTER `color_id`, | ||
38 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
39 | + | ||
40 | + | ||
41 | +3、base_single: | ||
42 | + | ||
43 | +ALTER TABLE `erp_supplier`.`base_single` | ||
44 | +ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`, | ||
45 | +ADD COLUMN `bar_code` varchar(255) DEFAULT '' COMMENT '条形码' AFTER `is_suppled`, | ||
46 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存' AFTER `bar_code`, | ||
47 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
48 | + | ||
49 | + | ||
50 | +erp_product库: | ||
51 | +1、product: | ||
52 | + | ||
53 | +ALTER TABLE `erp_product`.`product` | ||
54 | +ADD COLUMN `goods_years` smallint(5) DEFAULT 0, | ||
55 | +ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
56 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`, | ||
57 | +ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
58 | +ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
59 | +ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
60 | +ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
61 | +CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)', | ||
62 | +MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`, | ||
63 | +ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`, | ||
64 | +ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'N' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`, | ||
65 | +ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
66 | +ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
67 | +ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
68 | +ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
69 | +ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
70 | +ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
71 | + | ||
72 | + | ||
73 | +/***添加索引****/ | ||
74 | +ALTER TABLE `erp_product`.`product` | ||
75 | +ADD INDEX `brand_id` (`brand_id`) comment '', | ||
76 | +ADD INDEX `shop_id` (`shop_id`) comment '', | ||
77 | +ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
78 | +ADD INDEX `attribute` (`attribute`) comment '', | ||
79 | +ADD INDEX `is_jit` (`is_jit`) comment '', | ||
80 | +ADD INDEX `is_outlets` (`is_outlets`) comment '', | ||
81 | +ADD INDEX `is_advance` (`is_advance`) comment ''; | ||
82 | + | ||
83 | +2、base_goods: | ||
84 | +ALTER TABLE `erp_product`.`goods` | ||
85 | +ADD COLUMN `model_code` varchar(50) COMMENT '款型编号' AFTER `color_id`, | ||
86 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
87 | + | ||
88 | +3、storage: | ||
89 | + | ||
90 | +ALTER TABLE `erp_product`.`storage` | ||
91 | +ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`, | ||
92 | +ADD COLUMN `bar_code` varchar(255) DEFAULT '' COMMENT '条形码' AFTER `is_suppled`, | ||
93 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存' AFTER `bar_code`, | ||
94 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
95 | + | ||
96 | + | ||
97 | +ALTER TABLE `erp_product`.`storage` | ||
98 | +DROP COLUMN `presale_storage_num`; | ||
99 | + | ||
100 | + | ||
101 | +4、product_price: | ||
102 | + | ||
103 | +ALTER TABLE `erp_product`.`product_price` | ||
104 | +CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID', | ||
105 | +ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`; | ||
106 | + |
-
Please register or login to post a comment