opendb/collection/opendb-contacts/collection.json

70 lines
1.3 KiB
JSON
Raw Normal View History

2020-12-10 18:17:05 +08:00
{
"schema": {
"bsonType": "object",
"permission": {
2020-12-11 11:18:43 +08:00
"read": true,
"create": true,
"update": true,
"delete": true
2020-12-10 18:17:05 +08:00
},
"required": ["username", "mobile"],
"properties": {
"_id": {
"description": "存储文档 ID用户 ID系统自动生成"
},
"username": {
"bsonType": "string",
"title": "用户名",
"description": "用户名,不允许重复",
2020-12-23 20:20:34 +08:00
"order":1,
"trim":"both"
2020-12-10 18:17:05 +08:00
},
"gender": {
"bsonType": "int",
"title": "性别",
"description": "用户性别0 未知 1 男性 2 女性",
"order":2,
"defaultValue": 0,
"enum": [{
"text": "未知",
"value": 0
},
{
"text": "男",
"value": 1
},
{
"text": "女",
"value": 2
}
]
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"order":3,
"description": "手机号码",
2020-12-23 20:20:34 +08:00
"pattern": "^\\+?[0-9-]{3,20}$",
"trim":"both"
2020-12-10 18:17:05 +08:00
},
"email": {
"bsonType": "string",
"format": "email",
"title": "邮箱",
"order":4,
2020-12-23 20:20:34 +08:00
"description": "邮箱地址",
"trim":"both"
2020-12-10 18:17:05 +08:00
},
"comment": {
"bsonType": "string",
"title": "备注",
"order":5,
2020-12-23 20:20:34 +08:00
"description": "备注",
"trim":"both"
2020-12-10 18:17:05 +08:00
}
}
},
"index": []
}