add-liche-credit

This commit is contained in:
lccsw
2022-07-20 10:46:53 +08:00
parent b4b385bf65
commit 73067627b4
12 changed files with 583 additions and 11 deletions
+23
View File
@@ -22,6 +22,8 @@ alter table lc_app_liche_users add dealer tinyint(1) not null default '0'
alter table lc_app_liche_users add up_uid int(10) not null default '0' comment '上级uid' after dealer;
alter table lc_app_liche_users add manage tinyint(1) not null default 0 comment '是否分销管理' after dealer;
alter table lc_app_liche_users add deal_uid int(10) not null default 0 comment '审核分销uid' after dealer;
alter table lc_app_liche_users add credits int(10) unsigned not null default '0' COMMENT '当前可用积分' after nickname;
alter table lc_app_liche_users add freeze_credits int(10) unsigned not null default '0' COMMENT '冻结积分' after credits;
-- ----------------------------
-- Title:狸车小程序cms
@@ -101,3 +103,24 @@ create table lc_app_liche_orders (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户购车订单'
alter table lc_app_liche_orders add img varchar(100) not null default '' comment '支付截图' after descrip;
alter table lc_app_liche_orders add admin_id int(10) not null default 0 comment '管理员id' after uid;
-- ----------------------------
-- Title:狸车小程序用户积分日志表
-- Author:lcc
-- Table:lc_app_liche_credits_log
-- ---------------------------
drop table if exists lc_app_liche_credits_log;
create table lc_app_liche_credits_log (
id int(10) unsigned not null auto_increment comment '自增id',
uid int(10) unsigned not null comment '用户id',
credit_in int(11) not null comment '积分入账',
credit_out int(11) not null comment '积分出账',
credit_left int(11) not null comment '剩余积分',
type tinyint(1) not null default '1' comment '类型 0活动 1派单成功 2完成试驾 3开票 4后台录入 5兑换商品',
target_id int(10) not null default '0' comment '来源id',
remark text 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='狸车小程序用户积分日志表'