补充foreignKey

This commit is contained in:
崔红保 2020-11-10 16:11:13 +08:00
parent cccafe8fa6
commit df1f628b42
6 changed files with 28 additions and 14 deletions

View File

@ -14,11 +14,13 @@
}, },
"goods_id": { "goods_id": {
"bsonType": "string", "bsonType": "string",
"description": "分类 id参考`opendb-mall-categories`表" "description": "分类 id参考`opendb-mall-goods`表",
"foreignKey":"opendb-mall-goods._id"
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "评论者的uid参考 uni-id-users 表" "description": "评论者的uid参考 uni-id-users 表",
"foreignKey":"uni-id-users._id"
}, },
"content": { "content": {
"bsonType": "string", "bsonType": "string",

View File

@ -14,7 +14,8 @@
}, },
"category_id": { "category_id": {
"bsonType": "string", "bsonType": "string",
"description": "分类 id参考`opendb-mall-categories`表" "description": "分类 id参考`opendb-mall-categories`表",
"foreignKey":"opendb-mall-categories._id"
}, },
"goods_sn": { "goods_sn": {
"bsonType": "string", "bsonType": "string",

View File

@ -14,11 +14,13 @@
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "文章作者ID 参考`uni-id-users` 表" "description": "文章作者ID 参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id"
}, },
"category_id": { "category_id": {
"bsonType": "string", "bsonType": "string",
"description": "分类 id参考`uni-news-categories`表" "description": "分类 id参考`uni-news-categories`表",
"foreignKey":"opendb-news-categories._id"
}, },
"title": { "title": {
"bsonType": "string", "bsonType": "string",
@ -84,7 +86,8 @@
}, },
"last_comment_user_id": { "last_comment_user_id": {
"bsonType": "string", "bsonType": "string",
"description": "最后回复用户 id参考`uni-id-users` 表" "description": "最后回复用户 id参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id"
}, },
"avatar": { "avatar": {
"bsonType": "string", "bsonType": "string",

View File

@ -14,14 +14,16 @@
}, },
"article_id": { "article_id": {
"bsonType": "string", "bsonType": "string",
"description": "文章IDopendb-news-posts 表中的`_id`字段" "description": "文章IDopendb-news-posts 表中的`_id`字段",
"foreignKey":"opendb-news-articles._id"
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "评论者ID参考`uni-id-users` 表", "description": "评论者ID参考`uni-id-users` 表",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "uid" "$env": "uid"
} },
"foreignKey":"uni-id-users._id"
}, },
"comment_content": { "comment_content": {
"bsonType": "string", "bsonType": "string",
@ -38,11 +40,13 @@
}, },
"reply_user_id": { "reply_user_id": {
"bsonType": "string", "bsonType": "string",
"description": "被回复的评论用户IDcomment_type为1时有效" "description": "被回复的评论用户IDcomment_type为1时有效",
"foreignKey":"uni-id-users._id"
}, },
"reply_comment_id": { "reply_comment_id": {
"bsonType": "string", "bsonType": "string",
"description": "被回复的评论IDcomment_type为1时有效" "description": "被回复的评论IDcomment_type为1时有效",
"foreignKey":"opendb-news-comments._id"
}, },
"comment_date": { "comment_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -14,14 +14,16 @@
}, },
"article_id": { "article_id": {
"bsonType": "string", "bsonType": "string",
"description": "文章id参考opendb-news-categories表" "description": "文章id参考opendb-news-articles表",
"foreignKey":"opendb-news-articles._id"
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "收藏者id参考uni-id-users表", "description": "收藏者id参考uni-id-users表",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "uid" "$env": "uid"
} },
"foreignKey":"uni-id-users._id"
}, },
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -8,11 +8,13 @@
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "用户id参考uni-id-users表" "description": "用户id参考uni-id-users表",
"foreignKey":"uni-id-users._id"
}, },
"task_id": { "task_id": {
"bsonType": "string", "bsonType": "string",
"description": "任务ID" "description": "任务ID",
"foreignKey":"uni-id-task._id"
}, },
"result": { "result": {
"bsonType": "bool", "bsonType": "bool",