|
|
--erp_supplier库:
|
|
|
--1、base_product:
|
|
|
ALTER TABLE `erp_supplier`.`base_product`
|
|
|
CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:1,否:null)',
|
|
|
ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `brand_folder`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`,
|
|
|
MODIFY COLUMN `goods_season` smallint(5) NULL DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`,
|
|
|
ADD COLUMN `is_vip` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `age_level`,
|
|
|
ADD COLUMN `is_limitbuy` enum('Y','N') NULL DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`,
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '限购开始时间' AFTER `is_limitbuy`,
|
|
|
ADD COLUMN `limit_end_time` int(10) NULL DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) NULL DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `is_outlets` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `seasons` varchar(100) DEFAULT '' COMMENT '适销季 夏:summer 冬:winter 四季:seasons',
|
|
|
ADD COLUMN `reason` varchar(255) DEFAULT '' COMMENT '审批驳回原因',
|
|
|
ADD COLUMN `editId` int(10) COMMENT '修改人id',
|
|
|
ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id',
|
|
|
ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间',
|
|
|
ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id',
|
|
|
ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间',
|
|
|
ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息';
|
|
|
|
|
|
|
|
|
--/**建立索引***/
|
|
|
ALTER TABLE `erp_supplier`.`base_product`
|
|
|
ADD INDEX `brand_id` (`brand_id`) comment '',
|
|
|
ADD INDEX `shop_id` (`shop_id`) comment '',
|
|
|
ADD INDEX `supplier_id` (`supplier_id`) comment '',
|
|
|
ADD INDEX `is_auditing` (`is_auditing`) comment '',
|
|
|
ADD INDEX `attribute` (`attribute`) comment '',
|
|
|
ADD INDEX `is_jit` (`is_jit`) comment '',
|
|
|
ADD INDEX `is_advance` (`is_advance`) comment '',
|
|
|
ADD INDEX `is_outlets` (`is_outlets`) comment '';
|
|
|
|
|
|
--2、base_goods:
|
|
|
ALTER TABLE `erp_supplier`.`base_goods`
|
|
|
ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`;
|
|
|
|
|
|
|
|
|
--3、base_single:
|
|
|
|
|
|
ALTER TABLE `erp_supplier`.`base_single`
|
|
|
ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`,
|
|
|
ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存',
|
|
|
ADD INDEX `is_suppled` (`is_suppled`) comment '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- erp_product库:
|
|
|
--1、product:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product`
|
|
|
ADD COLUMN `goods_years` smallint(5) DEFAULT 0,
|
|
|
ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`,
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`,
|
|
|
ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`,
|
|
|
CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)',
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`,
|
|
|
ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`,
|
|
|
ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`,
|
|
|
ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`,
|
|
|
ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id',
|
|
|
ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间',
|
|
|
ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id',
|
|
|
ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间',
|
|
|
ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息';
|
|
|
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product` ADD COLUMN `editId` int(10) COMMENT '修改人id';
|
|
|
|
|
|
--/***添加索引****/
|
|
|
ALTER TABLE `erp_product`.`product`
|
|
|
ADD INDEX `brand_id` (`brand_id`) comment '',
|
|
|
ADD INDEX `shop_id` (`shop_id`) comment '',
|
|
|
ADD INDEX `supplier_id` (`supplier_id`) comment '',
|
|
|
ADD INDEX `attribute` (`attribute`) comment '',
|
|
|
ADD INDEX `is_jit` (`is_jit`) comment '',
|
|
|
ADD INDEX `is_outlets` (`is_outlets`) comment '',
|
|
|
ADD INDEX `is_advance` (`is_advance`) comment '';
|
|
|
|
|
|
--2、goods:
|
|
|
ALTER TABLE `erp_product`.`goods`
|
|
|
ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`;
|
|
|
|
|
|
--3、storage:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`storage`
|
|
|
ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`,
|
|
|
ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存',
|
|
|
ADD INDEX `is_suppled` (`is_suppled`) comment '';
|
|
|
|
|
|
|
|
|
|
|
|
--4、product_price:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product_price`
|
|
|
CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID',
|
|
|
ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`;
|
|
|
|
|
|
|
|
|
alter table erp_product.product add column is_screen enum('Y', 'N') default 'N' COMMENT '是否已拍摄标识';
|
|
|
alter table erp_product.product add column is_measure enum('Y', 'N') default 'N' COMMENT '是否已测量标识';
|
|
|
alter table erp_product.product add column status smallint default 1 COMMENT ' 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过';
|
|
|
alter table erp_product.product add column first_shelve_time int(10) unsigned DEFAULT '0' COMMENT '首次上架时间';
|
|
|
alter table erp_product.product add column shelve_time int(10) unsigned DEFAULT '0' COMMENT '上架时间可作为上新参考';
|
|
|
alter table erp_product.product add column `stock` smallint(6) DEFAULT 0 COMMENT '库存';
|
|
|
alter table erp_product.product add column `next_status` smallint COMMENT '下一流程状态';
|
|
|
Alter table erp_product.product ADD column `founder` int(11) COMMENT '操作人';
|
|
|
Alter table erp_product.product ADD column `is_info_miss` enum('Y', 'N') default 'Y' COMMENT '是否信息缺失';
|
|
|
create index product_edittime on erp_product.product(`edit_time`);
|
|
|
|
|
|
update erp_product.product set is_info_miss = 'N';
|
|
|
|
|
|
create table erp_product.product_ext(
|
|
|
product_skn int COMMENT '商品erp标识',
|
|
|
product_desc text COMMENT '描述', -- 废弃
|
|
|
recommend text COMMENT '小编推荐', -- 新增字段
|
|
|
is_hostsell enum('Y', 'N') default 'N' COMMENT '是否热销 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot
|
|
|
sales_phrase varchar(100) COMMENT '促销短语', -- 需要割接 之前直接操作的前台表yh_shops.sales_phrase
|
|
|
is_new enum('Y', 'N') default 'N' COMMENT '是否新品 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot
|
|
|
shelves_day int COMMENT '售罄后几天后下架', -- 废弃
|
|
|
sell_channels set('0','1','2','3','4','5','6','7','8','9') COMMENT '上架渠道', -- 需要割接 之前直接操作的前台表yh_shops.sell_channels
|
|
|
phrase varchar(500) COMMENT '商品短评', -- 需要割接 之前直接操作的前台表yh_shops.phrase
|
|
|
search_keys varchar(500) COMMENT '搜索关键词 以英文逗号分隔', --
|
|
|
vedio_url varchar(100) COMMENT '视频链接', -- 新增字段
|
|
|
make_crafts varchar(50) COMMENT '制作工艺', -- 新增字段
|
|
|
brand_series varchar(50) COMMENT '品牌系列', -- 新增字段
|
|
|
brand_model varchar(50) COMMENT '品牌款型', -- 新增字段
|
|
|
reject_reason varchar(500) COMMENT '驳回原因' -- 无需同步
|
|
|
)ENGINE=INNODB DEFAULT CHARSET=utf8;
|
|
|
Alter table erp_product.product_ext add primary key(product_skn);
|
|
|
|
|
|
-- 变价表和变价日志表
|
|
|
alter table erp_product.product_price modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID';
|
|
|
alter table erp_product.product_price_log modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID';
|
|
|
|
|
|
|
|
|
-- 1.4 缺失信息维护
|
|
|
|
|
|
-- 网销信息缺失类型的全量枚举表(无需同步)
|
|
|
-- DROP TABLE IF EXISTS `netsale_infomiss`;
|
|
|
CREATE TABLE erp_product.netsale_infomiss (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(100) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型的全量枚举表';
|
|
|
|
|
|
insert into erp_product.netsale_infomiss (name) values('文本信息'),('尺码信息'),('搜索/标签');
|
|
|
|
|
|
-- 商品和网销信息缺失表的关联关系表(无需同步)
|
|
|
-- DROP TABLE IF EXISTS `netsale_infomiss_relation`;
|
|
|
CREATE TABLE erp_product.netsale_infomiss_relation (
|
|
|
`product_skn` int(11) unsigned NOT NULL,
|
|
|
`infomiss_id` int(11) unsigned NOT NULL COMMENT 'netsale_infomiss_sort 的主键',
|
|
|
PRIMARY KEY (`product_skn`, infomiss_id)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型和商品的关系表';
|
|
|
|
|
|
-- erp_product
|
|
|
-- 产品参数
|
|
|
CREATE TABLE erp_product.product_attribute (
|
|
|
`attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`attribute_name` varchar(100) DEFAULT NULL,
|
|
|
`category_id` int(11) unsigned NOT NULL DEFAULT '0',
|
|
|
`sale_type` int(11) unsigned DEFAULT '0' COMMENT '1:销售属性 2:非销售属性 3:扩展属性',
|
|
|
`input_type` enum('radio','checkbox','select','text','textarea') DEFAULT NULL COMMENT 'radio 单选\n checkbox 复选\n select 下拉列表\n text 输入框\n textarea 多行输入',
|
|
|
`attribute_type` tinyint(3) unsigned DEFAULT NULL COMMENT '1 - 可销售属性\n 2 - 非可销售属性\n 3 - 扩展属性',
|
|
|
`is_must` enum('Y','N') DEFAULT 'N',
|
|
|
`is_search` enum('Y','N') DEFAULT 'Y',
|
|
|
`max_value_len` smallint(5) unsigned DEFAULT '50',
|
|
|
`is_color` enum('Y','N') DEFAULT 'N',
|
|
|
`is_allow_alias` enum('Y','N') DEFAULT 'N',
|
|
|
`order_by` int(11) unsigned DEFAULT '0',
|
|
|
`state` tinyint(3) unsigned DEFAULT '1',
|
|
|
`remark` varchar(500) DEFAULT NULL,
|
|
|
`attribute_values` varchar(1000) DEFAULT NULL COMMENT '红色,白色,黑色',
|
|
|
`belong` tinyint(3) unsigned DEFAULT '10' COMMENT '10系统\n 20商家',
|
|
|
`create_time` int(10) unsigned DEFAULT NULL,
|
|
|
`display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数',
|
|
|
PRIMARY KEY (`attribute_id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2 yh_shops 库
|
|
|
-- 2.1 商品的展示店铺
|
|
|
create table yh_shops.product_shop_relation(
|
|
|
product_skn int COMMENT 'SKN',
|
|
|
shop_id int COMMENT '店铺Id'
|
|
|
);
|
|
|
Alter table yh_shops.product_shop_relation add primary key(product_skn, shop_id);
|
|
|
|
|
|
-- 标识商品是否是新平台的商品
|
|
|
alter table yh_shops.product add column source_flag enum('0', '1') default '0' COMMENT '新平台发布的商品为1 原来则为0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2.5 预上架上新记录表
|
|
|
Alter table yh_shops.product_timing ADD column `product_skn` int(11) unsigned default 0;
|
|
|
Alter table yh_shops.product_timing ADD column `advance_begin_time` int(10) unsigned; -- 预售开始时间
|
|
|
Alter table yh_shops.product_timing ADD column `advance_end_time` int(10) unsigned; -- 预售结束时间
|
|
|
Alter table yh_shops.product_timing ADD column `on_new_time` int(10) unsigned; -- 预上架上新时间
|
|
|
Alter table yh_shops.product_timing ADD column `out_sale_time` int(10) unsigned; -- 售罄后几天下架时间
|
|
|
create index timing_skn on yh_shops.product_timing(`product_skn`);
|
|
|
Alter table yh_shops.product_timing modify column shelve_time int(10) unsigned COMMENT '预上架架时间';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2.8 平台商品属性值表
|
|
|
|
|
|
CREATE TABLE yh_shops.product_attribute_property_values (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`product_skn` int(11) unsigned NOT NULL,
|
|
|
`attribute_id` int(11) unsigned NOT NULL COMMENT '品类属性ID',
|
|
|
`attribute_value_id` varchar(128) COMMENT '品类属性值ID 多个用逗号分隔',
|
|
|
`display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数',
|
|
|
PRIMARY KEY (`id`),
|
|
|
KEY `attribute_pro_skn_attrid` (`product_skn`,`attribute_id`)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '平台商品属性值表';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- yh_shops
|
|
|
ALTER TABLE yh_shops.product_standard_relation ADD COLUMN product_skn INT(11) UNSIGNED;
|
|
|
|
|
|
ALTER TABLE yh_shops.`product_collocation` ADD COLUMN product_skn INT(11) UNSIGNED ;
|
|
|
|
|
|
-- brand_folder
|
|
|
ALTER TABLE yh_shops.brand_folder ADD shops_id INT(11) UNSIGNED COMMENT '店铺id';
|
|
|
ALTER TABLE yh_shops.brand_folder ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间';
|
|
|
ALTER TABLE yh_shops.brand_folder ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间';
|
|
|
ALTER TABLE yh_shops.brand_folder CHANGE parent_id parent_id INT(11) UNSIGNED null ;
|
|
|
ALTER TABLE yh_shops.brand_folder CHANGE order_by order_by SMALLINT(6) null;
|
|
|
-- brand_series
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD shops_id INT(11) UNSIGNED COMMENT '店铺id';
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间';
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间';
|
|
|
-- add key
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD KEY key_shops_id (shops_id);
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD KEY key_brand_id (brand_id);
|
|
|
-- set null
|
|
|
ALTER TABLE yh_shops.brand_series CHANGE parent_id parent_id INT(11) UNSIGNED null ;
|
|
|
ALTER TABLE yh_shops.brand_series CHANGE order_by order_by SMALLINT(6) null;
|
|
|
|
|
|
|
|
|
ALTER TABLE `yh_shops`.`product`
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间',
|
|
|
ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `product_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `product_code`,
|
|
|
ADD COLUMN `goods_years` smallint(5) DEFAULT '0' COMMENT '货品年',
|
|
|
ADD COLUMN `goods_season` smallint(5) DEFAULT '0' COMMENT '货品季',
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','N') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否',
|
|
|
ADD COLUMN `outlets_setting` enum('B','N','S') DEFAULT 'N' COMMENT '奥特莱斯设置B:品牌设置;S:店铺设置,N:不设置',
|
|
|
ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`;
|
|
|
ALTER TABLE yh_shops.product
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','B','N') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否' AFTER `storage`;
|
|
|
|
|
|
ALTER TABLE yh_shops.product
|
|
|
ADD COLUMN `series` varchar(100) NULL DEFAULT NULL AFTER `outlets_setting`,
|
|
|
ADD COLUMN `models` varchar(100) NULL DEFAULT NULL AFTER `series`,
|
|
|
ADD COLUMN `product_tag` varchar(100) NULL DEFAULT NULL AFTER `models`,
|
|
|
ADD COLUMN `product_elements` varchar(200) NULL DEFAULT NULL AFTER `product_tag`,
|
|
|
ADD COLUMN `product_style` varchar(200) NULL AFTER `product_elements`,
|
|
|
ADD COLUMN `grade` char(20) NULL DEFAULT NULL COMMENT '重点款型(是:K,否:null)' AFTER `product_style`,
|
|
|
ADD COLUMN `brand_folder` int(5) NULL DEFAULT NULL AFTER `grade`;
|
|
|
|
|
|
|
|
|
ALTER TABLE yh_shops.storage
|
|
|
ADD COLUMN `factory_code` varchar(100) NULL AFTER `create_time`,
|
|
|
ADD COLUMN `is_suppled` enum('N','Y') NOT NULL DEFAULT 'Y' COMMENT '能否补货' AFTER `factory_code`,
|
|
|
ADD COLUMN `product_skc` int(11) NOT NULL DEFAULT 0 AFTER `is_suppled`;
|
|
|
---------------------
|
|
|
ALTER TABLE yh_shops.goods
|
|
|
ADD COLUMN `factory_code` varchar(100) NULL;
|
|
|
--------------------------
|
|
|
CREATE TABLE `yh_shops`.`product_ext` (
|
|
|
`product_skn` int(11) NOT NULL DEFAULT '0' COMMENT '商品erp标识',
|
|
|
`product_desc` text COMMENT '描述',
|
|
|
`recommend` text COMMENT '小编推荐',
|
|
|
`is_hostsell` enum('Y','N') DEFAULT 'N' COMMENT '是否热销 Y:是N:否',
|
|
|
`shelves_day` int(11) DEFAULT NULL COMMENT '售罄后几天后下架',
|
|
|
`search_keys` varchar(500) DEFAULT NULL COMMENT '搜索关键词 以英文逗号分隔',
|
|
|
`vedio_url` varchar(100) DEFAULT NULL COMMENT '视频链接',
|
|
|
`make_crafts` varchar(50) DEFAULT NULL COMMENT '制作工艺',
|
|
|
`brand_series` varchar(50) DEFAULT NULL COMMENT '品牌系列',
|
|
|
`brand_model` varchar(50) DEFAULT NULL COMMENT '品牌款型',
|
|
|
`reject_reason` varchar(500) DEFAULT NULL COMMENT '驳回原因',
|
|
|
PRIMARY KEY (`product_skn`)
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
ALTER TABLE yh_shops.brand_series ADD COLUMN `bannar_img` varchar(100) DEFAULT NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 拍摄复尺 数据库 erp_product
|
|
|
|
|
|
|
|
|
CREATE TABLE erp_product.shoot_requirement(
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 正常 0 不可用',
|
|
|
`name` char(50) NOT NULL DEFAULT '',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
`founder` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
`founder_name` varchar(50) DEFAULT '' COMMENT '添加人姓名',
|
|
|
`update_uid` int(10) unsigned DEFAULT '0' COMMENT '修改人id',
|
|
|
`update_user_name` varchar(50) DEFAULT '' COMMENT '修改人姓名',
|
|
|
`update_time` int(11) unsigned DEFAULT '0',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
|
|
|
|
|
|
|
|
|
--拍摄管理 加索引
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skc(product_skc);
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skn(product_skn);
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_sku(product_sku);
|
|
|
ALTER TABLE erp_product.product_photography_list ADD INDEX ind_product_skn(product_skn);
|
|
|
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD founder_name VARCHAR(20) ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_uid INT ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_name VARCHAR(20) ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_time INT ;
|
|
|
|
|
|
----拍摄要求
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `founder_name` VARCHAR(50) DEFAULT '' COMMENT '添加人姓名';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `update_uid` INT(10) UNSIGNED DEFAULT '0' COMMENT '修改人id';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `update_user_name` VARCHAR(50) DEFAULT '' COMMENT '修改人姓名';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD`update_time` INT(11) UNSIGNED NULL DEFAULT '0';
|
|
|
ALTER TABLE erp_product.shoot_requirement MODIFY `type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景';
|
|
|
ALTER TABLE erp_product.shoot_requirement MODIFY `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 正常 0 删除';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--前台表 yh_shops
|
|
|
|
|
|
ALTER TABLE yh_shops.model
|
|
|
ADD COLUMN `english_name` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `model_name`,
|
|
|
ADD COLUMN `nationality` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `english_name`,
|
|
|
ADD COLUMN `shoe_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `nationality`,
|
|
|
ADD COLUMN `dress_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `shoe_size`,
|
|
|
ADD COLUMN `model_card` VARCHAR(255) DEFAULT ''COMMENT '模特卡' AFTER `dress_size`,
|
|
|
ADD COLUMN `status` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 禁用 1 启用' AFTER `avatar` ,
|
|
|
CHANGE `model_type` `model_type` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1 拍摄模特 2 试穿模特' AFTER `status` ,
|
|
|
CHANGE `create_time` `create_time` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `model_type` ,
|
|
|
ADD COLUMN `update_time` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `create_time` ,
|
|
|
ADD COLUMN `add_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人id' AFTER `update_time` ,
|
|
|
ADD COLUMN `add_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `add_uid` ,
|
|
|
ADD COLUMN `update_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '修改人id' AFTER `add_user_name` ,
|
|
|
ADD COLUMN `update_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `update_uid`;
|
|
|
|
|
|
ALTER TABLE yh_shops.model_card
|
|
|
ADD COLUMN `model_id` INT NOT NULL DEFAULT 0 AFTER `model_name`;
|
|
|
|
|
|
ALTER TABLE yh_shops.product_size_reference ADD KEY `union_key` (`product_skn`,`size_id`,`gender`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 店铺装修
|
|
|
|
|
|
--database erp_supplier
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_id` int(11) DEFAULT NULL,
|
|
|
`check_status` int(11) DEFAULT NULL COMMENT '100 暂存 200 待审核 300 审核通过 900 驳回',
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`update_time` int(11) DEFAULT NULL,
|
|
|
`status` int(11) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修';
|
|
|
|
|
|
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_comment` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) DEFAULT NULL,
|
|
|
`shops_decorator_template_id` int(11) DEFAULT NULL,
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`comment` varchar(100) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `erp_supplier`.`shops_decorator_template`;
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_template` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) NOT NULL,
|
|
|
`platform` varchar(10) NOT NULL COMMENT '平台(PC,APP)',
|
|
|
`template_type` varchar(10) DEFAULT '2' COMMENT '模板(1:基础模板,2:经典模板)',
|
|
|
`create_time` int(11) NOT NULL,
|
|
|
`update_time` int(11) NOT NULL DEFAULT '0',
|
|
|
`is_enable` enum('N','Y','') DEFAULT 'Y' COMMENT '是否启用该模板',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板';
|
|
|
|
|
|
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_template_resource` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) DEFAULT NULL,
|
|
|
`shops_decorator_template_id` int(11) DEFAULT NULL,
|
|
|
`resource_name` varchar(50) DEFAULT NULL,
|
|
|
`resource_data` text,
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`update_time` int(11) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2905 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板信息';
|
|
|
|
|
|
--erp_supplier库:
|
|
|
--1、base_product:
|
|
|
ALTER TABLE `erp_supplier`.`base_product`
|
|
|
CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:1,否:null)',
|
|
|
ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `brand_folder`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`,
|
|
|
MODIFY COLUMN `goods_season` smallint(5) NULL DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`,
|
|
|
ADD COLUMN `is_vip` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `age_level`,
|
|
|
ADD COLUMN `is_limitbuy` enum('Y','N') NULL DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`,
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '限购开始时间' AFTER `is_limitbuy`,
|
|
|
ADD COLUMN `limit_end_time` int(10) NULL DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) NULL DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `is_outlets` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `seasons` varchar(100) DEFAULT '' COMMENT '适销季 夏:summer 冬:winter 四季:seasons',
|
|
|
ADD COLUMN `reason` varchar(255) DEFAULT '' COMMENT '审批驳回原因',
|
|
|
ADD COLUMN `editId` int(10) COMMENT '修改人id',
|
|
|
ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id',
|
|
|
ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间',
|
|
|
ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id',
|
|
|
ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间',
|
|
|
ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息';
|
|
|
|
|
|
|
|
|
--/**建立索引***/
|
|
|
ALTER TABLE `erp_supplier`.`base_product`
|
|
|
ADD INDEX `brand_id` (`brand_id`) comment '',
|
|
|
ADD INDEX `shop_id` (`shop_id`) comment '',
|
|
|
ADD INDEX `supplier_id` (`supplier_id`) comment '',
|
|
|
ADD INDEX `is_auditing` (`is_auditing`) comment '',
|
|
|
ADD INDEX `attribute` (`attribute`) comment '',
|
|
|
ADD INDEX `is_jit` (`is_jit`) comment '',
|
|
|
ADD INDEX `is_advance` (`is_advance`) comment '',
|
|
|
ADD INDEX `is_outlets` (`is_outlets`) comment '';
|
|
|
|
|
|
--2、base_goods:
|
|
|
ALTER TABLE `erp_supplier`.`base_goods`
|
|
|
ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`;
|
|
|
|
|
|
|
|
|
--3、base_single:
|
|
|
|
|
|
ALTER TABLE `erp_supplier`.`base_single`
|
|
|
ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`,
|
|
|
ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存',
|
|
|
ADD INDEX `is_suppled` (`is_suppled`) comment '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- erp_product库:
|
|
|
--1、product:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product`
|
|
|
ADD COLUMN `goods_years` smallint(5) DEFAULT 0,
|
|
|
ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`,
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`,
|
|
|
ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`,
|
|
|
CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)',
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`,
|
|
|
ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`,
|
|
|
ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`,
|
|
|
ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`,
|
|
|
ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id',
|
|
|
ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间',
|
|
|
ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id',
|
|
|
ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间',
|
|
|
ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息';
|
|
|
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product` ADD COLUMN `editId` int(10) COMMENT '修改人id';
|
|
|
|
|
|
--/***添加索引****/
|
|
|
ALTER TABLE `erp_product`.`product`
|
|
|
ADD INDEX `brand_id` (`brand_id`) comment '',
|
|
|
ADD INDEX `shop_id` (`shop_id`) comment '',
|
|
|
ADD INDEX `supplier_id` (`supplier_id`) comment '',
|
|
|
ADD INDEX `attribute` (`attribute`) comment '',
|
|
|
ADD INDEX `is_jit` (`is_jit`) comment '',
|
|
|
ADD INDEX `is_outlets` (`is_outlets`) comment '',
|
|
|
ADD INDEX `is_advance` (`is_advance`) comment '';
|
|
|
|
|
|
--2、goods:
|
|
|
ALTER TABLE `erp_product`.`goods`
|
|
|
ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`;
|
|
|
|
|
|
--3、storage:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`storage`
|
|
|
ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`,
|
|
|
ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存',
|
|
|
ADD INDEX `is_suppled` (`is_suppled`) comment '';
|
|
|
|
|
|
|
|
|
|
|
|
--4、product_price:
|
|
|
|
|
|
ALTER TABLE `erp_product`.`product_price`
|
|
|
CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID',
|
|
|
ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`;
|
|
|
|
|
|
|
|
|
alter table erp_product.product add column is_screen enum('Y', 'N') default 'N' COMMENT '是否已拍摄标识';
|
|
|
alter table erp_product.product add column is_measure enum('Y', 'N') default 'N' COMMENT '是否已测量标识';
|
|
|
alter table erp_product.product add column status smallint default 1 COMMENT ' 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过';
|
|
|
alter table erp_product.product add column first_shelve_time int(10) unsigned DEFAULT '0' COMMENT '首次上架时间';
|
|
|
alter table erp_product.product add column shelve_time int(10) unsigned DEFAULT '0' COMMENT '上架时间可作为上新参考';
|
|
|
alter table erp_product.product add column `stock` smallint(6) DEFAULT 0 COMMENT '库存';
|
|
|
alter table erp_product.product add column `next_status` smallint COMMENT '下一流程状态';
|
|
|
Alter table erp_product.product ADD column `founder` int(11) COMMENT '操作人';
|
|
|
Alter table erp_product.product ADD column `is_info_miss` enum('Y', 'N') default 'Y' COMMENT '是否信息缺失';
|
|
|
create index product_edittime on erp_product.product(`edit_time`);
|
|
|
|
|
|
update erp_product.product set is_info_miss = 'N';
|
|
|
|
|
|
create table erp_product.product_ext(
|
|
|
product_skn int COMMENT '商品erp标识',
|
|
|
product_desc text COMMENT '描述', -- 废弃
|
|
|
recommend text COMMENT '小编推荐', -- 新增字段
|
|
|
is_hostsell enum('Y', 'N') default 'N' COMMENT '是否热销 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot
|
|
|
sales_phrase varchar(100) COMMENT '促销短语', -- 需要割接 之前直接操作的前台表yh_shops.sales_phrase
|
|
|
is_new enum('Y', 'N') default 'N' COMMENT '是否新品 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot
|
|
|
shelves_day int COMMENT '售罄后几天后下架', -- 废弃
|
|
|
sell_channels set('0','1','2','3','4','5','6','7','8','9') COMMENT '上架渠道', -- 需要割接 之前直接操作的前台表yh_shops.sell_channels
|
|
|
phrase varchar(500) COMMENT '商品短评', -- 需要割接 之前直接操作的前台表yh_shops.phrase
|
|
|
search_keys varchar(500) COMMENT '搜索关键词 以英文逗号分隔', --
|
|
|
vedio_url varchar(100) COMMENT '视频链接', -- 新增字段
|
|
|
make_crafts varchar(50) COMMENT '制作工艺', -- 新增字段
|
|
|
brand_series varchar(50) COMMENT '品牌系列', -- 新增字段
|
|
|
brand_model varchar(50) COMMENT '品牌款型', -- 新增字段
|
|
|
reject_reason varchar(500) COMMENT '驳回原因' -- 无需同步
|
|
|
)ENGINE=INNODB DEFAULT CHARSET=utf8;
|
|
|
Alter table erp_product.product_ext add primary key(product_skn);
|
|
|
|
|
|
-- 变价表和变价日志表
|
|
|
alter table erp_product.product_price modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID';
|
|
|
alter table erp_product.product_price_log modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID';
|
|
|
|
|
|
|
|
|
-- 1.4 缺失信息维护
|
|
|
|
|
|
-- 网销信息缺失类型的全量枚举表(无需同步)
|
|
|
-- DROP TABLE IF EXISTS `netsale_infomiss`;
|
|
|
CREATE TABLE erp_product.netsale_infomiss (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`name` varchar(100) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型的全量枚举表';
|
|
|
|
|
|
insert into erp_product.netsale_infomiss (name) values('文本信息'),('尺码信息'),('搜索/标签');
|
|
|
|
|
|
-- 商品和网销信息缺失表的关联关系表(无需同步)
|
|
|
-- DROP TABLE IF EXISTS `netsale_infomiss_relation`;
|
|
|
CREATE TABLE erp_product.netsale_infomiss_relation (
|
|
|
`product_skn` int(11) unsigned NOT NULL,
|
|
|
`infomiss_id` int(11) unsigned NOT NULL COMMENT 'netsale_infomiss_sort 的主键',
|
|
|
PRIMARY KEY (`product_skn`, infomiss_id)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型和商品的关系表';
|
|
|
|
|
|
-- erp_product
|
|
|
-- 产品参数
|
|
|
CREATE TABLE erp_product.product_attribute (
|
|
|
`attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`attribute_name` varchar(100) DEFAULT NULL,
|
|
|
`category_id` int(11) unsigned NOT NULL DEFAULT '0',
|
|
|
`sale_type` int(11) unsigned DEFAULT '0' COMMENT '1:销售属性 2:非销售属性 3:扩展属性',
|
|
|
`input_type` enum('radio','checkbox','select','text','textarea') DEFAULT NULL COMMENT 'radio 单选\n checkbox 复选\n select 下拉列表\n text 输入框\n textarea 多行输入',
|
|
|
`attribute_type` tinyint(3) unsigned DEFAULT NULL COMMENT '1 - 可销售属性\n 2 - 非可销售属性\n 3 - 扩展属性',
|
|
|
`is_must` enum('Y','N') DEFAULT 'N',
|
|
|
`is_search` enum('Y','N') DEFAULT 'Y',
|
|
|
`max_value_len` smallint(5) unsigned DEFAULT '50',
|
|
|
`is_color` enum('Y','N') DEFAULT 'N',
|
|
|
`is_allow_alias` enum('Y','N') DEFAULT 'N',
|
|
|
`order_by` int(11) unsigned DEFAULT '0',
|
|
|
`state` tinyint(3) unsigned DEFAULT '1',
|
|
|
`remark` varchar(500) DEFAULT NULL,
|
|
|
`attribute_values` varchar(1000) DEFAULT NULL COMMENT '红色,白色,黑色',
|
|
|
`belong` tinyint(3) unsigned DEFAULT '10' COMMENT '10系统\n 20商家',
|
|
|
`create_time` int(10) unsigned DEFAULT NULL,
|
|
|
`display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数',
|
|
|
PRIMARY KEY (`attribute_id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
INSERT INTO erp_product.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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2 yh_shops 库
|
|
|
-- 2.1 商品的展示店铺
|
|
|
create table yh_shops.product_shop_relation(
|
|
|
product_skn int COMMENT 'SKN',
|
|
|
shop_id int COMMENT '店铺Id'
|
|
|
);
|
|
|
Alter table yh_shops.product_shop_relation add primary key(product_skn, shop_id);
|
|
|
|
|
|
-- 标识商品是否是新平台的商品
|
|
|
alter table yh_shops.product add column source_flag enum('0', '1') default '0' COMMENT '新平台发布的商品为1 原来则为0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2.5 预上架上新记录表
|
|
|
Alter table yh_shops.product_timing ADD column `product_skn` int(11) unsigned default 0;
|
|
|
Alter table yh_shops.product_timing ADD column `advance_begin_time` int(10) unsigned; -- 预售开始时间
|
|
|
Alter table yh_shops.product_timing ADD column `advance_end_time` int(10) unsigned; -- 预售结束时间
|
|
|
Alter table yh_shops.product_timing ADD column `on_new_time` int(10) unsigned; -- 预上架上新时间
|
|
|
Alter table yh_shops.product_timing ADD column `out_sale_time` int(10) unsigned; -- 售罄后几天下架时间
|
|
|
create index timing_skn on yh_shops.product_timing(`product_skn`);
|
|
|
Alter table yh_shops.product_timing modify column shelve_time int(10) unsigned COMMENT '预上架架时间';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 2.8 平台商品属性值表
|
|
|
|
|
|
CREATE TABLE yh_shops.product_attribute_property_values (
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`product_skn` int(11) unsigned NOT NULL,
|
|
|
`attribute_id` int(11) unsigned NOT NULL COMMENT '品类属性ID',
|
|
|
`attribute_value_id` varchar(128) COMMENT '品类属性值ID 多个用逗号分隔',
|
|
|
`display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数',
|
|
|
PRIMARY KEY (`id`),
|
|
|
KEY `attribute_pro_skn_attrid` (`product_skn`,`attribute_id`)
|
|
|
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '平台商品属性值表';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- yh_shops
|
|
|
ALTER TABLE yh_shops.product_standard_relation ADD COLUMN product_skn INT(11) UNSIGNED;
|
|
|
|
|
|
ALTER TABLE yh_shops.`product_collocation` ADD COLUMN product_skn INT(11) UNSIGNED ;
|
|
|
|
|
|
-- brand_folder
|
|
|
ALTER TABLE yh_shops.brand_folder ADD shops_id INT(11) UNSIGNED COMMENT '店铺id';
|
|
|
ALTER TABLE yh_shops.brand_folder ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间';
|
|
|
ALTER TABLE yh_shops.brand_folder ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间';
|
|
|
ALTER TABLE yh_shops.brand_folder CHANGE parent_id parent_id INT(11) UNSIGNED null ;
|
|
|
ALTER TABLE yh_shops.brand_folder CHANGE order_by order_by SMALLINT(6) null;
|
|
|
-- brand_series
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD shops_id INT(11) UNSIGNED COMMENT '店铺id';
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间';
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间';
|
|
|
-- add key
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD KEY key_shops_id (shops_id);
|
|
|
ALTER TABLE yh_shops.`brand_series` ADD KEY key_brand_id (brand_id);
|
|
|
-- set null
|
|
|
ALTER TABLE yh_shops.brand_series CHANGE parent_id parent_id INT(11) UNSIGNED null ;
|
|
|
ALTER TABLE yh_shops.brand_series CHANGE order_by order_by SMALLINT(6) null;
|
|
|
|
|
|
|
|
|
ALTER TABLE `yh_shops`.`product`
|
|
|
ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间',
|
|
|
ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`,
|
|
|
ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`,
|
|
|
ADD COLUMN `product_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`,
|
|
|
ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `product_code`,
|
|
|
ADD COLUMN `goods_years` smallint(5) DEFAULT '0' COMMENT '货品年',
|
|
|
ADD COLUMN `goods_season` smallint(5) DEFAULT '0' COMMENT '货品季',
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','N') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否',
|
|
|
ADD COLUMN `outlets_setting` enum('B','N','S') DEFAULT 'N' COMMENT '奥特莱斯设置B:品牌设置;S:店铺设置,N:不设置',
|
|
|
ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`;
|
|
|
ALTER TABLE yh_shops.product
|
|
|
MODIFY COLUMN `is_outlets` enum('Y','B','N') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否' AFTER `storage`;
|
|
|
|
|
|
ALTER TABLE yh_shops.product
|
|
|
ADD COLUMN `series` varchar(100) NULL DEFAULT NULL AFTER `outlets_setting`,
|
|
|
ADD COLUMN `models` varchar(100) NULL DEFAULT NULL AFTER `series`,
|
|
|
ADD COLUMN `product_tag` varchar(100) NULL DEFAULT NULL AFTER `models`,
|
|
|
ADD COLUMN `product_elements` varchar(200) NULL DEFAULT NULL AFTER `product_tag`,
|
|
|
ADD COLUMN `product_style` varchar(200) NULL AFTER `product_elements`,
|
|
|
ADD COLUMN `grade` char(20) NULL DEFAULT NULL COMMENT '重点款型(是:K,否:null)' AFTER `product_style`,
|
|
|
ADD COLUMN `brand_folder` int(5) NULL DEFAULT NULL AFTER `grade`;
|
|
|
|
|
|
|
|
|
ALTER TABLE yh_shops.storage
|
|
|
ADD COLUMN `factory_code` varchar(100) NULL AFTER `create_time`,
|
|
|
ADD COLUMN `is_suppled` enum('N','Y') NOT NULL DEFAULT 'Y' COMMENT '能否补货' AFTER `factory_code`,
|
|
|
ADD COLUMN `product_skc` int(11) NOT NULL DEFAULT 0 AFTER `is_suppled`;
|
|
|
---------------------
|
|
|
ALTER TABLE yh_shops.goods
|
|
|
ADD COLUMN `factory_code` varchar(100) NULL;
|
|
|
--------------------------
|
|
|
CREATE TABLE `yh_shops`.`product_ext` (
|
|
|
`product_skn` int(11) NOT NULL DEFAULT '0' COMMENT '商品erp标识',
|
|
|
`product_desc` text COMMENT '描述',
|
|
|
`recommend` text COMMENT '小编推荐',
|
|
|
`is_hostsell` enum('Y','N') DEFAULT 'N' COMMENT '是否热销 Y:是N:否',
|
|
|
`shelves_day` int(11) DEFAULT NULL COMMENT '售罄后几天后下架',
|
|
|
`search_keys` varchar(500) DEFAULT NULL COMMENT '搜索关键词 以英文逗号分隔',
|
|
|
`vedio_url` varchar(100) DEFAULT NULL COMMENT '视频链接',
|
|
|
`make_crafts` varchar(50) DEFAULT NULL COMMENT '制作工艺',
|
|
|
`brand_series` varchar(50) DEFAULT NULL COMMENT '品牌系列',
|
|
|
`brand_model` varchar(50) DEFAULT NULL COMMENT '品牌款型',
|
|
|
`reject_reason` varchar(500) DEFAULT NULL COMMENT '驳回原因',
|
|
|
PRIMARY KEY (`product_skn`)
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
ALTER TABLE yh_shops.brand_series ADD COLUMN `bannar_img` varchar(100) DEFAULT NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 拍摄复尺 数据库 erp_product
|
|
|
|
|
|
|
|
|
CREATE TABLE erp_product.shoot_requirement(
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 正常 0 不可用',
|
|
|
`name` char(50) NOT NULL DEFAULT '',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
`founder` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
`founder_name` varchar(50) DEFAULT '' COMMENT '添加人姓名',
|
|
|
`update_uid` int(10) unsigned DEFAULT '0' COMMENT '修改人id',
|
|
|
`update_user_name` varchar(50) DEFAULT '' COMMENT '修改人姓名',
|
|
|
`update_time` int(11) unsigned DEFAULT '0',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
|
|
|
|
|
|
|
|
|
--拍摄管理 加索引
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skc(product_skc);
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skn(product_skn);
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_sku(product_sku);
|
|
|
ALTER TABLE erp_product.product_photography_list ADD INDEX ind_product_skn(product_skn);
|
|
|
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD founder_name VARCHAR(20) ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_uid INT ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_name VARCHAR(20) ;
|
|
|
ALTER TABLE erp_product.product_photography_picture ADD update_time INT ;
|
|
|
|
|
|
----拍摄要求
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `founder_name` VARCHAR(50) DEFAULT '' COMMENT '添加人姓名';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `update_uid` INT(10) UNSIGNED DEFAULT '0' COMMENT '修改人id';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD `update_user_name` VARCHAR(50) DEFAULT '' COMMENT '修改人姓名';
|
|
|
ALTER TABLE erp_product.shoot_requirement ADD`update_time` INT(11) UNSIGNED NULL DEFAULT '0';
|
|
|
ALTER TABLE erp_product.shoot_requirement MODIFY `type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景';
|
|
|
ALTER TABLE erp_product.shoot_requirement MODIFY `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 正常 0 删除';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--前台表 yh_shops
|
|
|
|
|
|
ALTER TABLE yh_shops.model
|
|
|
ADD COLUMN `english_name` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `model_name`,
|
|
|
ADD COLUMN `nationality` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `english_name`,
|
|
|
ADD COLUMN `shoe_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `nationality`,
|
|
|
ADD COLUMN `dress_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `shoe_size`,
|
|
|
ADD COLUMN `model_card` VARCHAR(255) DEFAULT ''COMMENT '模特卡' AFTER `dress_size`,
|
|
|
ADD COLUMN `status` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 禁用 1 启用' AFTER `avatar` ,
|
|
|
CHANGE `model_type` `model_type` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1 拍摄模特 2 试穿模特' AFTER `status` ,
|
|
|
CHANGE `create_time` `create_time` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `model_type` ,
|
|
|
ADD COLUMN `update_time` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `create_time` ,
|
|
|
ADD COLUMN `add_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人id' AFTER `update_time` ,
|
|
|
ADD COLUMN `add_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `add_uid` ,
|
|
|
ADD COLUMN `update_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '修改人id' AFTER `add_user_name` ,
|
|
|
ADD COLUMN `update_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `update_uid`;
|
|
|
|
|
|
ALTER TABLE yh_shops.model_card
|
|
|
ADD COLUMN `model_id` INT NOT NULL DEFAULT 0 AFTER `model_name`;
|
|
|
|
|
|
ALTER TABLE yh_shops.product_size_reference ADD KEY `union_key` (`product_skn`,`size_id`,`gender`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 店铺装修
|
|
|
|
|
|
--database erp_supplier
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_id` int(11) DEFAULT NULL,
|
|
|
`check_status` int(11) DEFAULT NULL COMMENT '100 暂存 200 待审核 300 审核通过 900 驳回',
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`update_time` int(11) DEFAULT NULL,
|
|
|
`status` int(11) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修';
|
|
|
|
|
|
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_comment` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) DEFAULT NULL,
|
|
|
`shops_decorator_template_id` int(11) DEFAULT NULL,
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`comment` varchar(100) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `erp_supplier`.`shops_decorator_template`;
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_template` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) NOT NULL,
|
|
|
`platform` varchar(10) NOT NULL COMMENT '平台(PC,APP)',
|
|
|
`template_type` varchar(10) DEFAULT '2' COMMENT '模板(1:基础模板,2:经典模板)',
|
|
|
`create_time` int(11) NOT NULL,
|
|
|
`update_time` int(11) NOT NULL DEFAULT '0',
|
|
|
`is_enable` enum('N','Y','') DEFAULT 'Y' COMMENT '是否启用该模板',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板';
|
|
|
|
|
|
|
|
|
CREATE TABLE `erp_supplier`.`shops_decorator_template_resource` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`shops_decorator_id` int(11) DEFAULT NULL,
|
|
|
`shops_decorator_template_id` int(11) DEFAULT NULL,
|
|
|
`resource_name` varchar(50) DEFAULT NULL,
|
|
|
`resource_data` text,
|
|
|
`create_time` int(11) DEFAULT NULL,
|
|
|
`update_time` int(11) DEFAULT NULL,
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2905 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板信息';
|
|
|
|
|
|
|
|
|
|
|
|
alter table yhb_operations.help_category add column `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、正常 2、已删除';
|
|
|
alter table yhb_operations.help_content add column `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、正常 2、已删除'; |
...
|
...
|
|