Files
order_site/apps/backend/src/services/cost-center/cost-center-shared.ts
T
yml2213 f4e0c47744 feat(cost-center): 第三方卡券渠道归一与采购价配置
- 归一新增 tpv:<SKU> 直达,卡券单无需手工映射
- 成本配置/总览/异常支持 third_party_voucher 与 archived 维度
- 新增卡券采购价面板,写入 sys_third_party_voucher_cost
- 修正 man: 商品改价误用不存在的 sys_manual_cost
2026-10-31 19:52:32 +08:00

23 lines
1.0 KiB
TypeScript

/**
* 成本中心共享层入口。
*
* 口径(2026-10-23 重写):
* 1. 履约渠道只有 order_items.fulfillment_channel/status 一个真源;
* 2. 成本项用 cost_model 表达「成本怎么算」,与履约方式正交;
* 3. 商品来源由 canonical_sku 前缀推导,商品表不再存履约载体;
* 4. 快照与异常表都不再存履约载体,join order_items 即可拿到。
*
* 2026-10-25 拆分:804 行的共享层按职责拆成四个模块,本文件只做统一出口,
* 既有 import 保持不变:
* - cost-center-constants.ts 枚举、常量、SQL 片段
* - cost-center-types.ts 行结构与 DTO 类型
* - cost-center-mappers.ts 行映射与口径判断
* - cost-center-normalizers.ts 入参归一化与断言
*
* 新代码可以直接从对应模块导入;跨模块批量引用时才用本入口。
*/
export * from './cost-center-constants.js'
export * from './cost-center-mappers.js'
export * from './cost-center-normalizers.js'
export * from './cost-center-types.js'