参照 llmage 范式(llm主表无ppid + llm_api_map挂ppid + llmusage计费六件套): - 资源主表不带 ppid,定价挂在「资源×用法」映射表上 - 对外统一 resolve_ppid(resource_ref_id, ctx),load 时注册到产品层解析器注册表 - 含 models 四段式/json CRUD/i18n四语言/load_path/init 种子数据
229 lines
5.4 KiB
JSON
229 lines
5.4 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "acctres_usage",
|
|
"title": "账号资源用量",
|
|
"primary": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "spec_id",
|
|
"title": "规格ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "charge_mode",
|
|
"title": "计费方式",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "subscription_id",
|
|
"title": "订购ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "userid",
|
|
"title": "用户ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "userorgid",
|
|
"title": "用户机构",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "use_date",
|
|
"title": "使用日期",
|
|
"type": "date",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "use_time",
|
|
"title": "使用时间",
|
|
"type": "timestamp",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "period_start",
|
|
"title": "计费周期起",
|
|
"type": "date",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "period_end",
|
|
"title": "计费周期止",
|
|
"type": "date",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "quantity",
|
|
"title": "数量",
|
|
"type": "double",
|
|
"length": 18,
|
|
"dec": 4,
|
|
"nullable": "yes",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "usages",
|
|
"title": "用量信息JSON",
|
|
"type": "text",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "transno",
|
|
"title": "交易号",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"title": "交易金额",
|
|
"type": "double",
|
|
"length": 18,
|
|
"dec": 4,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "amount_currency",
|
|
"title": "计费币种",
|
|
"type": "str",
|
|
"length": 8,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "amount_base",
|
|
"title": "折本位币金额",
|
|
"type": "double",
|
|
"length": 18,
|
|
"dec": 4,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "cost",
|
|
"title": "成本",
|
|
"type": "double",
|
|
"length": 18,
|
|
"dec": 4,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "cost_currency",
|
|
"title": "成本币种",
|
|
"type": "str",
|
|
"length": 8,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "cost_base",
|
|
"title": "折本位币成本",
|
|
"type": "double",
|
|
"length": 18,
|
|
"dec": 4,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "discount_rate",
|
|
"title": "折扣率",
|
|
"type": "double",
|
|
"length": 8,
|
|
"dec": 4,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "accounting_status",
|
|
"title": "记账状态",
|
|
"type": "str",
|
|
"length": 16,
|
|
"nullable": "yes",
|
|
"default": "pending"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "str",
|
|
"length": 16,
|
|
"nullable": "yes",
|
|
"default": "active"
|
|
},
|
|
{
|
|
"name": "org_id",
|
|
"title": "所属机构",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "created_by",
|
|
"title": "创建人",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "timestamp",
|
|
"nullable": "yes"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_au_user",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"userid",
|
|
"use_date"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_au_org",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"userorgid",
|
|
"use_date"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_au_acct",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"accounting_status"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_au_sub",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"subscription_id"
|
|
]
|
|
}
|
|
]
|
|
} |