1
This commit is contained in:
@@ -132,8 +132,7 @@ COMMENT ON COLUMN market_upgrade_cash_log.is_deleted IS '是否已删除';
|
|||||||
DROP TABLE IF EXISTS market_welfare_performance;
|
DROP TABLE IF EXISTS market_welfare_performance;
|
||||||
CREATE TABLE market_welfare_performance
|
CREATE TABLE market_welfare_performance
|
||||||
(
|
(
|
||||||
id int8 PRIMARY KEY, -- 主键ID (通常与用户ID一致)
|
id int8 PRIMARY KEY, -- 主键ID (用户ID)
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
owen_amount decimal(20, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
owen_amount decimal(20, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
||||||
total_amount decimal(20, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
total_amount decimal(20, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
||||||
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
||||||
@@ -148,7 +147,6 @@ CREATE TABLE market_welfare_performance
|
|||||||
|
|
||||||
COMMENT ON TABLE market_welfare_performance IS '福利包业绩表';
|
COMMENT ON TABLE market_welfare_performance IS '福利包业绩表';
|
||||||
COMMENT ON COLUMN market_welfare_performance.id IS '主键ID';
|
COMMENT ON COLUMN market_welfare_performance.id IS '主键ID';
|
||||||
COMMENT ON COLUMN market_welfare_performance.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_welfare_performance.owen_amount IS '自身业绩';
|
COMMENT ON COLUMN market_welfare_performance.owen_amount IS '自身业绩';
|
||||||
COMMENT ON COLUMN market_welfare_performance.total_amount IS '总业绩';
|
COMMENT ON COLUMN market_welfare_performance.total_amount IS '总业绩';
|
||||||
COMMENT ON COLUMN market_welfare_performance.version IS '版本号';
|
COMMENT ON COLUMN market_welfare_performance.version IS '版本号';
|
||||||
@@ -204,8 +202,7 @@ CREATE INDEX idx_mwpl_uid ON market_welfare_performance_log (user_id, stat_date
|
|||||||
DROP TABLE IF EXISTS market_cash_performance;
|
DROP TABLE IF EXISTS market_cash_performance;
|
||||||
CREATE TABLE market_cash_performance
|
CREATE TABLE market_cash_performance
|
||||||
(
|
(
|
||||||
id int8 PRIMARY KEY, -- 主键ID (通常与用户ID一致)
|
id int8 PRIMARY KEY, -- 主键ID (用户ID)
|
||||||
user_id int8 NOT NULL, -- 用户ID
|
|
||||||
owen_amount decimal(20, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
owen_amount decimal(20, 2) DEFAULT 0.00, -- 自身业绩 (直推/个人产生的)
|
||||||
total_amount decimal(20, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
total_amount decimal(20, 2) DEFAULT 0.00, -- 总业绩 (团队/包含下级的业绩)
|
||||||
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
version int4 DEFAULT 1, -- 版本号 (用于乐观锁,防止并发更新覆盖)
|
||||||
@@ -220,7 +217,6 @@ CREATE TABLE market_cash_performance
|
|||||||
|
|
||||||
COMMENT ON TABLE market_cash_performance IS '现金业绩表';
|
COMMENT ON TABLE market_cash_performance IS '现金业绩表';
|
||||||
COMMENT ON COLUMN market_cash_performance.id IS '主键ID';
|
COMMENT ON COLUMN market_cash_performance.id IS '主键ID';
|
||||||
COMMENT ON COLUMN market_cash_performance.user_id IS '用户ID';
|
|
||||||
COMMENT ON COLUMN market_cash_performance.owen_amount IS '自身业绩';
|
COMMENT ON COLUMN market_cash_performance.owen_amount IS '自身业绩';
|
||||||
COMMENT ON COLUMN market_cash_performance.total_amount IS '总业绩';
|
COMMENT ON COLUMN market_cash_performance.total_amount IS '总业绩';
|
||||||
COMMENT ON COLUMN market_cash_performance.version IS '版本号';
|
COMMENT ON COLUMN market_cash_performance.version IS '版本号';
|
||||||
|
|||||||
Reference in New Issue
Block a user