- 新增 credit_limit 表定义和DDL - 修改 accounting_config.py 支持信用额度透支检查 - 新增 creditlimit.py 信用额度管理模块 - 新增信用额度管理界面和CRUD API - 支持设置/查询/更新客户信用额度
145 lines
3.4 KiB
JSON
145 lines
3.4 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "credit_limit",
|
|
"title": "信用额度表",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "accountid",
|
|
"title": "账户ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "orgid",
|
|
"title": "机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "credit_limit",
|
|
"title": "信用额度",
|
|
"type": "float",
|
|
"length": 18,
|
|
"dec": 2,
|
|
"nullable": "no",
|
|
"default": "0.00"
|
|
},
|
|
{
|
|
"name": "used_credit",
|
|
"title": "已用额度",
|
|
"type": "float",
|
|
"length": 18,
|
|
"dec": 2,
|
|
"nullable": "no",
|
|
"default": "0.00"
|
|
},
|
|
{
|
|
"name": "available_credit",
|
|
"title": "可用额度",
|
|
"type": "float",
|
|
"length": 18,
|
|
"dec": 2,
|
|
"nullable": "no",
|
|
"default": "0.00"
|
|
},
|
|
{
|
|
"name": "valid_from",
|
|
"title": "生效日期",
|
|
"type": "date",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "valid_to",
|
|
"title": "失效日期",
|
|
"type": "date",
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "str",
|
|
"length": 10,
|
|
"nullable": "no",
|
|
"default": "active"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "created_by",
|
|
"title": "创建人",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "remark",
|
|
"title": "备注",
|
|
"type": "str",
|
|
"length": 500,
|
|
"nullable": "yes"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_credit_limit_account",
|
|
"idxtype": "unique",
|
|
"idxfields": ["accountid"]
|
|
},
|
|
{
|
|
"name": "idx_credit_limit_orgid",
|
|
"idxtype": "index",
|
|
"idxfields": ["orgid"]
|
|
},
|
|
{
|
|
"name": "idx_credit_limit_status",
|
|
"idxtype": "index",
|
|
"idxfields": ["status"]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "accountid",
|
|
"table": "account",
|
|
"valuefield": "id",
|
|
"textfield": "id"
|
|
},
|
|
{
|
|
"field": "orgid",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='credit_status'"
|
|
}
|
|
]
|
|
}
|