A 层搬运(整包,源=poc-final 5e09a4cc): 协议四栈/pkg 标准件 12 包/util 计费纯函数/middleware/迁移链 repository·mysql v1~v19+clickhouse/model·entity/config/service·audit·balance/app/cmd·{migrate,reconcile,cmppbench}/tools·gen-dict/_bench/test·integration/openapi·yaml/监控三件/运维资产(compose+kind+CI 两套+Makefile+runbook)/scripts 种子/前端基建(根配置+src 基建目录,views 留 B 层)

This commit is contained in:
2026-11-13 15:16:01 +08:00
parent 2a6a66fbd3
commit e47610f4ed
273 changed files with 33973 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
/** FE-2 Mock 数据(通道/上家/策略)。 */
export function now(): string {
return new Date().toISOString().slice(0, 19).replace('T', ' ')
}
export const upstreamDB = [
{ id: 1, name: '移动集团通道', contact: '张经理', phone: '13800000001', category: '运营商直连', status: 1, remark: '移动全国', created_at: '2026-01-10 09:00:00' },
{ id: 2, name: '联通综合', contact: '李总', phone: '13800000002', category: '运营商直连', status: 1, remark: '', created_at: '2026-01-15 10:30:00' },
{ id: 3, name: '创蓝253', contact: '王工', phone: '13800000003', category: '第三方通道', status: 1, remark: 'HTTP 通道', created_at: '2026-02-01 14:00:00' },
]
export const ids = { upstream: 100, channel: 100, group: 100, item: 100, black: 100, white: 100, kw: 100, freq: 100, code: 100, rule: 100 }
export const channelDB = [
{ id: 1, name: '移动-CMPP-主', code: 'YD-001', protocol: 'cmpp', upstream_id: 1, host: '10.0.1.1', port: 7890, username: 'go-sms', speed: 500, conn_count: 4, status: 1, is_default: 0, priority: 10, weight: 70, day_limit: 1000000, night_limit: 4, sign_mode: 0, ext_length: 0, black_keywords: '', block_regions: '新疆,西藏', template_mode: 0, remark: '主力通道', created_at: '2026-01-20 09:00:00' },
{ id: 2, name: '联通-HTTP', code: 'LT-001', protocol: 'http', upstream_id: 2, host: 'https://sms.ltp.com/send', port: 443, username: 'hw_lt', speed: 200, conn_count: 1, status: 1, is_default: 1, priority: 5, weight: 20, day_limit: 500000, night_limit: 0, sign_mode: 0, ext_length: 6, black_keywords: '博彩,贷款', block_regions: '', template_mode: 0, remark: '兜底通道', created_at: '2026-01-22 11:00:00' },
{ id: 3, name: '电信-SGIP', code: 'DX-001', protocol: 'sgip', upstream_id: 1, host: '10.0.1.3', port: 8801, username: 'hw_dx', speed: 300, conn_count: 2, status: 1, is_default: 0, priority: 8, weight: 10, day_limit: 300000, night_limit: 4, sign_mode: 1, ext_length: 0, black_keywords: '', block_regions: '', template_mode: 0, remark: '', created_at: '2026-02-05 15:00:00' },
{ id: 4, name: '国际-SMPP', code: 'Intl-001', protocol: 'smpp', upstream_id: 3, host: 'smpp.intl.com', port: 2775, username: 'hw_intl', speed: 100, conn_count: 2, status: 0, is_default: 0, priority: 3, weight: 5, day_limit: 50000, night_limit: 0, sign_mode: 0, ext_length: 0, black_keywords: '', block_regions: '', template_mode: 1, remark: '国际短信', created_at: '2026-03-01 08:00:00' },
]
export const groupDB = [
{ id: 1, name: '默认路由组', remark: '全国短信默认路由', status: 1, created_at: '2026-02-01 09:00:00' },
]
export const groupItemDB = [
{ id: 1, group_id: 1, channel_id: 1, step: 1 as const, priority: 10, weight: 0, region: '', carrier: '', keyword: '黑名单过滤' },
{ id: 2, group_id: 1, channel_id: 1, step: 2 as const, priority: 10, weight: 0, region: '广东', carrier: 'mobile', keyword: '' },
{ id: 3, group_id: 1, channel_id: 1, step: 3 as const, priority: 0, weight: 70, region: '', carrier: '', keyword: '' },
{ id: 4, group_id: 1, channel_id: 2, step: 3 as const, priority: 0, weight: 20, region: '', carrier: '', keyword: '' },
{ id: 5, group_id: 1, channel_id: 2, step: 4 as const, priority: 0, weight: 0, region: '', carrier: '', keyword: '' },
]
export const blacklistDB = [
{ id: 1, mobile: '13800000001', account_id: 0, source: 1, operator: 'admin', created_at: '2026-03-01 10:00:00' },
{ id: 2, mobile: '13912345678', account_id: 1001, source: 2, operator: 'system', created_at: '2026-03-05 14:00:00' },
]
export const whitelistDB = [
{ id: 1, mobile: '13811112222', account_id: 1001, source: 1, operator: 'admin', created_at: '2026-03-02 09:00:00' },
]
export const keywordDB = [
{ id: 1, word: '博彩', level: 1 as const, status: 1, operator: 'admin', created_at: '2026-01-01 00:00:00' },
{ id: 2, word: '发票代开', level: 1 as const, status: 1, operator: 'admin', created_at: '2026-01-01 00:00:00' },
{ id: 3, word: '优惠', level: 2 as const, status: 1, operator: 'admin', created_at: '2026-02-01 00:00:00' },
{ id: 4, word: '会员', level: 3 as const, status: 1, operator: 'admin', created_at: '2026-02-15 00:00:00' },
]
export const freqDB = [
{ id: 1, account_id: 0, dim: 1 as const, window_unit: 1 as const, max_count: 10, status: 1, created_at: '2026-02-01 09:00:00' },
{ id: 2, account_id: 0, dim: 2 as const, window_unit: 2 as const, max_count: 3, status: 1, created_at: '2026-02-10 10:00:00' },
]
export const blockedCodeDB = [
{ id: 1, channel_id: 1, code: '1069012345', remark: '测试屏蔽', created_at: '2026-03-01 12:00:00' },
]
export const routeRuleDB = [
{ id: 1, account_id: 0, channel_id: 3, rule_type: 'keyword' as const, rule_config: 'VIP', priority: 100, status: 1, created_at: '2026-02-20 10:00:00' },
{ id: 2, account_id: 0, channel_id: 1, rule_type: 'region' as const, rule_config: '北京,上海', priority: 50, status: 1, created_at: '2026-02-25 14:00:00' },
]