NGTools/uniCloud-aliyun/database/read-news-log.schema.json
ldeyun 9dbfdc6c71 V1.0.0
微信小程序运行成功;
H5运行成功
2024-09-30 01:30:39 +08:00

36 lines
904 B
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.

{
"bsonType": "object",
"required": ["user_id", "article_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系统自动生成"
},
"article_id": {
"bsonType": "string",
"description": "文章id参考opendb-news-articles表",
"foreignKey": "opendb-news-articles._id"
},
"user_id": {
"bsonType": "string",
"description": "收藏者id参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey": "uni-id-users._id"
},
"last_time": { //设计策略是多次看同一个文章只做一次记录,重复看的文章时间更新为当前时间
"bsonType": "timestamp",
"description": "最后一次看的时间",
"defaultValue": {
"$env": "now"
}
}
}
}