将bigint 修改成 int8
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
create table user_genealogy
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
name varchar(128),
|
||||
phone bigint,
|
||||
phone int8,
|
||||
level integer default 1, --当前层数
|
||||
pid bigint,
|
||||
pid int8,
|
||||
p_name varchar(128),
|
||||
p_phone bigint,
|
||||
root_id bigint, --遍历当前树
|
||||
group_id bigint, --树内最近团队长的id
|
||||
genealogy_list bigint[], -- 往上所有父级
|
||||
p_phone int8,
|
||||
root_id int8, --遍历当前树
|
||||
group_id int8, --树内最近团队长的id
|
||||
genealogy_list int8[], -- 往上所有父级
|
||||
user_child_number int, --用户下线总人数
|
||||
user_direct_number int, --用户直推总人数
|
||||
user_direct_list bigint[], --直推列表
|
||||
user_direct_list int8[], --直推列表
|
||||
is_revoked integer default 0, --是否注销 0-否 1-是
|
||||
register_date date, -- 注册时间
|
||||
remark text,
|
||||
@@ -66,13 +66,13 @@ alter table user_genealogy
|
||||
|
||||
create table user_tree
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
name varchar(128),
|
||||
phone bigint,
|
||||
phone int8,
|
||||
level integer default 1,
|
||||
pid bigint,
|
||||
pid int8,
|
||||
p_name varchar(128),
|
||||
p_phone bigint,
|
||||
p_phone int8,
|
||||
p_level integer default 1,
|
||||
is_revoked integer default 0, --是否撤销 0-否 1-是
|
||||
is_sync_genealogy integer default 0, --是否同步族谱 0-否 1-是
|
||||
@@ -121,14 +121,14 @@ alter table user_tree
|
||||
|
||||
create table user_increase_day
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
name varchar(128),
|
||||
phone bigint,
|
||||
phone int8,
|
||||
current_level_id int, --用户当前等级
|
||||
current_level_name varchar(12), --用户当前等级
|
||||
pid bigint,
|
||||
pid int8,
|
||||
p_name varchar(128),
|
||||
p_phone bigint,
|
||||
p_phone int8,
|
||||
p_level integer default 1,
|
||||
is_real integer default 0, -- 是否实名用户 0-否 1-是
|
||||
real_date timestamp(6), -- 实名时间
|
||||
@@ -180,12 +180,12 @@ alter table user_increase_day
|
||||
|
||||
CREATE TABLE level_info
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(128) NULL,
|
||||
child_qty INTEGER NULL,
|
||||
performance DECIMAL(16, 4) NULL,
|
||||
performance_benefit DECIMAL(16, 4) NULL,
|
||||
next_level_id BIGINT, --晋升等级id
|
||||
next_level_id int8, --晋升等级id
|
||||
is_lowest int DEFAULT 0, --是否最低等级
|
||||
is_highest int DEFAULT 0, --是否最高等级
|
||||
bonus_cash_day DECIMAL(16, 4) NULL,
|
||||
@@ -226,12 +226,12 @@ alter table level_info
|
||||
|
||||
create table user_level_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
statistical_date timestamp(6),
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
level_id bigint,
|
||||
level_id int8,
|
||||
level_name varchar(128),
|
||||
is_lowest int, --是否最低等级
|
||||
is_highest int, --是否最高等级
|
||||
@@ -282,7 +282,7 @@ alter table user_level_log
|
||||
|
||||
CREATE TABLE package_info
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(128) NULL,
|
||||
buy_qty INTEGER default 0, -- 最大购买数量
|
||||
day_total integer default 0, -- 产出总天数
|
||||
@@ -333,12 +333,12 @@ alter table package_info
|
||||
|
||||
create table give_pack_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
statistical_date date,
|
||||
user_id bigint,
|
||||
phone bigint,
|
||||
user_id int8,
|
||||
phone int8,
|
||||
user_name varchar(128),
|
||||
package_id bigint,
|
||||
package_id int8,
|
||||
package_name varchar(128),
|
||||
package_detail text,
|
||||
give_number integer default 1,
|
||||
@@ -381,12 +381,12 @@ alter table give_pack_log
|
||||
|
||||
create table user_package_info
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
statistical_date timestamp(6),
|
||||
user_id bigint,
|
||||
phone bigint,
|
||||
user_id int8,
|
||||
phone int8,
|
||||
user_name varchar(128),
|
||||
package_id bigint,
|
||||
package_id int8,
|
||||
package_name varchar(128),
|
||||
type integer default 1, -- 1-积分兑换 2-后台划拨
|
||||
user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
|
||||
@@ -458,13 +458,13 @@ alter table user_package_info
|
||||
|
||||
create table user_package_info_copy
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
statistical_date timestamp(6),
|
||||
user_id bigint,
|
||||
phone bigint,
|
||||
user_id int8,
|
||||
phone int8,
|
||||
user_name varchar(128),
|
||||
user_package_info_Id bigint, --user_package_info id
|
||||
package_id bigint,
|
||||
user_package_info_Id int8, --user_package_info id
|
||||
package_id int8,
|
||||
package_name varchar(128),
|
||||
type integer default 1, -- 1-积分兑换 2-后台划拨
|
||||
user_benefit decimal(14, 2) default 0, --兑换包需要的福利积分
|
||||
@@ -476,15 +476,15 @@ create table user_package_info_copy
|
||||
amount_out decimal(16, 4) default 0, -- 已产出多少福利积分
|
||||
remaining_amount decimal(16, 4) default 0, -- 剩余可产出福利积分 (总计 - 已经经历多少天 * 每天产出 - 加速积分)
|
||||
accelerated_amount decimal(16, 4) default 0, -- 已加速多少福利积分
|
||||
parent_id bigint, -- 给到谁10%积分,到用户id
|
||||
parent_id int8, -- 给到谁10%积分,到用户id
|
||||
parent_amount decimal(16, 4) default 0, -- 给到谁10%积分,到积分账户(福利积分)
|
||||
out_day integer default 0, -- 产出天数 当前包已经产出天数
|
||||
experience_day integer default 0, -- 当前包已经经历的天数
|
||||
not_sign_list bigint[], -- 未签到日期详情 (数组)
|
||||
not_sign_list int8[], -- 未签到日期详情 (数组)
|
||||
is_complete integer default 0, -- 是否完成 0未完成 1完成
|
||||
active_time timestamp(6), -- 当前包激活时间
|
||||
start_time timestamp(6), -- 当前包生效时间
|
||||
sign_bitmap bigint default 0, -- 位图将包的签到时间360天二进制转成十进制
|
||||
sign_bitmap int8 default 0, -- 位图将包的签到时间360天二进制转成十进制
|
||||
expired_date timestamp(6),
|
||||
is_expired integer default 0,
|
||||
version integer default 1,
|
||||
@@ -549,7 +549,7 @@ COMMENT ON COLUMN user_package_info_copy.is_deleted IS '是否已删除';
|
||||
-- 佣金账户表
|
||||
create table user_commission_account
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
@@ -588,18 +588,18 @@ alter table user_commission_account
|
||||
-- 25%商品成本佣金流水表
|
||||
create table user_commission_goods_cost_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
@@ -647,18 +647,18 @@ alter table user_commission_goods_cost_log
|
||||
-- 30%购买人获取用户积分佣金流水表
|
||||
create table user_commission_user_point_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
@@ -706,18 +706,18 @@ alter table user_commission_user_point_log
|
||||
-- 10%直推人佣金流水表
|
||||
create table user_commission_direct_push_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
@@ -765,18 +765,18 @@ alter table user_commission_direct_push_log
|
||||
-- 5%运营佣金流水表
|
||||
create table user_commission_operation_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
@@ -828,15 +828,15 @@ alter table user_commission_operation_log
|
||||
-- 5%广告补贴佣金流水表
|
||||
create table user_commission_advertising_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
@@ -885,26 +885,26 @@ alter table user_commission_advertising_log
|
||||
-- 5%服务商佣金流水表
|
||||
create table user_commission_service_provider_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
remark text, -- 备注
|
||||
service_type varchar(64), -- 服务类型
|
||||
service_provider_id bigint, -- 服务商ID
|
||||
address_id bigint,
|
||||
region_id bigint,
|
||||
service_provider_id int8, -- 服务商ID
|
||||
address_id int8,
|
||||
region_id int8,
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
@@ -949,24 +949,24 @@ alter table user_commission_service_provider_log
|
||||
-- 15%极差代理佣金流水表
|
||||
create table user_commission_agency_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
remark text, -- 备注
|
||||
agency_level varchar(32), -- 代理级别
|
||||
agency_parent_id bigint, -- 上级代理ID
|
||||
agency_parent_id int8, -- 上级代理ID
|
||||
create_user int8,
|
||||
create_dept int8,
|
||||
create_time timestamp(6),
|
||||
@@ -1012,18 +1012,18 @@ alter table user_commission_agency_log
|
||||
-- 5%联创佣金流水表
|
||||
create table user_commission_co_creator_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
account_id bigint, -- 账户id
|
||||
id int8 not null primary key,
|
||||
account_id int8, -- 账户id
|
||||
account_name varchar(128), -- 账户名称
|
||||
account_number varchar(64), -- 账户编号
|
||||
account_code varchar(64), -- 账户代码
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0, -- 变动金额
|
||||
source_id bigint, -- 来源id
|
||||
source_id int8, -- 来源id
|
||||
source_detail text, -- 来源详情
|
||||
order_id bigint, -- 订单id
|
||||
order_id int8, -- 订单id
|
||||
order_detail text, -- 订单详情
|
||||
type int default 1, -- 类型 1-收入 2-支出
|
||||
statistical_date timestamp(6), -- 统计时间
|
||||
|
||||
Reference in New Issue
Block a user