add-api-distribution

This commit is contained in:
lccsw
2021-08-03 14:18:13 +08:00
parent bd84cdea8b
commit 6bdb56155d
27 changed files with 1031 additions and 176 deletions
+47
View File
@@ -50,3 +50,50 @@ create table lc_app_wxpaylog (
u_time timestamp not null default current_timestamp comment '更新时间',
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='支付回调日志';
-- ----------------------------
-- Title:用户资金账户表
-- Author:lcc
-- Table:lc_app_user_account
-- ---------------------------
drop table if exists lc_app_user_account;
create table lc_app_user_account (
id int(10) unsigned not null auto_increment comment 'id',
app_id int(10) unsigned not null comment '小程序id',
app_uid int(10) unsigned not null comment '小程序用户id',
biz_id int(11) not null default '0' comment '商家id',
type tinyint(1) not null default '1' comment '账户类型 0.系统账户, 1.用户账户, 2.商家账户',
money_total decimal(12,2) not null default '0.00' comment '资金总额',
money_freeze decimal(12,2) not null default '0.00' comment '冻结资金',
money_left decimal(12,2) not null default '0.00' comment '余额',
jsondata json default null comment '其他',
status tinyint(1) not null default '1' comment '账户状态-1销户 0冻结 1正常',
c_time int(11) not null default '0' comment '创建时间',
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户资金账户表';
-- ----------------------------
-- Title:账户资金流水表
-- Author:lcc
-- Table:lc_app_user_accountlog
-- ---------------------------
drop table if exists lc_app_user_accountlog;
create table lc_app_user_accountlog (
id int(10) unsigned not null auto_increment comment 'id',
account_id int(10) unsigned not null default '0' comment '账户id',
sid varchar(32) not null default '' comment '订单号',
trade_type tinyint(4) not null default '0' comment '交易类型 1入账 2提现 3冲正 4转账',
money_type varchar(32) not null default '' comment '金额类型',
cfrom varchar(32) not null default '' comment '金额类型',
money_in decimal(12,2) not null default '0.00' comment '收入金额',
money_out decimal(12,2) not null default '0.00' comment '支出金额',
money_left decimal(12,2) not null default '0.00' comment '当前余额',
descrip varchar(255) not null default '' comment '流水说明',
jsondata json default null comment '更多数据',
status tinyint(1) not null default '0' comment ' -1失败 0进行中 1已完成',
ck varchar(32) not null default '' comment '同一批校验码',
c_time int(11) not null default '0' comment '创建时间',
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='账户资金流水表';
+19
View File
@@ -18,6 +18,7 @@ create table lc_app_liche_users (
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='狸车小程序用户表';
alter table lc_app_liche_users add ifdist tinyint(1) unsigned not null default 0 comment '是否分销人员' after jsondata;
-- ----------------------------
@@ -44,3 +45,21 @@ create table lc_app_liche_cms (
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='狸车小程序cms';
-- ----------------------------
-- Title:狸车用户数据表
-- Author:lcc
-- Table:lc_app_liche_udata
-- ---------------------------
drop table if exists lc_app_liche_udata;
create table lc_app_liche_udata (
id int(10) unsigned not null auto_increment comment '自增id',
cf_id int(10) unsigned not null default '0' comment '来源id',
type int(10) unsigned not null default '0' comment '类型(0推广素材二维码)',
datatype char(10) not null default '0' comment '数据类型 img video',
dataurl char(200) not null default '' comment '资源地址',
jsondata json default null comment '附加字段',
c_time int(10) unsigned not null default '0' comment '创建时间',
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='狸车用户数据表';