4 changed files with 106322 additions and 4746 deletions
Split View
Diff Options
-
1041035数据库设计/1hjz.cdm
-
4651435数据库设计/v2.6.0/1hjz.cdm
-
5381935数据库设计/v2.6.0/1hjz.pdm
-
32535数据库设计/v2.6.0/1hjz_v2.6.0.sql
10410
35数据库设计/1hjz.cdm
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
46514
35数据库设计/v2.6.0/1hjz.cdm
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
53819
35数据库设计/v2.6.0/1hjz.pdm
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,325 @@ |
|||
/*==============================================================*/ |
|||
/* DBMS name: MySQL 5.0 */ |
|||
/* Created on: 2018/9/26 11:59:48 */ |
|||
/*==============================================================*/ |
|||
|
|||
|
|||
drop table if exists coupon_batch; |
|||
|
|||
drop table if exists goods_category; |
|||
|
|||
drop table if exists goods_combination; |
|||
|
|||
drop table if exists rel_vgoods_template_combination; |
|||
|
|||
drop table if exists service_card; |
|||
|
|||
drop table if exists vgoods; |
|||
|
|||
drop table if exists vgoods_template; |
|||
|
|||
drop table if exists vorder; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: coupon_batch */ |
|||
/*==============================================================*/ |
|||
create table coupon_batch |
|||
( |
|||
id int(20) unsigned not null auto_increment comment '主键', |
|||
channel_id int not null comment 'id', |
|||
merchant_no national varchar(32) comment '商户编号', |
|||
project_name national varchar(128) comment '方案名,后台展示', |
|||
batch_name national varchar(128) comment '批次名,商城展示', |
|||
coupon_batch_no national varchar(32) comment '优惠券批次编号', |
|||
batch_type tinyint default 0 comment '批次类型', |
|||
type tinyint default 0 comment '类型', |
|||
status tinyint default 0 comment '状态', |
|||
amount bigint default 0 comment '优惠额度', |
|||
full_amount bigint default 0 comment '满减券的满减额度,如满99减20的99', |
|||
discount bigint default 0 comment '折扣', |
|||
exchange_price bigint, |
|||
num int default 0 comment '数量', |
|||
received_num int default 0 comment '已领取数量', |
|||
created_at bigint default 0 comment '创建时间', |
|||
created_by national varchar(32) comment '创建者', |
|||
updated_at bigint default 0 comment '更新时间', |
|||
updated_by national varchar(32) comment '更新者', |
|||
time_type tinyint default 0 comment '时间类型', |
|||
invalid_at bigint default 0 comment '失效时间', |
|||
duration_day int default 0 comment '有效天数', |
|||
del_flag tinyint default 0 comment '删除标志', |
|||
goods_no national varchar(256) comment '适用商品id', |
|||
goods_type tinyint default 0 comment '商品类型限制 0为不限制', |
|||
use_limit tinyint comment '使用限制 0为不限制,1为限新用户', |
|||
version tinyint comment '编辑更新版本号', |
|||
primary key (id), |
|||
key AK_batch_no (coupon_batch_no) |
|||
); |
|||
|
|||
alter table coupon_batch comment '优惠券模板'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: goods_category */ |
|||
/*==============================================================*/ |
|||
create table goods_category |
|||
( |
|||
id int not null auto_increment comment 'id', |
|||
category_no varchar(32) comment '品类编号', |
|||
category_name varchar(50) comment '品类名称', |
|||
level int comment '级别:1-大品类,2-小品类', |
|||
parent_id bigint comment '归属id', |
|||
parent_no varchar(32) comment '归属编号', |
|||
created_at bigint comment '创建时间', |
|||
created_by varchar(32) comment '创建人', |
|||
updated_at bigint comment '更新时间', |
|||
updated_by varchar(32) comment '更新人', |
|||
status tinyint default 0 comment '状态:0-上架,1-下架', |
|||
del_flag tinyint default 0 comment '删除标识:0-正常,1-已删除', |
|||
primary key (id) |
|||
); |
|||
|
|||
alter table goods_category comment '商品品类'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: goods_combination */ |
|||
/*==============================================================*/ |
|||
create table goods_combination |
|||
( |
|||
id int(32) not null auto_increment, |
|||
combination_no varchar(32) comment '分组编号', |
|||
combination_name varchar(20) comment '分组名称', |
|||
status tinyint default 0 comment '状态:0-上架,1-下架', |
|||
"label" tinyint comment '角标:1-NEW,2-HOT', |
|||
is_release tinyint default 0 comment '是否发布:0-不发布,1-发布', |
|||
image varchar(255) comment '分组头图', |
|||
is_release_icon tinyint default 0 comment '是否展示icon:0-不展示,1-展示', |
|||
icon varchar(255) comment 'icon图标', |
|||
created_at bigint comment '创建时间', |
|||
created_by varchar(32) comment '创建人', |
|||
updated_at bigint comment '更新时间', |
|||
updated_by varchar(32) comment '更新人', |
|||
sort int comment '排序值', |
|||
del_flag tinyint default 0 comment '删除标识:0-正常,1-已删除', |
|||
primary key (id) |
|||
); |
|||
|
|||
alter table goods_combination comment '商品组'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: rel_vgoods_template_combination */ |
|||
/*==============================================================*/ |
|||
create table rel_vgoods_template_combination |
|||
( |
|||
combination_id int(32) not null, |
|||
template_id int(20) not null, |
|||
combination_no varchar(32) comment '品类编号', |
|||
template_no varchar(32) comment '商品模板编号', |
|||
sort int comment '排序值', |
|||
created_at bigint comment '创建时间', |
|||
created_by varchar(32) comment '创建人', |
|||
updated_at bigint comment '更新时间', |
|||
updated_by varchar(32) comment '更新人', |
|||
del_flag tinyint default 0 comment '删除标识:0-正常,1-已删除', |
|||
primary key (combination_id, template_id) |
|||
); |
|||
|
|||
alter table rel_vgoods_template_combination comment '商品模板与商品组合关系'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: service_card */ |
|||
/*==============================================================*/ |
|||
create table service_card |
|||
( |
|||
id bigint not null comment '主键ID', |
|||
vorder_id bigint not null, |
|||
consumer_info_id bigint not null, |
|||
category_id int comment 'id', |
|||
order_id bigint not null, |
|||
user_id national varchar(32) not null comment '用户id', |
|||
merchant_no national varchar(32) not null comment '商户编号', |
|||
card_no varchar(32), |
|||
goods_no national varchar(32) not null comment '对应的商品编号', |
|||
order_no varchar(32), |
|||
card_name national varchar(32) not null comment '服务卡名称', |
|||
show_img national varchar(255) not null comment '服务卡展示图片', |
|||
card_type tinyint unsigned default 0 comment '服务卡类型', |
|||
cycle_mode tinyint unsigned default 0 comment '周期模式', |
|||
cycle_freq tinyint unsigned default 0 comment '周期频率', |
|||
create_at bigint unsigned default 0 comment '创建时间', |
|||
create_by national varchar(32) comment '创建者', |
|||
update_at bigint unsigned default 0 comment '更新时间', |
|||
update_by national varchar(32) comment '更新者', |
|||
status tinyint unsigned default 0 comment '服务卡状态', |
|||
del_flag tinyint unsigned default 0 comment '删除标识 0否 1是', |
|||
active_invalid_at bigint unsigned default 0 comment '激活有效期限', |
|||
use_invalid_at bigint unsigned default 0 comment '使用有效期限', |
|||
active_at bigint unsigned default 0 comment '激活时间', |
|||
total_service_cnt int unsigned not null default 0 comment '总服务次数', |
|||
booked_cnt int unsigned default 0 comment '已预约次数', |
|||
serviced_cnt int unsigned default 0 comment '已服务次数', |
|||
region_id int unsigned default 0 comment '地区id', |
|||
full_address national varchar(128) comment '全地址', |
|||
address_telephone national varchar(16) comment '联系电话', |
|||
linkman national varchar(32) comment '联系人', |
|||
lat decimal(10,6) default 0.000000 comment '百度纬度', |
|||
lng decimal(10,6) default 0.000000 comment '百度经度', |
|||
remark national varchar(255) not null comment '服务备注', |
|||
address_id bigint default 0 comment '地址id', |
|||
square int default 0 comment '房屋面积', |
|||
amap_lng decimal(10,6) default 0.000000 comment '高德经度', |
|||
amap_lat decimal(10,6) default 0.000000 comment '高德纬度', |
|||
big_category_no varchar(32) comment '大品类编号', |
|||
small_category_no varchar(32) comment '小品类编号', |
|||
primary key (id) |
|||
); |
|||
|
|||
alter table service_card comment '服务卡'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: vgoods */ |
|||
/*==============================================================*/ |
|||
create table vgoods |
|||
( |
|||
id bigint unsigned not null, |
|||
coupon_batch_id int(20) comment '主键', |
|||
merchant_id bigint, |
|||
vgoods_template_id int(20), |
|||
category_id int comment 'id', |
|||
goods_no national varchar(32) comment '商品编号', |
|||
goods_version tinyint default 0 comment '商品版本', |
|||
template_version tinyint default 0 comment '商品模板版本', |
|||
name national varchar(50) comment '商品名称', |
|||
type tinyint default 0 comment '商品类型', |
|||
is_show_countdown national char(1) default N comment '是否显示倒计时,Y:是,N:否', |
|||
original_price bigint default 0 comment '原价', |
|||
price bigint default 0 comment '现价', |
|||
service_count int default 0 comment '服务次数', |
|||
cycle_mode tinyint default 0 comment '周期模式', |
|||
cycle_freq tinyint default 0 comment '周期频率', |
|||
active_period int default 0 comment '激活天数', |
|||
use_period int default 0 comment '使用天数', |
|||
created_at bigint unsigned default 0 comment '创建日期', |
|||
created_by national varchar(32) comment '创建者', |
|||
updated_at bigint unsigned default 0 comment '更新时间', |
|||
updated_by national varchar(32) comment '更新者', |
|||
started_at bigint default 0 comment '开售时间', |
|||
ended_at bigint default 0 comment '结束时间', |
|||
total_num int default 0 comment '商品总数量', |
|||
sold_num int default 0 comment '已售数量', |
|||
focused_num int default 0 comment '被关注人数', |
|||
short_desc national varchar(100) comment '简短描述', |
|||
show_img national varchar(255) comment '展示图片', |
|||
service_desc national text comment '服务描述', |
|||
banner_imgs national varchar(1000) comment 'banner图片', |
|||
evaluate_num int default 0 comment '评价个数', |
|||
evaluate_score bigint default 0 comment '评价分数', |
|||
evaluate_rate double default 0.00 comment '好评率', |
|||
status tinyint unsigned default 0 comment '商品状态', |
|||
notice national text comment '下单须知', |
|||
small_label national varchar(255) comment '小标签,以逗号相隔', |
|||
big_label national varchar(255) comment '大标签图片地址', |
|||
limit_type tinyint default 0 comment '限购方式 0不限购 1限新 2每人单次', |
|||
del_flag tinyint default 0 comment '删除标志', |
|||
sale_profit int default 0 comment '分销提成,万分比', |
|||
sequence_num int default 0 comment '排序', |
|||
is_show_coupon tinyint comment '优惠券展示:0-不展示,1-展示', |
|||
sale_type tinyint comment '分销类型:1-实付比例,2-固定金额', |
|||
big_category_no varchar(32) comment '大品类编号', |
|||
small_category_no varchar(32) comment '小品类编号', |
|||
primary key (id) |
|||
); |
|||
|
|||
alter table vgoods comment '虚拟商品'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: vgoods_template */ |
|||
/*==============================================================*/ |
|||
create table vgoods_template |
|||
( |
|||
id int(20) unsigned not null auto_increment, |
|||
category_id int comment 'id', |
|||
template_no national varchar(32) not null comment '商品模版编号', |
|||
template_version tinyint default 0 comment '商品模版版本', |
|||
name national varchar(50) comment '商品名称', |
|||
type tinyint default 0 comment '商品类型', |
|||
original_price bigint default 0 comment '原价', |
|||
price bigint default 0 comment '现价', |
|||
service_count int default 0 comment '服务次数', |
|||
cycle_mode tinyint default 0 comment '周期模式', |
|||
cycle_freq tinyint default 0 comment '周期频率', |
|||
active_period int default 0 comment '激活天数', |
|||
use_period int default 0 comment '使用天数', |
|||
created_at bigint unsigned default 0 comment '创建日期', |
|||
created_by national varchar(32) comment '创建者', |
|||
updated_at bigint unsigned default 0 comment '更新日期', |
|||
updated_by national varchar(32) comment '更新者', |
|||
short_desc national varchar(100) comment '简短描述', |
|||
show_img national varchar(255) comment '展示图片', |
|||
service_desc national text comment '服务描述', |
|||
banner_imgs national varchar(1000) comment 'banner图片', |
|||
status tinyint unsigned default 0 comment '商品状态', |
|||
notice national text comment '下单须知', |
|||
small_label national varchar(255) comment '小标签,以逗号相隔', |
|||
big_label national varchar(255) comment '大标签图片地址', |
|||
limit_type tinyint default 0 comment '限购方式 0不限购 1限新 2每人单次', |
|||
del_flag tinyint default 0 comment '删除标志', |
|||
sale_profit int default 0 comment '分销提成', |
|||
big_category_no varchar(32) comment '大品类编号', |
|||
small_category_no varchar(32) comment '小品类编号', |
|||
primary key (id) |
|||
); |
|||
|
|||
alter table vgoods_template comment '虚拟商品模版'; |
|||
|
|||
/*==============================================================*/ |
|||
/* Table: vorder */ |
|||
/*==============================================================*/ |
|||
create table vorder |
|||
( |
|||
id bigint unsigned not null, |
|||
address_id bigint, |
|||
category_id int comment 'id', |
|||
coupon_id bigint not null, |
|||
consumer_info_id bigint, |
|||
channel_id int comment 'id', |
|||
user_recommend_id bigint, |
|||
vgoods_id bigint, |
|||
service_card_id bigint comment '主键ID', |
|||
merchant_no national varchar(32) comment '商家编号', |
|||
order_no national varchar(32) comment '订单编号', |
|||
address_full_name national varchar(100) comment '地址全称', |
|||
address_telephone national varchar(20) comment '地址电话', |
|||
region_id int default 0 comment '地区id', |
|||
linkman national varchar(32) comment '联系人', |
|||
lat decimal(10,6) default 0.000000 comment '纬度', |
|||
lng decimal(10,6) default 0.000000 comment '经度', |
|||
remark national varchar(255) comment '留言', |
|||
goods_version tinyint default 0 comment '商品版本', |
|||
goods_name national varchar(50) comment '商品名称', |
|||
goods_img_url national varchar(255) comment '商品图片地址', |
|||
goods_num int default 0 comment '商品数量', |
|||
origin_total_price bigint default 0 comment '商品总原价', |
|||
total_price bigint unsigned default 0 comment '商品现总价', |
|||
coupon_price bigint default 0 comment '优惠金额', |
|||
pay_price bigint default 0 comment '支付金额', |
|||
pay_type tinyint default 0 comment '支付类型', |
|||
pay_time bigint default 0 comment '支付时间', |
|||
order_source tinyint default 0 comment '订单来源', |
|||
status tinyint default 0 comment '订单状态', |
|||
voucher national varchar(255) comment '兑换凭证', |
|||
created_at bigint unsigned default 0 comment '创建时间', |
|||
created_by national varchar(20) comment '创建者', |
|||
updated_at bigint unsigned default 0 comment '更新时间', |
|||
updated_by national varchar(20) comment '更新者', |
|||
del_flag tinyint default 0 comment '删除标志', |
|||
sale_profit int default 0 comment '分销', |
|||
order_type tinyint comment '订单类型:10-商城销售订单,11:商城赠送订单,20-拼团订单', |
|||
sale_type tinyint comment '分销类型:1-实付比例,2-固定金额', |
|||
big_category_no varchar(32) comment '大品类编号', |
|||
small_category_no varchar(32) comment '小品类编号', |
|||
primary key (id), |
|||
key AK_order_no (order_no) |
|||
); |
|||
|
|||
alter table vorder comment '虚拟订单'; |
|||
|
|||
Write
Preview
Loading…
Cancel
Save