contract-cli-mdm-fields
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecontract-cli MDM Fields
contract-cli MDM Fields
CRITICAL — 开始前 MUST 先读取 ../contract-cli-shared/SKILL.md。
CRITICAL — MUST read ../contract-cli-shared/SKILL.md first before starting.
适用命令
Applicable Commands
contract-cli mdm fields list --biz-line <vendor|legal_entity|vendor_risk>
contract-cli mdm fields list --biz-line <vendor|legal_entity|vendor_risk>
快速决策
Quick Decision-Making
- 需要在写入交易方前确认字段定义:
--biz-line vendor - 需要在写入法人实体前确认字段定义:
--biz-line legal_entity - 需要确认交易方风险字段:,仅适用于 user/MCP 路径
--biz-line vendor_risk - 如果用户想查合同创建枚举,不要走这里,改用
contract enum list
- Need to confirm field definitions before writing vendors:
--biz-line vendor - Need to confirm field definitions before writing legal entities:
--biz-line legal_entity - Need to confirm vendor risk fields: , applicable only to user/MCP paths
--biz-line vendor_risk - If users want to query contract creation enums, do not use this; use instead
contract enum list
关键规则
Key Rules
- 必填
--biz-line - 走
mdm fields list --as user/open-apis/contract/v1/mcp/config/config_list - 走
mdm fields list --as bot/open-apis/mdm/v1/config/config_list - bot 后端当前只接受 /
vendor;CLI 会把 bot 下的legalEntity自动映射为legal_entitylegalEntity - 在 bot 身份下不支持,会在本地报错
vendor_risk - /
--user-id-type仍按共享规则透传,不做本地校验--user-id - 当前只封装字段配置查询,不负责本地校验和字段转换
- 推荐阅读顺序是:
- 先读 references/schema-fields-guide.md 选业务线和查询场景
- 再读 references/schema-biz-lines.md 查 精确值
--biz-line - 最后读 references/commands.md 抄命令示例
- is required
--biz-line - uses
mdm fields list --as user/open-apis/contract/v1/mcp/config/config_list - uses
mdm fields list --as bot/open-apis/mdm/v1/config/config_list - The bot backend currently only accepts /
vendor; the CLI will automatically maplegalEntityunder bot tolegal_entitylegalEntity - is not supported under bot identity and will throw a local error
vendor_risk - /
--user-id-typeare still passed through according to shared rules without local validation--user-id - Currently only field configuration query is encapsulated, local validation and field conversion are not handled
- Recommended reading order:
- First read references/schema-fields-guide.md to select business lines and query scenarios
- Then read references/schema-biz-lines.md to check the exact value of
--biz-line - Finally read references/commands.md to copy command examples
实现来源
Implementation Sources
- internal/cli/schema_command.go
- internal/openplatform/schema/service.go
- references/schema-fields-guide.md
- references/schema-biz-lines.md
- references/commands.md
- internal/cli/schema_command.go
- internal/openplatform/schema/service.go
- references/schema-fields-guide.md
- references/schema-biz-lines.md
- references/commands.md
操作建议
Operation Suggestions
- 未封装写接口前,先用这条命令确认字段结构
- 需要写交易方或法人实体时,等待对应结构化写命令开放;不要退回 ,该入口当前暂未开放
api call - 只想查合同枚举时,不要走这里
- Before the write interface is encapsulated, use this command to confirm the field structure first
- When needing to write vendors or legal entities, wait for the corresponding structured write command to be released; do not revert to , as this entry is currently not open
api call - When only wanting to query contract enums, do not use this
不要这样做
Do Not Do This
- 不要把 当成数据查询命令
mdm fields list - 不要假设它会自动帮你校验写请求
- Do not treat as a data query command
mdm fields list - Do not assume it will automatically validate your write requests