63 lines
1.5 KiB
JSON
63 lines
1.5 KiB
JSON
{
|
||
"bsonType": "object",
|
||
"required": [],
|
||
"properties": {
|
||
"_id": {
|
||
"description": "记录ID,系统自动生成",
|
||
"bsonType": "string"
|
||
},
|
||
"user_id": {
|
||
"bsonType": "string",
|
||
"title": "用户ID",
|
||
"description": "关联 uni-id-users._id",
|
||
"foreignKey": "uni-id-users._id"
|
||
},
|
||
"type": {
|
||
"bsonType": "string",
|
||
"title": "变动类型",
|
||
"description": "earn=获得 spend=消耗",
|
||
"enum": [
|
||
{ "text": "获得", "value": "earn" },
|
||
{ "text": "消耗", "value": "spend" }
|
||
]
|
||
},
|
||
"amount": {
|
||
"bsonType": "number",
|
||
"title": "变动数量",
|
||
"description": "正数为获得,负数为消耗"
|
||
},
|
||
"balance_after": {
|
||
"bsonType": "number",
|
||
"title": "变动后余额",
|
||
"description": "本次变动后的积分余额"
|
||
},
|
||
"reason": {
|
||
"bsonType": "string",
|
||
"title": "变动原因",
|
||
"description": "如:新用户赠送、积分充值、合同审查消耗",
|
||
"trim": "both"
|
||
},
|
||
"biz_type": {
|
||
"bsonType": "string",
|
||
"title": "业务类型",
|
||
"description": "关联的业务类型",
|
||
"enum": [
|
||
{ "text": "赠送", "value": "gift" },
|
||
{ "text": "充值", "value": "recharge" },
|
||
{ "text": "合同审查", "value": "contract_review" },
|
||
{ "text": "签到", "value": "checkin" },
|
||
{ "text": "其他", "value": "other" }
|
||
]
|
||
},
|
||
"biz_id": {
|
||
"bsonType": "string",
|
||
"title": "业务ID",
|
||
"description": "关联的业务记录ID(如订单ID)"
|
||
},
|
||
"_add_time": {
|
||
"bsonType": "date",
|
||
"title": "创建时间",
|
||
"description": "记录创建时间,系统自动填充"
|
||
}
|
||
}
|
||
} |