佣金账户
This commit is contained in:
@@ -16,7 +16,7 @@ create table benefit_point
|
||||
|
||||
|
||||
comment on table benefit_point is '用户福利值表';
|
||||
comment on column benefit_point.id is '主键';
|
||||
comment on column benefit_point.id is '主键(用户id)';
|
||||
comment on column benefit_point.amount is '金额';
|
||||
comment on column benefit_point.version is '版本号';
|
||||
comment on column benefit_point.create_user is '创建人';
|
||||
@@ -35,9 +35,9 @@ create table benefit_point_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
last_amount decimal(14, 2) default 0, -- 上一笔金额
|
||||
fee decimal(14, 2) default 0,
|
||||
source_id int8,
|
||||
user_pack_id int8,
|
||||
source_detail text,
|
||||
@@ -54,15 +54,15 @@ create table benefit_point_log
|
||||
status int4 default 1,
|
||||
is_deleted int4 default 0
|
||||
);
|
||||
create index inx_umbl_uid
|
||||
on benefit_point_log (is_complete, user_id , statistical_date , type);
|
||||
create index idx_umbl_uid
|
||||
on benefit_point_log (is_complete, user_id, type, statistical_date, create_time DESC);
|
||||
|
||||
comment on table benefit_point_log is '用户福利值流水表';
|
||||
comment on column benefit_point_log.id is '主键';
|
||||
comment on column benefit_point_log.user_id is '用户id';
|
||||
comment on column benefit_point_log.user_phone is '用户手机号';
|
||||
comment on column benefit_point_log.user_name is '用户名称';
|
||||
comment on column benefit_point_log.amount is '金额';
|
||||
comment on column benefit_point_log.last_amount is '上一笔金额';
|
||||
comment on column benefit_point_log.fee is '手续费';
|
||||
comment on column benefit_point_log.source_id is '来源id';
|
||||
comment on column benefit_point_log.user_pack_id is '用户积分包id';
|
||||
comment on column benefit_point_log.source_detail is '来源详情';
|
||||
@@ -100,7 +100,7 @@ create table cash_coupon
|
||||
|
||||
|
||||
comment on table cash_coupon is '用户现金券表';
|
||||
comment on column cash_coupon.id is '主键';
|
||||
comment on column cash_coupon.id is '主键(用户id)';
|
||||
comment on column cash_coupon.amount is '面额';
|
||||
comment on column cash_coupon.version is '版本号';
|
||||
comment on column cash_coupon.create_user is '创建人';
|
||||
@@ -119,9 +119,8 @@ create table cash_coupon_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
last_amount decimal(14, 2) default 0, -- 上一笔金额
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
@@ -138,15 +137,14 @@ create table cash_coupon_log
|
||||
is_deleted int4 default 0
|
||||
);
|
||||
|
||||
create index inx_umcl_uid
|
||||
on cash_coupon_log (is_complete, user_id , statistical_date , type);
|
||||
create index idx_umcl_uid
|
||||
on cash_coupon_log (is_complete, user_id, type, statistical_date, create_time DESC);
|
||||
|
||||
comment on table cash_coupon_log is '用户现金券流水表';
|
||||
comment on column cash_coupon_log.id is '主键';
|
||||
comment on column cash_coupon_log.user_id is '用户id';
|
||||
comment on column cash_coupon_log.user_phone is '用户手机号';
|
||||
comment on column cash_coupon_log.user_name is '用户名称';
|
||||
comment on column cash_coupon_log.amount is '金额';
|
||||
comment on column cash_coupon_log.last_amount is '上一笔金额';
|
||||
comment on column cash_coupon_log.source_id is '来源id';
|
||||
comment on column cash_coupon_log.source_detail is '来源详情';
|
||||
comment on column cash_coupon_log.order_id is '订单id';
|
||||
@@ -184,6 +182,7 @@ create table user_point
|
||||
|
||||
|
||||
comment on table user_point is '用户商城积分表';
|
||||
comment on column user_point.id is '主键(用户id)';
|
||||
comment on column user_point.amount is '面额';
|
||||
comment on column user_point.version is '版本号';
|
||||
comment on column user_point.create_user is '创建人';
|
||||
@@ -201,9 +200,9 @@ create table user_point_log
|
||||
(
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
last_amount decimal(14, 2) default 0, -- 上一笔金额
|
||||
source_module int4, -- 来源模块 0-商城订单
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id int8,
|
||||
@@ -220,15 +219,15 @@ create table user_point_log
|
||||
is_deleted int4 default 0
|
||||
);
|
||||
|
||||
create index inx_uapl_uid
|
||||
on user_point_log (is_complete, user_id , statistical_date , type);
|
||||
create index idx_uapl_uid
|
||||
on user_point_log (is_complete, user_id, type, statistical_date, create_time DESC);
|
||||
|
||||
comment on table user_point_log is '用户商城积分流水表';
|
||||
comment on column user_point_log.id is '主键';
|
||||
comment on column user_point_log.user_id is '用户id';
|
||||
comment on column user_point_log.user_phone is '用户手机号';
|
||||
comment on column user_point_log.user_name is '用户名称';
|
||||
comment on column user_point_log.amount is '金额';
|
||||
comment on column user_point_log.last_amount is '上一笔金额';
|
||||
comment on column user_point_log.source_module is '来源模块 0-商城订单';
|
||||
comment on column user_point_log.source_id is '来源id';
|
||||
comment on column user_point_log.source_detail is '来源详情';
|
||||
comment on column user_point_log.order_id is '订单id';
|
||||
|
||||
Reference in New Issue
Block a user