将bigint 修改成 int8
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
create table aliyun_certify
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint not null,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8 not null,
|
||||
user_phone int8,
|
||||
name varchar(128) null,
|
||||
id_card varchar(128) null,
|
||||
certify_id varchar(64) null,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- 创建表
|
||||
CREATE TABLE app_banner
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
cover_url VARCHAR(300) NULL,
|
||||
route VARCHAR(255) NULL,
|
||||
outside_url VARCHAR(300) NULL,
|
||||
@@ -11,10 +11,10 @@ CREATE TABLE app_banner
|
||||
remark VARCHAR(100) NULL,
|
||||
is_show INTEGER DEFAULT 0 NOT NULL,
|
||||
tag_name VARCHAR(255) NULL,
|
||||
create_user BIGINT NULL,
|
||||
create_dept BIGINT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user BIGINT NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
alter table blade_user
|
||||
add register_date timestamp;
|
||||
|
||||
alter table blade_user
|
||||
add invitation_code varchar(32);
|
||||
|
||||
alter table blade_user
|
||||
add pid bigint;
|
||||
|
||||
create index blade_user_register_date_index
|
||||
on blade_user (is_deleted, register_date);
|
||||
|
||||
|
||||
create index bur_invitation_code_index
|
||||
on blade_user (is_deleted, invitation_code);
|
||||
@@ -1,6 +1,6 @@
|
||||
CREATE TABLE mall_spu
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_sn VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
spu_name VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
@@ -55,7 +55,7 @@ CREATE TABLE ys_category
|
||||
(
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
cname VARCHAR(100) DEFAULT '' NOT NULL,
|
||||
pid BIGINT DEFAULT 0 NOT NULL,
|
||||
pid int8 DEFAULT 0 NOT NULL,
|
||||
level INTEGER DEFAULT 0 NOT NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
@@ -63,7 +63,7 @@ CREATE TABLE ys_category
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept BIGINT NULL
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE ys_category_id_seq START 1;
|
||||
@@ -86,10 +86,10 @@ COMMENT ON COLUMN ys_category.create_dept IS '创建部门';
|
||||
|
||||
CREATE TABLE mall_cart
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
title VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
spu_id BIGINT DEFAULT 0 NOT NULL,
|
||||
spu_id int8 DEFAULT 0 NOT NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
original_price DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
@@ -126,9 +126,9 @@ CREATE INDEX idx_user_id ON mall_cart (user_id);
|
||||
|
||||
CREATE TABLE user_address
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT NULL,
|
||||
regions_info_id BIGINT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NULL,
|
||||
regions_info_id int8 NULL,
|
||||
province VARCHAR(200) NULL,
|
||||
city VARCHAR(200) NULL,
|
||||
district VARCHAR(200) NULL,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
CREATE TABLE user_order
|
||||
(
|
||||
id BIGINT DEFAULT 0 NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
user_phone bigint,
|
||||
id int8 DEFAULT 0 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
order_type INTEGER DEFAULT 0 NOT NULL,
|
||||
order_id BIGINT DEFAULT 0 NOT NULL,
|
||||
order_id int8 DEFAULT 0 NOT NULL,
|
||||
title VARCHAR(256) DEFAULT '' NOT NULL,
|
||||
images VARCHAR(512) NULL,
|
||||
quantity INTEGER NULL,
|
||||
@@ -76,15 +76,15 @@ CREATE INDEX user_order_index ON user_order (user_id, order_type);
|
||||
|
||||
CREATE TABLE mall_summary_order
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
user_phone bigint,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
products_info text NULL,
|
||||
order_info text NULL,
|
||||
confirm_info text NULL,
|
||||
vendor_regions_id BIGINT NOT NULL,
|
||||
address_id BIGINT NOT NULL,
|
||||
vendor_regions_id int8 NOT NULL,
|
||||
address_id int8 NOT NULL,
|
||||
delivery_info text NULL,
|
||||
freight_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
@@ -105,7 +105,7 @@ CREATE TABLE mall_summary_order
|
||||
is_recorded INTEGER DEFAULT 0 NULL,
|
||||
is_statistics INTEGER DEFAULT 0 NULL,
|
||||
remarks VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
version BIGINT DEFAULT 0 NULL,
|
||||
version int8 DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
@@ -163,12 +163,12 @@ CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_stat
|
||||
|
||||
CREATE TABLE mall_detail_order
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
user_phone bigint,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
summary_order_id BIGINT DEFAULT 0 NOT NULL,
|
||||
spu_id BIGINT DEFAULT 0 NOT NULL,
|
||||
summary_order_id int8 DEFAULT 0 NOT NULL,
|
||||
spu_id int8 DEFAULT 0 NOT NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
sku_snapshot text NULL,
|
||||
actual_cost_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
@@ -225,13 +225,13 @@ CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
|
||||
|
||||
CREATE TABLE mall_summary_order_after
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT -1 NOT NULL,
|
||||
user_phone bigint,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT -1 NOT NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
summary_order_id BIGINT DEFAULT -1 NOT NULL,
|
||||
goods_id BIGINT DEFAULT -1 NOT NULL,
|
||||
sku_id BIGINT NOT NULL,
|
||||
summary_order_id int8 DEFAULT -1 NOT NULL,
|
||||
goods_id int8 DEFAULT -1 NOT NULL,
|
||||
sku_id int8 NOT NULL,
|
||||
goods_name VARCHAR(256) NOT NULL,
|
||||
third_plat_order_no VARCHAR(32) NOT NULL,
|
||||
third_plat_after_no VARCHAR(32) NOT NULL,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
CREATE TABLE registration_order
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
spu_id BIGINT NULL,
|
||||
sku_id BIGINT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_id int8 NULL,
|
||||
sku_id int8 NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
transaction_type INTEGER NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
@@ -12,7 +12,7 @@ CREATE TABLE registration_order
|
||||
points DECIMAL(10, 2) NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
remaining INTEGER NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
user_nickname VARCHAR(100) NULL,
|
||||
in_transaction INTEGER DEFAULT 0 NOT NULL,
|
||||
is_full_package INTEGER DEFAULT 0 NOT NULL,
|
||||
@@ -76,9 +76,9 @@ COMMENT ON COLUMN registration_order.is_priority IS '是否优先';
|
||||
|
||||
CREATE TABLE transaction_order
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
registration_id BIGINT NOT NULL,
|
||||
sku_id BIGINT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
registration_id int8 NOT NULL,
|
||||
sku_id int8 NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
transaction_type INTEGER NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
@@ -87,7 +87,7 @@ CREATE TABLE transaction_order
|
||||
quantity INTEGER NOT NULL,
|
||||
total_amount DECIMAL(10, 2) NOT NULL,
|
||||
total_points DECIMAL(10, 2) NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
user_nickname VARCHAR(500) NULL,
|
||||
payment_voucher VARCHAR(500) NULL,
|
||||
delivery_voucher VARCHAR(500) NULL,
|
||||
@@ -97,7 +97,7 @@ CREATE TABLE transaction_order
|
||||
receiver_address VARCHAR(100) NULL,
|
||||
contact VARCHAR(100) NULL,
|
||||
contact_number VARCHAR(100) NULL,
|
||||
counterparty_order_id BIGINT DEFAULT 0 NOT NULL,
|
||||
counterparty_order_id int8 DEFAULT 0 NOT NULL,
|
||||
is_virtual INTEGER DEFAULT 0 NOT NULL,
|
||||
supplier_order_sn VARCHAR(100) NULL,
|
||||
expire_time TIMESTAMP NULL,
|
||||
@@ -146,16 +146,16 @@ COMMENT ON COLUMN transaction_order.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE user_inventory
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT NOT NULL,
|
||||
sku_id BIGINT NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NOT NULL,
|
||||
sku_id int8 NOT NULL,
|
||||
title VARCHAR(100) NOT NULL,
|
||||
thumbnail VARCHAR(500) NOT NULL,
|
||||
price DECIMAL(10, 2) NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
is_virtual INTEGER DEFAULT 0 NOT NULL,
|
||||
attribute JSON NULL,
|
||||
version BIGINT DEFAULT 0 NOT NULL,
|
||||
version int8 DEFAULT 0 NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
@@ -187,7 +187,7 @@ COMMENT ON COLUMN user_inventory.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE calendar_non_working
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
off_date DATE NOT NULL,
|
||||
remark VARCHAR(200) NULL,
|
||||
create_user int8 NULL,
|
||||
@@ -215,8 +215,8 @@ COMMENT ON COLUMN calendar_non_working.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE user_otc_info
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NOT NULL,
|
||||
alipay_account VARCHAR(200) NULL,
|
||||
wechat_account VARCHAR(200) NULL,
|
||||
alipay_qr_code VARCHAR(200) NULL,
|
||||
|
||||
@@ -8,8 +8,8 @@ CREATE TABLE regions_info
|
||||
lat DECIMAL(10, 6) NULL,
|
||||
region_code VARCHAR(128) NULL,
|
||||
full_name VARCHAR(200) NULL,
|
||||
vendor_region_id BIGINT NULL,
|
||||
store_city_id BIGINT NULL,
|
||||
vendor_region_id int8 NULL,
|
||||
store_city_id int8 NULL,
|
||||
hotel_city_code VARCHAR(128) NULL,
|
||||
hotel_city_pinyin VARCHAR(128) NULL,
|
||||
hotel_city_initials VARCHAR(4) NULL,
|
||||
@@ -20,7 +20,7 @@ CREATE TABLE regions_info
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept BIGINT NULL
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE regions_info IS '地区详情表';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
CREATE TABLE user_daily_sign
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT NULL,
|
||||
user_phone bigint,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NULL,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
statistics_date DATE NULL,
|
||||
sign_count INTEGER NULL,
|
||||
@@ -15,7 +15,7 @@ CREATE TABLE user_daily_sign
|
||||
update_time TIMESTAMP(6) NULL,
|
||||
update_user int8 NULL,
|
||||
status INTEGER NULL,
|
||||
create_dept BIGINT NULL
|
||||
create_dept int8 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE user_daily_sign IS '用户看广告记录表';
|
||||
@@ -48,7 +48,7 @@ CREATE INDEX uds_uid_index
|
||||
|
||||
CREATE TABLE ads
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(255) NULL,
|
||||
url VARCHAR(255) NULL,
|
||||
sort INTEGER DEFAULT 1,
|
||||
|
||||
@@ -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), -- 统计时间
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
-- 创建表
|
||||
CREATE TABLE user_notice
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
notice_type INTEGER DEFAULT 0 NOT NULL,
|
||||
has_read INTEGER DEFAULT 0 NOT NULL,
|
||||
release_time TIMESTAMP NULL,
|
||||
title VARCHAR(100) NULL,
|
||||
content TEXT NULL,
|
||||
remarks VARCHAR(200) NULL,
|
||||
create_user BIGINT NULL,
|
||||
create_dept BIGINT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user BIGINT NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
create table user_performance
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
performance decimal(16, 4) default 0,
|
||||
own_performance decimal(16, 4) default 0,
|
||||
@@ -38,14 +38,14 @@ alter table user_performance
|
||||
|
||||
create table user_performance_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 4) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
@@ -91,9 +91,9 @@ alter table user_performance_log
|
||||
|
||||
create table user_performance_benefit
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
performance decimal(16, 4) default 0,
|
||||
own_performance decimal(16, 4) default 0,
|
||||
@@ -129,14 +129,14 @@ alter table user_performance_benefit
|
||||
|
||||
create table user_performance_benefit_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 4) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
create table user_benefit
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
@@ -30,15 +30,15 @@ alter table user_benefit
|
||||
|
||||
create table user_benefit_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id bigint,
|
||||
user_pack_id bigint,
|
||||
source_id int8,
|
||||
user_pack_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
@@ -85,7 +85,7 @@ alter table user_benefit_log
|
||||
|
||||
create table user_commission
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
@@ -116,14 +116,14 @@ alter table user_commission
|
||||
|
||||
create table user_commission_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
@@ -169,7 +169,7 @@ alter table user_commission_log
|
||||
|
||||
create table user_cash
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
@@ -200,14 +200,14 @@ alter table user_cash
|
||||
|
||||
create table user_cash_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
@@ -253,7 +253,7 @@ alter table user_cash_log
|
||||
|
||||
create table user_mall_integral
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
amount decimal(14, 2) default 0,
|
||||
version int default 1,
|
||||
create_user int8,
|
||||
@@ -282,14 +282,14 @@ alter table user_mall_integral
|
||||
|
||||
create table user_mall_integral_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
type int default 1,
|
||||
statistical_date timestamp(6),
|
||||
channel varchar(64),
|
||||
@@ -336,9 +336,9 @@ alter table user_mall_integral_log
|
||||
|
||||
create table user_gains_day
|
||||
(
|
||||
id bigint not null primary key,
|
||||
id int8 not null primary key,
|
||||
statistical_date timestamp(6),
|
||||
user_id bigint,
|
||||
user_id int8,
|
||||
amount decimal(14, 2) default 0,
|
||||
gains_details text,
|
||||
is_credited integer default 0,
|
||||
@@ -376,15 +376,15 @@ alter table user_gains_day
|
||||
|
||||
create table user_gains_day_log
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint,
|
||||
user_phone bigint,
|
||||
id int8 not null primary key,
|
||||
user_id int8,
|
||||
user_phone int8,
|
||||
user_name varchar(128),
|
||||
amount decimal(14, 2) default 0,
|
||||
source_id bigint,
|
||||
source_id int8,
|
||||
source_detail text,
|
||||
gains_details text,
|
||||
order_id bigint,
|
||||
order_id int8,
|
||||
statistical_date timestamp(6),
|
||||
is_summary integer default 0,
|
||||
remark text,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
CREATE TABLE vendor_daily_activity
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
settle_date DATE NOT NULL,
|
||||
region_id BIGINT NOT NULL,
|
||||
region_id int8 NOT NULL,
|
||||
region_level INTEGER DEFAULT 0 NOT NULL,
|
||||
total_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
activity_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
@@ -37,9 +37,9 @@ COMMENT ON COLUMN vendor_daily_activity.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE vendor_daily_profit
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
settle_date DATE NOT NULL,
|
||||
region_id BIGINT NOT NULL,
|
||||
region_id int8 NOT NULL,
|
||||
region_level INTEGER DEFAULT 0 NOT NULL,
|
||||
profit_type INTEGER DEFAULT 0 NOT NULL,
|
||||
order_type INTEGER NOT NULL,
|
||||
@@ -77,9 +77,9 @@ COMMENT ON COLUMN vendor_daily_profit.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE vendor_info
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
region_id BIGINT NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id int8 NOT NULL,
|
||||
user_id int8 NOT NULL,
|
||||
company_name VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
legal_person_name VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
id_card VARCHAR(50) DEFAULT '' NOT NULL,
|
||||
@@ -89,7 +89,7 @@ CREATE TABLE vendor_info
|
||||
id_card_handheld VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
business_license VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
audit_status INTEGER DEFAULT 1 NOT NULL,
|
||||
auditor BIGINT NULL,
|
||||
auditor int8 NULL,
|
||||
reject_reason VARCHAR(200) DEFAULT '' NOT NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
@@ -129,8 +129,8 @@ COMMENT ON COLUMN vendor_info.apply_time IS '申请时间';
|
||||
|
||||
CREATE TABLE vendor_payout_apply
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
apply_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
company_fully_name VARCHAR(255) NULL,
|
||||
bank_account VARCHAR(255) NULL,
|
||||
@@ -175,12 +175,12 @@ COMMENT ON COLUMN vendor_payout_apply.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE vendor_profit_detail
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
order_id BIGINT DEFAULT 0 NOT NULL,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
district_id BIGINT DEFAULT 0 NOT NULL,
|
||||
city_id BIGINT DEFAULT 0 NOT NULL,
|
||||
province_id BIGINT DEFAULT 0 NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
order_id int8 DEFAULT 0 NOT NULL,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
district_id int8 DEFAULT 0 NOT NULL,
|
||||
city_id int8 DEFAULT 0 NOT NULL,
|
||||
province_id int8 DEFAULT 0 NOT NULL,
|
||||
order_type INTEGER DEFAULT 0 NOT NULL,
|
||||
payment_type INTEGER DEFAULT 0 NOT NULL,
|
||||
actual_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
@@ -221,13 +221,13 @@ COMMENT ON COLUMN vendor_profit_detail.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE vendor_regions
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(50) NULL,
|
||||
level INTEGER NULL,
|
||||
pid INTEGER DEFAULT 0 NULL,
|
||||
lon DECIMAL(10, 6) NULL,
|
||||
lat DECIMAL(10, 6) NULL,
|
||||
vendor_id BIGINT NULL,
|
||||
vendor_id int8 NULL,
|
||||
token_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
points_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
apply_amount DECIMAL(10, 2) DEFAULT 0.00 NULL,
|
||||
@@ -253,7 +253,7 @@ COMMENT ON COLUMN vendor_regions.region_code IS '区划编号';
|
||||
|
||||
CREATE TABLE vendor_virtual_data_activity
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id INTEGER NOT NULL,
|
||||
user_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
active_user_amount INTEGER DEFAULT 0 NOT NULL,
|
||||
@@ -291,7 +291,7 @@ COMMENT ON COLUMN vendor_virtual_data_activity.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE vendor_virtual_data_profit
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
region_id INTEGER NOT NULL,
|
||||
settle_date DATE NOT NULL,
|
||||
online_amount DECIMAL(10, 2) DEFAULT 0.00 NOT NULL,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CREATE TABLE prize_spu
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
spu_name VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
main_img VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
detail_img text NULL,
|
||||
@@ -36,17 +36,17 @@ COMMENT ON COLUMN prize_spu.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE TABLE prize_spu_order
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 DEFAULT 0 NOT NULL,
|
||||
user_name VARCHAR(128) NULL,
|
||||
user_phone bigint NULL,
|
||||
spu_id bigint NULL,
|
||||
user_phone int8 NULL,
|
||||
spu_id int8 NULL,
|
||||
spu_name VARCHAR(255) NULL,
|
||||
main_img VARCHAR(255) NULL,
|
||||
detail_img text NULL,
|
||||
quantity INTEGER DEFAULT 0 NOT NULL,
|
||||
order_status INTEGER DEFAULT 0 NOT NULL,
|
||||
version BIGINT DEFAULT 0 NULL,
|
||||
version int8 DEFAULT 0 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP(6) NULL,
|
||||
|
||||
Reference in New Issue
Block a user