|
|
@@ -1262,10 +1262,12 @@ CREATE TABLE IF NOT EXISTS commission_records (
|
|
|
status VARCHAR(16) NOT NULL DEFAULT 'settled' COMMENT '状态: pending/settled',
|
|
|
remark TEXT DEFAULT NULL COMMENT '备注',
|
|
|
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
+ family_id BIGINT DEFAULT NULL COMMENT '归属家庭ID',
|
|
|
settled_at DATETIME DEFAULT NULL COMMENT '结算时间',
|
|
|
withdrawn_at DATETIME DEFAULT NULL COMMENT '提现时间',
|
|
|
INDEX idx_referrer (referrer_id),
|
|
|
INDEX idx_buyer (buyer_id),
|
|
|
+ INDEX idx_family (family_id),
|
|
|
INDEX idx_order (order_id, order_type)
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='佣金记录表';
|
|
|
|