--- name: us-domain-field-mapping description: 美国版 Region/Group/Partner/Location 字段映射。在涉及 Region、区域、GroupName、location 门店、fl_group、product-category region 出参、报表筛选 partnerId/groupId 时使用。 --- # 美国版领域字段映射 ## 何时使用 - 用户或文档提到 **Region、区域、Group、组织** - 编写/查询 `location`、`fl_group`、`fl_partner` 相关 SQL 或接口 - 列表展示 `region` 字段、筛选 `groupId` / `groupName` ## 固定规则 | 概念 | 库表/字段 | |------|-----------| | 公司 | `fl_partner`;门店冗余 `location.Partner`(公司**名称**) | | **区域(Region)** | 主数据 `fl_group.GroupName`;门店冗余 **`location.GroupName`** | | 门店 | `location`(`LocationCode`、`LocationName`) | **Region = `location.GroupName`**(不是单独 `Region` 列)。 - UI 文案 **Region** ↔ 代码/库 **`GroupName`** - 与 `fl_group` 对齐方式:`location.Partner` + `location.GroupName` 匹配 `fl_partner` + `fl_group.GroupName` - 接口 JSON 可用 camelCase `region` 作**展示字段**,读写门店仍用 `groupName` / `GroupName` ## 禁止 - 不要在 `location` 表新增 `Region` 列(与 `GroupName` 重复) - 不要把 `location.StateCode`(美国州 NY)与 Region(区域)混淆 ## 参考 `.codex/project/project-context.md` 第 7 节