hyapp-server/server/admin/migrations/076_databi_app_kpi_targets.sql
2026-07-03 22:42:48 +08:00

14 lines
985 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
-- App 级充值 KPI 月度目标:不分运营的全员共同目标;人级目标仍在 admin_databi_kpi_targetsregion_id=0 表示该运营的整 App 目标)。
CREATE TABLE IF NOT EXISTS admin_databi_app_kpi_targets (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
app_code VARCHAR(32) NOT NULL COMMENT '应用编码',
period_month CHAR(7) NOT NULL COMMENT '目标月份,格式 YYYY-MM',
target_usd_minor BIGINT NOT NULL DEFAULT 0 COMMENT '当月充值目标USD 分',
daily_target_usd_minor BIGINT NOT NULL DEFAULT 0 COMMENT '当日充值目标USD 分',
created_at_ms BIGINT NOT NULL COMMENT '创建时间UTC epoch ms',
updated_at_ms BIGINT NOT NULL COMMENT '更新时间UTC epoch ms',
UNIQUE KEY uk_admin_databi_app_kpi_target (app_code, period_month)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='社交 BI App 级充值 KPI 月度目标(不分运营)';