financial_management/models/receivables.json
2026-04-16 13:32:15 +08:00

149 lines
3.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"summary": {
"tablename": "receivables",
"label": "应收记录",
"comment": "按订单维度的应收记录管理"
},
"fields": [
{
"name": "id",
"title": "ID",
"type": "str",
"length": 64,
"nullable": false,
"comments": "主键"
},
{
"name": "order_id",
"title": "订单ID",
"type": "str",
"length": 64,
"nullable": false,
"comments": "关联的订单ID"
},
{
"name": "contract_id",
"title": "合同ID",
"type": "str",
"length": 64,
"nullable": false,
"comments": "关联合同ID"
},
{
"name": "customer_id",
"title": "客户ID",
"type": "str",
"length": 64,
"nullable": false,
"comments": "客户ID"
},
{
"name": "receivable_amount",
"title": "应收金额",
"type": "decimal",
"length": "15,2",
"nullable": false,
"comments": "订单应收金额"
},
{
"name": "received_amount",
"title": "已收金额",
"type": "decimal",
"length": "15,2",
"nullable": false,
"comments": "已收款金额默认为0"
},
{
"name": "receivable_date",
"title": "应收日期",
"type": "date",
"nullable": false,
"comments": "应收日期"
},
{
"name": "due_date",
"title": "到期日期",
"type": "date",
"nullable": true,
"comments": "账期到期日期"
},
{
"name": "credit_period",
"title": "账期天数",
"type": "long",
"nullable": true,
"comments": "账期天数"
},
{
"name": "status",
"title": "状态",
"type": "str",
"length": 32,
"nullable": false,
"comments": "状态: pending(待收), partial(部分收款), completed(已完成), overdue(逾期)"
},
{
"name": "sales_owner_id",
"title": "销售负责人",
"type": "str",
"length": 64,
"nullable": true,
"comments": "负责该订单跟进的销售ID"
},
{
"name": "org_id",
"title": "组织ID",
"type": "str",
"length": 64,
"nullable": false,
"comments": "组织ID用于多租户隔离"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"nullable": false,
"comments": "创建时间"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp",
"nullable": false,
"comments": "更新时间"
}
],
"indexes": [
{
"name": "idx_receivables_order_id",
"idxtype": "index",
"columns": ["order_id"]
},
{
"name": "idx_receivables_contract_id",
"idxtype": "index",
"columns": ["contract_id"]
},
{
"name": "idx_receivables_customer_id",
"idxtype": "index",
"columns": ["customer_id"]
},
{
"name": "idx_receivables_status",
"idxtype": "index",
"columns": ["status"]
},
{
"name": "idx_receivables_org_id",
"idxtype": "index",
"columns": ["org_id"]
},
{
"name": "idx_receivables_due_date",
"idxtype": "index",
"columns": ["due_date"]
}
],
"codes": []
}