Files
mht.js/uniCloud-aliyun/database/opendb-news-favorite.schema.json
2025-10-22 07:50:31 +08:00

47 lines
1017 B
JSON
Raw Permalink 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"
},
"article_title": {
"bsonType": "string",
"description": "文章标题"
},
"user_id": {
"bsonType": "string",
"description": "收藏者id参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey": "uni-id-users._id"
},
"create_date": {
"bsonType": "timestamp",
"description": "收藏时间",
"forceDefaultValue": {
"$env": "now"
}
},
"update_date": {
"bsonType": "timestamp",
"description": "更新\/修改时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
}