Files
hfb_sys/backend/migrations/000070_distribution_site_receive_ratio.sql
T
yml2213andCursor c9d9160ff4 feat(distribution): 分站可下调收号比例且不超过主站上限
让分销站能按自身能力下调收号比例扩大利润,同时把主站回收比例作为硬边界,避免分站把比例加得比主站更高。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 20:35:30 +08:00

11 lines
437 B
SQL

-- +goose Up
-- 分站收号比例相对主站的下调点数。主站回收比例为上限,分站只能下调(比例更低、号主底价更高),不能高于主站。
ALTER TABLE distribution_sites
ADD COLUMN receive_ratio_delta DECIMAL(10,2) NOT NULL DEFAULT 0 COMMENT '分站收号比例相对主站下调点数,0 表示与主站一致';
-- +goose Down
ALTER TABLE distribution_sites
DROP COLUMN receive_ratio_delta;