2020-09-08 14:37:48 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
|
|
|
|
"required": ["user_id", "article_id"],
|
2020-10-27 17:13:08 +08:00
|
|
|
|
"permission": {
|
|
|
|
|
".read": true,
|
|
|
|
|
".create": "auth.uid != null",
|
|
|
|
|
".update": false,
|
|
|
|
|
".delete": "doc.uid == auth.uid"
|
|
|
|
|
},
|
2020-09-08 14:37:48 +08:00
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "ID,系统自动生成"
|
|
|
|
|
},
|
|
|
|
|
"article_id": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "文章id,参考opendb-news-categories表"
|
|
|
|
|
},
|
|
|
|
|
"user_id": {
|
|
|
|
|
"bsonType": "string",
|
2020-10-27 17:17:12 +08:00
|
|
|
|
"description": "收藏者id,参考uni-id-users表",
|
|
|
|
|
"forceDefaultValue": {
|
|
|
|
|
"$env": "uid"
|
|
|
|
|
}
|
2020-10-26 19:08:01 +08:00
|
|
|
|
},
|
|
|
|
|
"create_date": {
|
|
|
|
|
"bsonType": "timestamp",
|
|
|
|
|
"description": "收藏时间"
|
2020-09-08 14:37:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-10-26 19:08:01 +08:00
|
|
|
|
"index": [
|
|
|
|
|
{
|
2020-10-27 17:15:12 +08:00
|
|
|
|
"IndexName": "article_user_",
|
2020-10-26 19:08:01 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
|
|
|
|
"Name": "article_id",
|
|
|
|
|
"Direction": "1"
|
2020-10-27 17:15:12 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"Name": "user_id",
|
|
|
|
|
"Direction": "1"
|
2020-10-26 19:08:01 +08:00
|
|
|
|
}
|
|
|
|
|
],
|
2020-10-27 17:15:12 +08:00
|
|
|
|
"MgoIsUnique": true
|
2020-10-26 19:08:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-09-08 14:37:48 +08:00
|
|
|
|
}
|