opendb/collection/uni-cms-unlock-record/collection.json
2023-04-03 12:04:27 +08:00

68 lines
1.5 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.

{
"schema": {
"bsonType": "object",
"required": [
"user_id",
"trans_id",
"content_id"
],
"permission": {
"read": "doc.user_id == auth.uid",
"create": "auth.uid != null",
"update": "doc.user_id == auth.uid",
"delete": "doc.user_id == auth.uid"
},
"properties": {
"_id": {
"description": "存储文档 ID用户 ID系统自动生成"
},
"user_id": {
"bsonType": "string",
"description": "用户ID 参考`uni-id-users` 表",
"foreignKey": "uni-id-users._id",
"defaultValue": {
"$env": "uid"
}
},
"trans_id": {
"bsonType": "string",
"title": "交易ID",
"description": "广告回调传回的交易ID",
"label": "内容id",
"trim": "both"
},
"content_id": {
"bsonType": "string",
"title": "内容id",
"description": "内容(文章)ID",
"label": "内容id",
"trim": "both"
},
"create_date": {
"bsonType": "timestamp",
"title": "创建时间",
"description": "创建时间",
"defaultValue": {
"$env": "now"
}
}
}
},
"index": [{
"IndexName": "user_article_trans_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "user_id",
"Direction": "1"
},{
"Name": "article_id",
"Direction": "1"
},{
"Name": "trans_id",
"Direction": "1"
}],
"MgoIsUnique": false
}
}]
}