{ "summary": [ { "name": "platform_supply_products", "title": "平台供销产品明细表", "primary": ["id"], "catelog": "relation" } ], "fields": [ { "name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no" }, { "name": "relation_id", "title": "供销关系ID", "type": "str", "length": 32, "nullable": "no" }, { "name": "supplier_org_id", "title": "供应方机构ID", "type": "str", "length": 32, "nullable": "no" }, { "name": "buyer_org_id", "title": "需求方机构ID", "type": "str", "length": 32, "nullable": "no" }, { "name": "source_product_id", "title": "供应方产品ID", "type": "str", "length": 32, "nullable": "no" }, { "name": "supply_price", "title": "供货价", "type": "double", "length": 15, "dec": 4, "nullable": "no", "default": "0" }, { "name": "suggested_retail_price", "title": "建议零售价", "type": "double", "length": 15, "dec": 4 }, { "name": "discount", "title": "折扣率", "type": "double", "length": 5, "dec": 4, "default": "1.0000" }, { "name": "commission_rate", "title": "佣金率", "type": "double", "length": 5, "dec": 4, "default": "0.0000" }, { "name": "min_order_qty", "title": "最小订货量", "type": "int" }, { "name": "status", "title": "状态", "type": "char", "length": 1, "nullable": "no", "default": "1" }, { "name": "remark", "title": "备注", "type": "text" }, { "name": "created_at", "title": "创建时间", "type": "datetime", "nullable": "no" }, { "name": "updated_at", "title": "更新时间", "type": "datetime" } ], "indexes": [ { "name": "idx_psp_relation", "idxtype": "index", "idxfields": ["relation_id"] }, { "name": "idx_psp_supplier_product", "idxtype": "index", "idxfields": ["supplier_org_id", "source_product_id"] }, { "name": "idx_psp_buyer", "idxtype": "index", "idxfields": ["buyer_org_id"] }, { "name": "idx_psp_unique", "idxtype": "unique", "idxfields": ["relation_id", "source_product_id"] } ], "codes": [ { "field": "relation_id", "table": "platform_supply_relations", "valuefield": "id", "textfield": "relation_name" }, { "field": "supplier_org_id", "table": "organization", "valuefield": "id", "textfield": "orgname" }, { "field": "buyer_org_id", "table": "organization", "valuefield": "id", "textfield": "orgname" }, { "field": "source_product_id", "table": "product", "valuefield": "id", "textfield": "product_name" }, { "field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='sc_product_status'" } ] }