|
|
|
@ -1,15 +1,9 @@ |
|
|
|
/*==============================================================*/ |
|
|
|
/* DBMS name: MySQL 5.0 */ |
|
|
|
/* Created on: 2018-5-29 23:17:54 */ |
|
|
|
/* Created on: 2018-6-5 10:11:34 */ |
|
|
|
/*==============================================================*/ |
|
|
|
|
|
|
|
|
|
|
|
drop index Association_1_FK2 on Association_1; |
|
|
|
|
|
|
|
drop index Association_1_FK on Association_1; |
|
|
|
|
|
|
|
drop table if exists Association_1; |
|
|
|
|
|
|
|
drop index 流水与推荐记录的关系_FK on account_flow; |
|
|
|
|
|
|
|
drop index 账户与账户流水关系_FK on account_flow; |
|
|
|
@ -142,8 +136,6 @@ drop index 角色与权限关系_FK on role_permission; |
|
|
|
|
|
|
|
drop table if exists role_permission; |
|
|
|
|
|
|
|
drop index belongs_auth_area_FK on service_card; |
|
|
|
|
|
|
|
drop index 拥有_FK on service_card; |
|
|
|
|
|
|
|
drop index 订单与服务卡关系_FK on service_card; |
|
|
|
@ -212,38 +204,13 @@ drop table if exists vorder; |
|
|
|
|
|
|
|
drop table if exists wechat_tmplmsg; |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Table: Association_1 */ |
|
|
|
/*==============================================================*/ |
|
|
|
create table Association_1 |
|
|
|
( |
|
|
|
merchant_id bigint not null, |
|
|
|
code_region_id int not null comment '主键ID' |
|
|
|
); |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: Association_1_FK */ |
|
|
|
/*==============================================================*/ |
|
|
|
create index Association_1_FK on Association_1 |
|
|
|
( |
|
|
|
merchant_id |
|
|
|
); |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: Association_1_FK2 */ |
|
|
|
/*==============================================================*/ |
|
|
|
create index Association_1_FK2 on Association_1 |
|
|
|
( |
|
|
|
code_region_id |
|
|
|
); |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Table: account_flow */ |
|
|
|
/*==============================================================*/ |
|
|
|
create table account_flow |
|
|
|
( |
|
|
|
id bigint not null comment '主键ID', |
|
|
|
user_recommend_id bigint, |
|
|
|
user_recommend_id bigint comment '推荐表_id', |
|
|
|
account_info_id bigint not null comment '主键ID', |
|
|
|
flow_no varchar(32) not null comment '流水编号', |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
@ -255,7 +222,8 @@ create table account_flow |
|
|
|
after_amount bigint default 0 comment '流水执行后额度', |
|
|
|
execute_time bigint default 0 comment '执行时间', |
|
|
|
remark varchar(64) comment '备注', |
|
|
|
merchant_no varchar(32) comment '商家编号' |
|
|
|
merchant_no varchar(32) comment '商家编号', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table account_flow comment '账户流水表'; |
|
|
|
@ -282,7 +250,7 @@ create index 流水与推荐记录的关系_FK on account_flow |
|
|
|
create table account_info |
|
|
|
( |
|
|
|
id bigint unsigned not null comment '主键ID', |
|
|
|
user_id2 bigint not null, |
|
|
|
user_id2 bigint not null comment '用户基础_id', |
|
|
|
user_id varchar(32) not null comment '用户ID', |
|
|
|
account_name varchar(8) comment '账号名称', |
|
|
|
type tinyint default 0 comment '账号类型 0 普通账号 1 系统账号', |
|
|
|
@ -290,7 +258,8 @@ create table account_info |
|
|
|
current_amount bigint unsigned default 0 comment '可提现额度', |
|
|
|
freeze_amount bigint unsigned default 0 comment '冻结额度', |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
status tinyint default 0 comment '状态 0 可用 1 不可用' |
|
|
|
status tinyint default 0 comment '状态 0 可用 1 不可用', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table account_info comment '用户账号'; |
|
|
|
@ -308,8 +277,8 @@ create index 用户与用户帐号关系_FK on account_info |
|
|
|
/*==============================================================*/ |
|
|
|
create table address |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
consumer_info_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
consumer_info_id bigint comment '消费者_id', |
|
|
|
"label" national varchar(16) comment '地址标签', |
|
|
|
province_id int default 0 comment '省id', |
|
|
|
city_id int default 0 comment '城市id', |
|
|
|
@ -327,9 +296,10 @@ create table address |
|
|
|
updated_by national varchar(20) comment '更新者', |
|
|
|
is_default tinyint unsigned default 0 comment '默认地址 0否 1是', |
|
|
|
status tinyint unsigned not null default 0 comment '状态', |
|
|
|
square tinyint default 0, |
|
|
|
location_address national varchar(255), |
|
|
|
remark national varchar(255) |
|
|
|
square tinyint default 0 comment 'square', |
|
|
|
location_address national varchar(255) comment 'location_address', |
|
|
|
remark national varchar(255) comment 'remark', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table address comment '地址'; |
|
|
|
@ -347,8 +317,8 @@ create index 客户与地址关系_FK on address |
|
|
|
/*==============================================================*/ |
|
|
|
create table admin_info |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
user_id2 bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
user_id2 bigint comment '用户基础_id', |
|
|
|
merchant_no national varchar(32) comment '商户编号', |
|
|
|
user_id national varchar(32) comment '用户id', |
|
|
|
nick_name national varchar(20) comment '昵称', |
|
|
|
@ -360,7 +330,8 @@ create table admin_info |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
updated_by national varchar(20) comment '更新者', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
init_pwd national varchar(50) comment '初始密码' |
|
|
|
init_pwd national varchar(50) comment '初始密码', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table admin_info comment '员工'; |
|
|
|
@ -379,8 +350,8 @@ create index 用户与管理员帐号关系_FK on admin_info |
|
|
|
create table book |
|
|
|
( |
|
|
|
id bigint unsigned not null comment '预约时间', |
|
|
|
merchant_id bigint not null, |
|
|
|
cleaner_pool_id bigint, |
|
|
|
merchant_id bigint not null comment '商户_id', |
|
|
|
cleaner_pool_id bigint comment '保洁师池_id', |
|
|
|
merchant_book_no national varchar(32) comment '商户预约记录统计编号', |
|
|
|
type tinyint default 0 comment '类型 0合计 1细分区县', |
|
|
|
province_id int default 0 comment '服务城市', |
|
|
|
@ -396,7 +367,8 @@ create table book |
|
|
|
created_at bigint unsigned default 0 comment '创建时间', |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table book comment '预约日历'; |
|
|
|
@ -422,8 +394,8 @@ create index 商户与商户预约池记录_FK on book |
|
|
|
/*==============================================================*/ |
|
|
|
create table book_detail |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
cleaner_info_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
cleaner_info_id bigint comment '保洁师_id', |
|
|
|
service_card_id bigint not null comment '主键ID', |
|
|
|
merchant_no national varchar(32) not null comment '商家编号', |
|
|
|
card_type tinyint default 0 comment '服务卡类型', |
|
|
|
@ -450,7 +422,8 @@ create table book_detail |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
cleaner_comment national varchar(255) comment '保洁师评价', |
|
|
|
has_check tinyint default 0 comment '保洁师是否已查看 0否1是', |
|
|
|
has_send tinyint default 0 comment '是否已发送短信 只有待服务的状态下才体现 0否 1是' |
|
|
|
has_send tinyint default 0 comment '是否已发送短信 只有待服务的状态下才体现 0否 1是', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table book_detail comment '预约明细'; |
|
|
|
@ -476,8 +449,8 @@ create index 保洁师与客户预约订单关系_FK on book_detail |
|
|
|
/*==============================================================*/ |
|
|
|
create table book_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
book_detail_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
book_detail_id bigint comment '预约明细_id', |
|
|
|
merchant_no national varchar(32) not null default '' comment '商家编号', |
|
|
|
user_id national varchar(32) comment '用户id', |
|
|
|
client_type tinyint default 0 comment '用户类型', |
|
|
|
@ -487,7 +460,8 @@ create table book_log |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table book_log comment '预约日志'; |
|
|
|
@ -505,18 +479,21 @@ create index 预约订单与预约订单操作日志_FK on book_log |
|
|
|
/*==============================================================*/ |
|
|
|
create table cleaner_district |
|
|
|
( |
|
|
|
id int not null auto_increment, |
|
|
|
merchant_id bigint not null, |
|
|
|
merchant_no varchar(32), |
|
|
|
province_id int, |
|
|
|
province_name varchar(20), |
|
|
|
city_id int, |
|
|
|
city_name varchar(20), |
|
|
|
district_id int, |
|
|
|
district_name varchar(255), |
|
|
|
del_flag tinyint |
|
|
|
id int not null auto_increment comment 'id', |
|
|
|
merchant_id bigint not null comment 'merchant_id', |
|
|
|
merchant_no varchar(32) comment '商户编号', |
|
|
|
province_id int comment '省ID', |
|
|
|
province_name varchar(20) comment '省名称', |
|
|
|
city_id int comment '市ID', |
|
|
|
city_name varchar(20) comment '市名称', |
|
|
|
district_id int comment '区/县ID', |
|
|
|
district_name varchar(255) comment '区/县名称', |
|
|
|
del_flag tinyint comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table cleaner_district comment '保洁师归属区/县'; |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: merchant_has_cleaner_ditstrict_FK */ |
|
|
|
/*==============================================================*/ |
|
|
|
@ -530,10 +507,10 @@ create index merchant_has_cleaner_ditstrict_FK on cleaner_district |
|
|
|
/*==============================================================*/ |
|
|
|
create table cleaner_info |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
merchant_id bigint, |
|
|
|
user_id2 bigint, |
|
|
|
cleaner_district_id int not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
merchant_id bigint comment '商户_id', |
|
|
|
user_id2 bigint comment '用户基础_id', |
|
|
|
cleaner_district_id int not null comment 'cleaner_district_id', |
|
|
|
user_id national varchar(32) comment '用户id', |
|
|
|
type tinyint default 0 comment '类型', |
|
|
|
status tinyint default 0 comment '状态', |
|
|
|
@ -559,7 +536,8 @@ create table cleaner_info |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
update_by national varchar(20) comment '更新者', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
token national varchar(32) comment '登录标识' |
|
|
|
token national varchar(32) comment '登录标识', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table cleaner_info comment '保洁师'; |
|
|
|
@ -593,8 +571,8 @@ create index link_cleaner_district_FK on cleaner_info |
|
|
|
/*==============================================================*/ |
|
|
|
create table cleaner_pool |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
cleaner_info_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
cleaner_info_id bigint comment '保洁师_id', |
|
|
|
cleaner_pool_no national varchar(32) comment '保洁师池编号', |
|
|
|
merchant_no national varchar(32) comment '所属商户', |
|
|
|
book_no national varchar(32) comment '安排的预约记录', |
|
|
|
@ -606,7 +584,8 @@ create table cleaner_pool |
|
|
|
created_by national varchar(32) comment '创建者', |
|
|
|
updated_at bigint unsigned default 0 comment '更新时间', |
|
|
|
updated_by national varchar(32) comment '更新者', |
|
|
|
status tinyint unsigned default 0 comment '状态' |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table cleaner_pool comment '保洁师池'; |
|
|
|
@ -624,8 +603,8 @@ create index 保洁师与保洁师排班记录_FK on cleaner_pool |
|
|
|
/*==============================================================*/ |
|
|
|
create table cleaner_pool_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
cleaner_pool_id bigint not null, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
cleaner_pool_id bigint not null comment '保洁师池_id', |
|
|
|
time_type tinyint not null default 0 comment '时间类型', |
|
|
|
cleaner_id varchar(32) not null comment '保洁人员用户id', |
|
|
|
book_time date not null comment '预约日期', |
|
|
|
@ -637,7 +616,8 @@ create table cleaner_pool_log |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table cleaner_pool_log comment '保洁师池操作日志'; |
|
|
|
@ -660,7 +640,8 @@ create table code_region |
|
|
|
name varchar(32) not null comment '名称', |
|
|
|
grade tinyint not null comment '行政级别', |
|
|
|
is_last tinyint not null comment '是否最后一级,0否 1是', |
|
|
|
path varchar(128) not null comment '地址详情' |
|
|
|
path varchar(128) not null comment '地址详情', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table code_region comment '省、市、区、街道数据'; |
|
|
|
@ -671,12 +652,13 @@ alter table code_region comment '省、市、区、街道数据'; |
|
|
|
create table consumer_evaluated |
|
|
|
( |
|
|
|
id bigint not null comment '自增主键', |
|
|
|
consumer_info_id bigint not null, |
|
|
|
consumer_info_id bigint not null comment '消费者_id', |
|
|
|
merchant_no national varchar(32) comment '评价者所属商户', |
|
|
|
opt_user_id national varchar(32) not null comment '评价者', |
|
|
|
grade national char(50) not null comment '评级 A-B-C-D', |
|
|
|
evaluate_content national varchar(255) comment '评价内容', |
|
|
|
created_at bigint default 0 comment '评价时间' |
|
|
|
created_at bigint default 0 comment '评价时间', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table consumer_evaluated comment '销售对客户评价'; |
|
|
|
@ -694,8 +676,8 @@ create index 客户与客户评价关系_FK on consumer_evaluated |
|
|
|
/*==============================================================*/ |
|
|
|
create table consumer_info |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
user_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
user_id bigint comment '用户基础_id', |
|
|
|
nick_name varchar(255) comment '昵称', |
|
|
|
mobile national varchar(20) comment '手机号', |
|
|
|
head_url national varchar(255) comment '头像', |
|
|
|
@ -707,7 +689,8 @@ create table consumer_info |
|
|
|
created_by national varchar(32) comment '创建者', |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
updated_by national varchar(32) comment '更新者', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table consumer_info comment '消费者'; |
|
|
|
@ -725,8 +708,8 @@ create index 用户与客户关系_FK on consumer_info |
|
|
|
/*==============================================================*/ |
|
|
|
create table coupon |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
consumer_info_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
consumer_info_id bigint comment '消费者_id', |
|
|
|
coupon_batch_id int(20) comment '主键', |
|
|
|
merchant_no national varchar(32) not null default '' comment '商家编号', |
|
|
|
batch_name national varchar(128) comment '批次名,商城展示', |
|
|
|
@ -747,7 +730,8 @@ create table coupon |
|
|
|
invalid_at bigint default 0 comment '过期时间', |
|
|
|
goods_no national varchar(256) comment '适用商品id', |
|
|
|
goods_type tinyint default 0 comment '商品类型限制 0为不限制', |
|
|
|
source_type tinyint default 0 comment '来源类型' |
|
|
|
source_type tinyint default 0 comment '来源类型', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table coupon comment '优惠券'; |
|
|
|
@ -795,7 +779,8 @@ create table coupon_batch |
|
|
|
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为不限制' |
|
|
|
goods_type tinyint default 0 comment '商品类型限制 0为不限制', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table coupon_batch comment '优惠券批次'; |
|
|
|
@ -805,8 +790,8 @@ alter table coupon_batch comment '优惠券批次'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table coupon_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
coupon_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
coupon_id bigint comment '优惠券_id', |
|
|
|
coupon_batch_id int(20) not null comment '主键', |
|
|
|
merchant_no national varchar(32) not null default '' comment '商户编号', |
|
|
|
order_no national varchar(32) comment '订单编号', |
|
|
|
@ -818,7 +803,8 @@ create table coupon_log |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
client_ip national varchar(50) default '' comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table coupon_log comment '优惠券日志'; |
|
|
|
@ -844,15 +830,16 @@ create index 优惠券信息操作日志_FK on coupon_log |
|
|
|
/*==============================================================*/ |
|
|
|
create table distribution_config |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
merchant_id bigint, |
|
|
|
id bigint not null comment 'id', |
|
|
|
merchant_id bigint comment '商户_id', |
|
|
|
merchant_no national varchar(32) comment '商家编号', |
|
|
|
updated_by national varchar(32) comment '操作用户id', |
|
|
|
rate int default 10 comment '抽成比例', |
|
|
|
coupon_batch_no national varchar(32) default '0' comment '券码', |
|
|
|
commission int default 50000 comment '佣金', |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
update_time bigint default 0 comment '修改时间' |
|
|
|
update_time bigint default 0 comment '修改时间', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table distribution_config comment '分销配置'; |
|
|
|
@ -870,8 +857,8 @@ create index 商户与商户分销配置关系_FK on distribution_config |
|
|
|
/*==============================================================*/ |
|
|
|
create table enchashment_record |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
user_id bigint not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
user_id bigint not null comment '用户基础_id', |
|
|
|
enchashment_no national varchar(32) not null comment '提现记录编号', |
|
|
|
trans_amount bigint default 0 comment '提现金额', |
|
|
|
bank_name national varchar(20) default '0' comment '开户银行', |
|
|
|
@ -882,7 +869,8 @@ create table enchashment_record |
|
|
|
remark national varchar(50) default '0' comment '描述信息', |
|
|
|
del_flag tinyint default 0 comment '删除标志 0正常 1删除', |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
update_by national varchar(32) default '0' comment '更新人' |
|
|
|
update_by national varchar(32) default '0' comment '更新人', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table enchashment_record comment '提现记录表'; |
|
|
|
@ -900,8 +888,8 @@ create index 用户与提现记录关系_FK on enchashment_record |
|
|
|
/*==============================================================*/ |
|
|
|
create table merchant |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
user_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
user_id bigint comment '用户基础_id', |
|
|
|
merchant_no national varchar(32) comment '商家编号', |
|
|
|
name national varchar(20) comment '名称', |
|
|
|
type tinyint default 0 comment '类型', |
|
|
|
@ -924,7 +912,8 @@ create table merchant |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
updated_by national varchar(32) comment '更新者', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table merchant comment '商户'; |
|
|
|
@ -942,24 +931,27 @@ create index 商户与用户关系_FK on merchant |
|
|
|
/*==============================================================*/ |
|
|
|
create table merchant_auth_area |
|
|
|
( |
|
|
|
id int not null auto_increment, |
|
|
|
merchant_id bigint not null, |
|
|
|
merchant_no varchar(32), |
|
|
|
province_id int, |
|
|
|
province_name varchar(20), |
|
|
|
city_id int, |
|
|
|
city_name varchar(20), |
|
|
|
district_id int, |
|
|
|
district_name varchar(255), |
|
|
|
id int not null auto_increment comment 'id', |
|
|
|
merchant_id bigint not null comment 'merchant_id', |
|
|
|
merchant_no varchar(32) comment '商户编号', |
|
|
|
province_id int comment '省ID', |
|
|
|
province_name varchar(20) comment '省名称', |
|
|
|
city_id int comment '市ID', |
|
|
|
city_name varchar(20) comment '市名称', |
|
|
|
district_id int comment '区/县ID', |
|
|
|
district_name varchar(255) comment '区/县名称', |
|
|
|
is_open tinyint comment '是否开放:0-不开放,1-开放', |
|
|
|
is_auth tinyint comment '是否授权:0-未授权,1-已授权', |
|
|
|
created_at bigint, |
|
|
|
created_by varchar(32), |
|
|
|
updated_at bigint, |
|
|
|
updated_by varchar(32), |
|
|
|
del_flag tinyint |
|
|
|
created_at bigint comment '创建时间', |
|
|
|
created_by varchar(32) comment '创建人', |
|
|
|
updated_at bigint comment '更新时间', |
|
|
|
updated_by varchar(32) comment '更新人', |
|
|
|
del_flag tinyint comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table merchant_auth_area comment '商户授权区域'; |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: 商户开放区域_FK */ |
|
|
|
/*==============================================================*/ |
|
|
|
@ -973,14 +965,15 @@ create index 商户开放区域_FK on merchant_auth_area |
|
|
|
/*==============================================================*/ |
|
|
|
create table merchant_log |
|
|
|
( |
|
|
|
id int(10) unsigned not null auto_increment, |
|
|
|
merchant_id bigint, |
|
|
|
id int(10) unsigned not null auto_increment comment 'id', |
|
|
|
merchant_id bigint comment '商户_id', |
|
|
|
created_at bigint default 0 comment '创建时间', |
|
|
|
created_by national varchar(32) comment '创建者', |
|
|
|
status tinyint default 0 comment '状态', |
|
|
|
opt_type int default 0 comment '操作类型', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table merchant_log comment '商户日志'; |
|
|
|
@ -998,8 +991,8 @@ create index 商户与商户操作日志_FK on merchant_log |
|
|
|
/*==============================================================*/ |
|
|
|
create table merchant_mall_img |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
merchant_id bigint not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
merchant_id bigint not null comment '商户_id', |
|
|
|
type tinyint not null default 0 comment '类型 0banner 1广告图', |
|
|
|
sequence_number tinyint not null default 0 comment '排序序号', |
|
|
|
img_url national varchar(255) not null comment '图片地址', |
|
|
|
@ -1009,7 +1002,8 @@ create table merchant_mall_img |
|
|
|
created_at bigint default 0 comment '创建时间', |
|
|
|
created_by national varchar(32) comment '创建人', |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
updated_by national varchar(32) comment '更新人' |
|
|
|
updated_by national varchar(32) comment '更新人', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table merchant_mall_img comment '商户对应的商城banner、广告图配置'; |
|
|
|
@ -1027,8 +1021,8 @@ create index 商户与商户商城图片设置表_FK on merchant_mall_img |
|
|
|
/*==============================================================*/ |
|
|
|
create table order_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
vorder_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
vorder_id bigint comment '虚拟订单_id', |
|
|
|
created_at bigint default 0 comment '创建时间', |
|
|
|
created_by national varchar(32) comment '创建者', |
|
|
|
status tinyint default 0 comment '状态', |
|
|
|
@ -1037,7 +1031,8 @@ create table order_log |
|
|
|
is_finished national char(1) default N comment '是否完成', |
|
|
|
step int unsigned default 0 comment '第几步', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table order_log comment '订单日志'; |
|
|
|
@ -1059,7 +1054,8 @@ create table permission_info |
|
|
|
permission_name national varchar(32) comment '权限名称', |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
remark national varchar(64) comment '备注', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table permission_info comment '权限'; |
|
|
|
@ -1070,8 +1066,8 @@ alter table permission_info comment '权限'; |
|
|
|
create table refund_process |
|
|
|
( |
|
|
|
id bigint not null comment '主键', |
|
|
|
trans_id bigint not null, |
|
|
|
vorder_id bigint not null, |
|
|
|
trans_id bigint not null comment '交易流水_id', |
|
|
|
vorder_id bigint not null comment '虚拟订单_id', |
|
|
|
refund_no national varchar(32) not null comment '退款编号', |
|
|
|
card_no national varchar(32) not null comment '服务卡号', |
|
|
|
merchant_no national varchar(32) not null comment '商户号', |
|
|
|
@ -1088,7 +1084,8 @@ create table refund_process |
|
|
|
created_at bigint default 0 comment '创建时间', |
|
|
|
created_by national varchar(32) comment '创建人', |
|
|
|
updated_by national varchar(32) comment '更新人', |
|
|
|
updated_at bigint default 0 comment '更新时间' |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table refund_process comment '用户退款记录'; |
|
|
|
@ -1114,7 +1111,7 @@ create index 交易流水对退款记录_FK on refund_process |
|
|
|
/*==============================================================*/ |
|
|
|
create table refund_process_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
refund_process_id bigint not null comment '主键', |
|
|
|
order_no national varchar(32) comment '订单号', |
|
|
|
created_at bigint default 0 comment '创建时间', |
|
|
|
@ -1124,7 +1121,8 @@ create table refund_process_log |
|
|
|
refund_price bigint default 0 comment '退款金额', |
|
|
|
review_comment national text comment '审核内容', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table refund_process_log comment '退款流程日志记录'; |
|
|
|
@ -1142,10 +1140,13 @@ create index 退款记录与退款操作日志_FK on refund_process_log |
|
|
|
/*==============================================================*/ |
|
|
|
create table rel_cleaner_district_auth_area |
|
|
|
( |
|
|
|
merchant_auth_area_id int not null, |
|
|
|
cleaner_district_id int not null |
|
|
|
merchant_auth_area_id int not null comment 'merchant_auth_area_id', |
|
|
|
cleaner_district_id int not null comment 'cleaner_district_id', |
|
|
|
primary key (merchant_auth_area_id, cleaner_district_id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table rel_cleaner_district_auth_area comment '服务区域配置关系'; |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: merchant_auth_area_FK */ |
|
|
|
/*==============================================================*/ |
|
|
|
@ -1171,7 +1172,8 @@ create table role_info |
|
|
|
role_name national varchar(100) comment '角色名', |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
remark national varchar(64) comment '备注', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table role_info comment '角色'; |
|
|
|
@ -1187,7 +1189,8 @@ create table role_permission |
|
|
|
role_name national varchar(100) comment '角色名', |
|
|
|
permission_id bigint default 0 comment '权限ID', |
|
|
|
permission_name national varchar(32) comment '权限名', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table role_permission comment '角色与权限'; |
|
|
|
@ -1214,12 +1217,11 @@ create index 权限与角色关系_FK on role_permission |
|
|
|
create table service_card |
|
|
|
( |
|
|
|
id bigint not null comment '主键ID', |
|
|
|
merchant_auth_area_id int not null, |
|
|
|
vorder_id bigint not null, |
|
|
|
consumer_info_id bigint not null, |
|
|
|
vorder_id bigint not null comment '虚拟订单_id', |
|
|
|
consumer_info_id bigint not null comment '消费者_id', |
|
|
|
user_id national varchar(32) not null comment '用户id', |
|
|
|
merchant_no national varchar(32) not null comment '商户编号', |
|
|
|
card_no varchar(32), |
|
|
|
card_no varchar(32) comment 'card_no', |
|
|
|
goods_no national varchar(32) not null comment '对应的商品编号', |
|
|
|
card_name national varchar(32) not null comment '服务卡名称', |
|
|
|
show_img national varchar(255) not null comment '服务卡展示图片', |
|
|
|
@ -1246,7 +1248,8 @@ create table service_card |
|
|
|
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 '房屋面积' |
|
|
|
square int default 0 comment '房屋面积', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table service_card comment '服务卡'; |
|
|
|
@ -1267,14 +1270,6 @@ create index 拥有_FK on service_card |
|
|
|
consumer_info_id |
|
|
|
); |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Index: belongs_auth_area_FK */ |
|
|
|
/*==============================================================*/ |
|
|
|
create index belongs_auth_area_FK on service_card |
|
|
|
( |
|
|
|
merchant_auth_area_id |
|
|
|
); |
|
|
|
|
|
|
|
/*==============================================================*/ |
|
|
|
/* Table: sms_template */ |
|
|
|
/*==============================================================*/ |
|
|
|
@ -1289,7 +1284,8 @@ create table sms_template |
|
|
|
tmpl_params national text comment '短信模板参数', |
|
|
|
tmpl_status tinyint default 0 comment '模版状态(EnumWechatTmplStatus)', |
|
|
|
create_at bigint default 0 comment '创建时间', |
|
|
|
update_at bigint default 0 comment '更新时间' |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table sms_template comment '短信模版'; |
|
|
|
@ -1299,14 +1295,15 @@ alter table sms_template comment '短信模版'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table system_config |
|
|
|
( |
|
|
|
id int(20) not null auto_increment, |
|
|
|
id int(20) not null auto_increment comment 'id', |
|
|
|
title national varchar(32) comment '标题', |
|
|
|
type tinyint default 0 comment '类型', |
|
|
|
status tinyint default 0 comment '状态', |
|
|
|
created_at bigint default 0 comment '更新时间', |
|
|
|
updated_at bigint default 0 comment '更新时间', |
|
|
|
config_key national varchar(64) comment '配置key', |
|
|
|
config_value national text comment '配置value' |
|
|
|
config_value national text comment '配置value', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table system_config comment '系统配置'; |
|
|
|
@ -1316,8 +1313,8 @@ alter table system_config comment '系统配置'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table trans |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
vorder_id bigint, |
|
|
|
id bigint not null comment 'id', |
|
|
|
vorder_id bigint comment '虚拟订单_id', |
|
|
|
merchant_no national varchar(32) comment '商家编号', |
|
|
|
trans_no national varchar(32) comment '交易号', |
|
|
|
payer_user_id national varchar(32) comment '付款人userID', |
|
|
|
@ -1340,7 +1337,8 @@ create table trans |
|
|
|
qr_code national varchar(256) comment '扫码支付链接,用于生成二维码', |
|
|
|
qr_url national varchar(512) comment '通过第三方api生成的支付二维码', |
|
|
|
extend_parameter national varchar(1024) comment '扩展信息,用于存储预生成数据,失效前重复调用', |
|
|
|
remark varchar(256) comment '备注内容' |
|
|
|
remark varchar(256) comment '备注内容', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table trans comment '交易流水'; |
|
|
|
@ -1358,7 +1356,7 @@ create index 订单与交易流水_FK on trans |
|
|
|
/*==============================================================*/ |
|
|
|
create table user |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
user_id national varchar(32) comment '用户id', |
|
|
|
user_name national varchar(100) comment '登录用户名', |
|
|
|
nick_name varchar(255) comment '昵称', |
|
|
|
@ -1369,7 +1367,8 @@ create table user |
|
|
|
status tinyint default 0 comment '状态', |
|
|
|
create_at bigint default 0 comment '创建时间', |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user comment '用户基础'; |
|
|
|
@ -1379,13 +1378,14 @@ alter table user comment '用户基础'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table user_location |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
user_id bigint not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
user_id bigint not null comment '用户基础_id', |
|
|
|
client_ip national varchar(50) comment 'ip', |
|
|
|
client_type tinyint default 0 comment '客户端', |
|
|
|
created_at bigint default 0 comment '上报时间', |
|
|
|
lng decimal(10,6) default 0.000000 comment '纬度', |
|
|
|
lat decimal(10,6) default 0.000000 comment '经度' |
|
|
|
lat decimal(10,6) default 0.000000 comment '经度', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user_location comment '用户上报定位信息(目前只有保洁师端有上报)'; |
|
|
|
@ -1403,8 +1403,8 @@ create index 用户与用户定位关系_FK on user_location |
|
|
|
/*==============================================================*/ |
|
|
|
create table user_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
user_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
user_id bigint comment '用户基础_id', |
|
|
|
client_type tinyint default 0 comment '类型', |
|
|
|
opt_type int default 0 comment '操作类型', |
|
|
|
created_at bigint unsigned default 0 comment '创建时间', |
|
|
|
@ -1412,7 +1412,8 @@ create table user_log |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user_log comment '用户日志'; |
|
|
|
@ -1431,12 +1432,13 @@ create index 用户生成操作日志_FK on user_log |
|
|
|
create table user_other_oauth |
|
|
|
( |
|
|
|
id bigint not null comment '主键', |
|
|
|
user_id bigint not null, |
|
|
|
user_id bigint not null comment '用户基础_id', |
|
|
|
oauth_key national varchar(32) not null comment '授权类型key如--wechat_app_open_id', |
|
|
|
oauth_value national varchar(64) not null comment '第三方id', |
|
|
|
status tinyint default 0 comment '当前记录的状态', |
|
|
|
create_at bigint not null default 0 comment '创建时间', |
|
|
|
update_at bigint default 0 comment '更新时间' |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user_other_oauth comment '用户第三方授权信息'; |
|
|
|
@ -1454,9 +1456,9 @@ create index 用户与第三方授权关系_FK on user_other_oauth |
|
|
|
/*==============================================================*/ |
|
|
|
create table user_recommend |
|
|
|
( |
|
|
|
id bigint not null, |
|
|
|
merchant_id bigint, |
|
|
|
user_id bigint not null, |
|
|
|
id bigint not null comment 'id', |
|
|
|
merchant_id bigint comment '商户_id', |
|
|
|
user_id bigint not null comment '用户基础_id', |
|
|
|
recommend_no national varchar(32) not null comment '推荐编号', |
|
|
|
order_no national varchar(32) comment '订单编号', |
|
|
|
source_nick_name national varchar(32) comment '推荐人名称', |
|
|
|
@ -1470,7 +1472,8 @@ create table user_recommend |
|
|
|
remark national varchar(50) comment '描述', |
|
|
|
create_at bigint default 0 comment '创建时间', |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
update_by national varchar(32) comment '更新人' |
|
|
|
update_by national varchar(32) comment '更新人', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user_recommend comment '推荐表'; |
|
|
|
@ -1496,7 +1499,7 @@ create index 商户与用户推荐关系_FK on user_recommend |
|
|
|
/*==============================================================*/ |
|
|
|
create table user_role |
|
|
|
( |
|
|
|
admin_info_id bigint not null, |
|
|
|
admin_info_id bigint not null comment '员工_id', |
|
|
|
id bigint not null comment '主键id', |
|
|
|
role_info_id int(20) comment '角色ID', |
|
|
|
nick_name national varchar(20) comment '用户昵称', |
|
|
|
@ -1504,7 +1507,8 @@ create table user_role |
|
|
|
create_time bigint default 0 comment '创建时间', |
|
|
|
open_time bigint default 0 comment '开通时间', |
|
|
|
close_time bigint default 0 comment '关闭时间', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (admin_info_id, id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table user_role comment '用户角色'; |
|
|
|
@ -1530,13 +1534,14 @@ create index 角色与用户关系_FK on user_role |
|
|
|
/*==============================================================*/ |
|
|
|
create table verify_code |
|
|
|
( |
|
|
|
id int(20) not null auto_increment, |
|
|
|
id int(20) not null auto_increment comment 'id', |
|
|
|
type tinyint default 0 comment '类型', |
|
|
|
mobile_number national varchar(16) comment '手机号码', |
|
|
|
verify_code national varchar(8) comment '验证码', |
|
|
|
send_at bigint default 0 comment '发送时间', |
|
|
|
invalid_at bigint default 0 comment '失效时间', |
|
|
|
client_ip national varchar(20) comment 'ip地址' |
|
|
|
client_ip national varchar(20) comment 'ip地址', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table verify_code comment '短信验证码'; |
|
|
|
@ -1546,9 +1551,9 @@ alter table verify_code comment '短信验证码'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table vgoods |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
merchant_id bigint, |
|
|
|
vgoods_template_id int(20), |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
merchant_id bigint comment '商户_id', |
|
|
|
vgoods_template_id int(20) comment '虚拟商品模版_id', |
|
|
|
goods_no national varchar(32) comment '商品编号', |
|
|
|
goods_version tinyint default 0 comment '商品版本', |
|
|
|
template_version tinyint default 0 comment '商品模板版本', |
|
|
|
@ -1585,7 +1590,8 @@ create table vgoods |
|
|
|
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 '排序' |
|
|
|
sequence_num int default 0 comment '排序', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table vgoods comment '虚拟商品'; |
|
|
|
@ -1611,8 +1617,8 @@ create index 商品与商品模板关系_FK on vgoods |
|
|
|
/*==============================================================*/ |
|
|
|
create table vgoods_log |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
vgoods_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
vgoods_id bigint comment '虚拟商品_id', |
|
|
|
merchant_no national varchar(32) not null comment '商户编号', |
|
|
|
user_id national varchar(32) comment '用户id', |
|
|
|
client_type tinyint default 0 comment '类型', |
|
|
|
@ -1621,7 +1627,8 @@ create table vgoods_log |
|
|
|
status tinyint unsigned default 0 comment '状态', |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
client_ip national varchar(50) comment '客户端ip', |
|
|
|
remark national text comment '备注' |
|
|
|
remark national text comment '备注', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table vgoods_log comment '商品日志'; |
|
|
|
@ -1639,7 +1646,7 @@ create index 商品与商品操作日志关系_FK on vgoods_log |
|
|
|
/*==============================================================*/ |
|
|
|
create table vgoods_template |
|
|
|
( |
|
|
|
id int(20) unsigned not null auto_increment, |
|
|
|
id int(20) unsigned not null auto_increment comment 'id', |
|
|
|
template_no national varchar(32) not null comment '商品模版编号', |
|
|
|
template_version tinyint default 0 comment '商品模版版本', |
|
|
|
name national varchar(50) comment '商品名称', |
|
|
|
@ -1665,7 +1672,8 @@ create table vgoods_template |
|
|
|
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 '分销提成' |
|
|
|
sale_profit int default 0 comment '分销提成', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table vgoods_template comment '虚拟商品模版'; |
|
|
|
@ -1675,11 +1683,11 @@ alter table vgoods_template comment '虚拟商品模版'; |
|
|
|
/*==============================================================*/ |
|
|
|
create table vorder |
|
|
|
( |
|
|
|
id bigint unsigned not null, |
|
|
|
address_id bigint, |
|
|
|
coupon_id bigint not null, |
|
|
|
consumer_info_id bigint, |
|
|
|
vgoods_id bigint, |
|
|
|
id bigint unsigned not null comment 'id', |
|
|
|
address_id bigint comment '地址_id', |
|
|
|
coupon_id bigint not null comment '优惠券_id', |
|
|
|
consumer_info_id bigint comment '消费者_id', |
|
|
|
vgoods_id bigint comment '虚拟商品_id', |
|
|
|
service_card_id bigint comment '主键ID', |
|
|
|
merchant_no national varchar(32) comment '商家编号', |
|
|
|
order_no national varchar(32) comment '订单编号', |
|
|
|
@ -1708,7 +1716,8 @@ create table vorder |
|
|
|
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 '分销' |
|
|
|
sale_profit int default 0 comment '分销', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table vorder comment '虚拟订单'; |
|
|
|
@ -1768,7 +1777,8 @@ create table wechat_tmplmsg |
|
|
|
tmpl_params national text comment '模板参数', |
|
|
|
create_at bigint default 0 comment '创建时间', |
|
|
|
update_at bigint default 0 comment '更新时间', |
|
|
|
del_flag tinyint default 0 comment '删除标志' |
|
|
|
del_flag tinyint default 0 comment '删除标志', |
|
|
|
primary key (id) |
|
|
|
); |
|
|
|
|
|
|
|
alter table wechat_tmplmsg comment '微信推送消息模板'; |
|
|
|
|