update: 完善默认值,适配表单生成

This commit is contained in:
handongxun 2020-11-23 17:39:09 +08:00
parent 4504a79e1a
commit 86d1450dc0
8 changed files with 92 additions and 58 deletions

View File

@ -1,7 +1,7 @@
{
"schema": {
"bsonType": "object",
"required": ["user_id","content"],
"required": ["user_id", "content"],
"permission": {
"read": false,
"create": false,
@ -19,22 +19,28 @@
"user_name": {
"bsonType": "string",
"description": "用户名或昵称,冗余设计",
"title":"用户"
"title": "用户"
},
"content": {
"bsonType": "string",
"description": "日志内容,如:修改密码",
"title":"内容"
"title": "内容"
},
"ip": {
"bsonType": "string",
"description": "ip地址",
"title": "IP"
"title": "IP",
"forceDefaultValue": {
"$env": "clientIP"
}
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间",
"title": "时间"
"title": "时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},

View File

@ -43,7 +43,10 @@
},
"create_date": {
"bsonType": "timestamp",
"description": "菜单创建时间"
"description": "菜单创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},

View File

@ -15,7 +15,7 @@
"article_id": {
"bsonType": "string",
"description": "文章id参考opendb-news-articles表",
"foreignKey":"opendb-news-articles._id"
"foreignKey": "opendb-news-articles._id"
},
"user_id": {
"bsonType": "string",
@ -23,20 +23,21 @@
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey":"uni-id-users._id"
"foreignKey": "uni-id-users._id"
},
"create_date": {
"bsonType": "timestamp",
"description": "收藏时间"
"description": "收藏时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},
"index": [
{
"index": [{
"IndexName": "article_user_",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"MgoIndexKeys": [{
"Name": "article_id",
"Direction": "1"
},
@ -47,6 +48,5 @@
],
"MgoIsUnique": true
}
}
]
}]
}

View File

@ -12,43 +12,53 @@
},
"name": {
"bsonType": "string",
"description": "收货人"
"description": "收货人",
"title": "收货人"
},
"alias": {
"bsonType": "string",
"description": "别名,例如:家里、公司"
"description": "别名,例如:家里、公司",
"title": "别名"
},
"mobile": {
"bsonType": "string",
"description": "手机号码,加密存储"
"description": "手机号码,加密存储",
"title": "手机号"
},
"mobile_area_code": {
"bsonType": "string",
"description": "国际区号,中国大陆为 +86"
"description": "国际区号,中国大陆为 +86",
"title": "国际区号"
},
"telephone": {
"bsonType": "string",
"description": "电话"
"description": "电话",
"title": "电话"
},
"telephone_area_code": {
"bsonType": "string",
"description": "电话区号"
"description": "电话区号",
"title": "电话区号"
},
"province_code": {
"bsonType": "string",
"description": "省级编码"
"description": "省级编码",
"title": "省"
},
"city_code": {
"bsonType": "string",
"description": "地级编码"
"description": "地级编码",
"title": "市"
},
"area_code": {
"bsonType": "string",
"description": "区级编码"
"description": "区级编码",
"title": "区"
},
"address": {
"bsonType": "string",
"description": "详细信息"
"description": "详细信息",
"title": "详细信息"
},
"formatted_address": {
"bsonType": "string",
@ -56,15 +66,18 @@
},
"zip_code": {
"bsonType": "string",
"description": "邮编"
"description": "邮编",
"title": "邮编"
},
"email": {
"bsonType": "string",
"description": "邮箱"
"description": "邮箱",
"title": "邮箱"
},
"default": {
"bsonType": "bool",
"description": "是否为默认地址"
"description": "是否为默认地址",
"title": "默认地址"
}
}
},

View File

@ -32,7 +32,10 @@
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
},
"last_active_date": {
"bsonType": "timestamp",

View File

@ -29,7 +29,10 @@
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},

View File

@ -29,7 +29,10 @@
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},

View File

@ -9,12 +9,12 @@
"user_id": {
"bsonType": "string",
"description": "用户id参考uni-id-users表",
"foreignKey":"uni-id-users._id"
"foreignKey": "uni-id-users._id"
},
"task_id": {
"bsonType": "string",
"description": "任务ID",
"foreignKey":"uni-id-task._id"
"foreignKey": "uni-id-task._id"
},
"result": {
"bsonType": "bool",
@ -26,7 +26,10 @@
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},