opendb/collection/opendb-news-favorite/collection.json

51 lines
1.1 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", "article_id"],
"permission": {
".read": true,
".create": "auth.uid != null",
".update": false,
".delete": "doc.uid == auth.uid"
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"article_id": {
"bsonType": "string",
"description": "文章id参考opendb-news-categories表"
},
"user_id": {
"bsonType": "string",
"description": "收藏者id参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
}
},
"create_date": {
"bsonType": "timestamp",
"description": "收藏时间"
}
}
},
"index": [
{
"IndexName": "article_user_",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "article_id",
"Direction": "1"
},
{
"Name": "user_id",
"Direction": "1"
}
],
"MgoIsUnique": true
}
}
]
}