提交 1f3a17fe 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新uni-id-users表的schema

上级 a255360c
{ {
"bsonType": "object", "bsonType": "object",
"permission":{ "permission": {
"read":true, "update": "doc._id == auth.uid",
"update":"doc._id == auth.uid" "read": true
}, },
"required": [], "properties": {
"properties": { "_id": {
"_id": { "description": "存储文档 ID(用户 ID),系统自动生成"
"description": "存储文档 ID(用户 ID),系统自动生成" },
}, "ali_openid": {
"username": { "bsonType": "string",
"bsonType": "string", "description": "支付宝平台openid",
"title": "用户名", "permission": {
"description": "用户名,不允许重复", "write": false,
"read": "doc._id == auth.uid"
}
},
"apple_openid": {
"bsonType": "string",
"description": "苹果登录openid",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"avatar": {
"bsonType": "string",
"description": "头像地址",
"title": "头像地址",
"trim": "both"
},
"avatar_file": {
"bsonType": "file",
"description": "用file类型方便使用uni-file-picker组件",
"title": "头像文件"
},
"comment": {
"bsonType": "string",
"description": "备注",
"title": "备注",
"trim": "both", "trim": "both",
"permission":{ "permission": {
"write":false "write": false,
} "read": false
}, }
"password": { },
"bsonType": "password", "dcloud_appid": {
"title": "密码", "bsonType": "array",
"description": "密码,加密存储", "description": "允许登录的客户端的appid列表",
"foreignKey": "opendb-app-list.appid",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"department_id": {
"bsonType": "array",
"description": "部门ID",
"enum": {
"collection": "opendb-department",
"field": "_id as value, name as text",
"orderby": "name asc"
},
"enumType": "tree",
"title": "部门",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"email": {
"bsonType": "string",
"description": "邮箱地址",
"format": "email",
"title": "邮箱",
"trim": "both", "trim": "both",
"permission":{ "permission": {
"write":false "write": false,
"read": "doc._id == auth.uid"
} }
}, },
"password_secret_version": { "email_confirmed": {
"bsonType": "int", "bsonType": "int",
"title": "passwordSecret",
"description": "密码使用的passwordSecret版本",
"permission":{
"write":false
}
},
"nickname": {
"bsonType": "string",
"title": "昵称",
"description": "用户昵称",
"trim": "both"
},
"gender": {
"bsonType": "int",
"title": "性别",
"description": "用户性别:0 未知 1 男性 2 女性",
"defaultValue": 0,
"enum": [{
"text": "未知",
"value": 0
},
{
"text": "男",
"value": 1
},
{
"text": "女",
"value": 2
}
]
},
"status": {
"bsonType": "int",
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
"title": "用户状态",
"defaultValue": 0, "defaultValue": 0,
"permission":{ "description": "邮箱验证状态:0 未验证 1 已验证",
"write":false "enum": [{
}, "text": "未验证",
"enum": [{ "value": 0
"text": "正常", },
"value": 0 {
}, "text": "已验证",
{ "value": 1
"text": "禁用", }
"value": 1
},
{
"text": "审核中",
"value": 2
},
{
"text": "审核拒绝",
"value": 3
}
]
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$",
"trim": "both",
"permission":{
"write":false
}
},
"mobile_confirmed": {
"bsonType": "int",
"description": "手机号验证状态:0 未验证 1 已验证",
"title": "手机号验证状态",
"defaultValue": 0,
"enum": [{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
], ],
"permission":{ "title": "邮箱验证状态",
"write":false "permission": {
} "write": false,
}, "read": "doc._id == auth.uid"
"email": { }
"bsonType": "string", },
"format": "email", "gender": {
"title": "邮箱", "bsonType": "int",
"description": "邮箱地址", "defaultValue": 0,
"trim": "both", "description": "用户性别:0 未知 1 男性 2 女性",
"permission":{ "enum": [{
"write":false "text": "未知",
} "value": 0
}, },
"email_confirmed": { {
"bsonType": "int", "text": "男",
"description": "邮箱验证状态:0 未验证 1 已验证", "value": 1
"title": "邮箱验证状态", },
"defaultValue": 0, {
"enum": [{ "text": "女",
"text": "未验证", "value": 2
"value": 0 }
},
{
"text": "已验证",
"value": 1
}
], ],
"permission":{ "title": "性别",
"write":false "permission": {
} "write": false,
}, "read": "doc._id == auth.uid"
"avatar": { }
"bsonType": "string", },
"title": "头像地址", "invite_time": {
"description": "头像地址", "bsonType": "timestamp",
"trim": "both" "description": "受邀时间",
}, "permission": {
"avatar_file": { "write": false,
"bsonType": "file", "read": "doc._id == auth.uid"
"title": "头像文件", }
"description": "用file类型方便使用uni-file-picker组件" },
}, "inviter_uid": {
"department_id": { "bsonType": "array",
"bsonType": "array", "description": "用户全部上级邀请者",
"description": "部门ID",
"permission":{
"write":false
},
"title": "部门",
"enumType": "tree",
"enum": {
"collection": "opendb-department",
"orderby": "name asc",
"field": "_id as value, name as text"
}
},
"role": {
"bsonType": "array",
"title": "角色",
"description": "用户角色",
"enum": {
"collection": "uni-id-roles",
"field": "role_id as value, role_name as text"
},
"foreignKey": "uni-id-roles.role_id",
"permission": {
"write": false
}
},
"wx_unionid": {
"bsonType": "string",
"description": "微信unionid",
"permission":{
"write":false
}
},
"wx_openid": {
"bsonType": "object",
"description": "微信各个平台openid",
"properties": {
"app-plus": {
"bsonType": "string",
"description": "app平台微信openid"
},
"mp-weixin": {
"bsonType": "string",
"description": "微信小程序平台openid"
}
},
"permission":{
"write":false
}
},
"ali_openid": {
"bsonType": "string",
"description": "支付宝平台openid",
"permission":{
"write":false
}
},
"apple_openid": {
"bsonType": "string",
"description": "苹果登录openid",
"permission":{
"write":false
}
},
"comment": {
"bsonType": "string",
"title": "备注",
"description": "备注",
"trim": "both", "trim": "both",
"permission":{ "permission": {
"write":false "write": false,
} "read": "doc._id == auth.uid"
}, }
"realname_auth": { },
"bsonType": "object", "last_login_date": {
"description": "实名认证信息", "bsonType": "timestamp",
"required": [ "description": "最后登录时间",
"type", "permission": {
"auth_status" "write": false,
"read": "doc._id == auth.uid"
}
},
"last_login_ip": {
"bsonType": "string",
"description": "最后登录时 IP 地址",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"mobile": {
"bsonType": "string",
"description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$",
"title": "手机号码",
"trim": "both",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"mobile_confirmed": {
"bsonType": "int",
"defaultValue": 0,
"description": "手机号验证状态:0 未验证 1 已验证",
"enum": [{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
], ],
"permission":{ "title": "手机号验证状态",
"write":false "permission": {
}, "write": false,
"properties": { "read": "doc._id == auth.uid"
"type": { }
"bsonType": "int", },
"minimum": 0, "my_invite_code": {
"maximum": 1, "bsonType": "string",
"description": "用户类型:0 个人用户 1 企业用户" "description": "用户自身邀请码",
}, "permission": {
"auth_status": { "write": false,
"bsonType": "int", "read": "doc._id == auth.uid"
"minimum": 0, }
"maximum": 3, },
"description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败" "nickname": {
}, "bsonType": "string",
"auth_date": { "description": "用户昵称",
"bsonType": "timestamp", "title": "昵称",
"description": "认证通过时间" "trim": "both"
}, },
"real_name": { "password": {
"bsonType": "string", "bsonType": "password",
"description": "真实姓名/企业名称" "description": "密码,加密存储",
}, "title": "密码",
"identity": { "trim": "both",
"bsonType": "string", "permission": {
"description": "身份证号码/营业执照号码" "write": false,
}, "read": false
"id_card_front": { }
"bsonType": "string", },
"description": "身份证正面照 URL" "password_secret_version": {
}, "bsonType": "int",
"id_card_back": { "description": "密码使用的passwordSecret版本",
"bsonType": "string", "title": "passwordSecret",
"description": "身份证反面照 URL" "permission": {
}, "write": false,
"in_hand": { "read": false
"bsonType": "string", }
"description": "手持身份证照片 URL" },
}, "realname_auth": {
"license": { "bsonType": "object",
"bsonType": "string", "description": "实名认证信息",
"description": "营业执照 URL" "permission": {
}, "write": false,
"contact_person": { "read": "doc._id == auth.uid"
"bsonType": "string",
"description": "联系人姓名"
},
"contact_mobile": {
"bsonType": "string",
"description": "联系人手机号码"
},
"contact_email": {
"bsonType": "string",
"description": "联系人邮箱"
}
}
},
"score": {
"bsonType": "int",
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
"permission":{
"write":false
}
},
"register_date": {
"bsonType": "timestamp",
"description": "注册时间",
"forceDefaultValue": {
"$env": "now"
}, },
"permission":{ "properties": {
"write":false "auth_date": {
} "bsonType": "timestamp",
}, "description": "认证通过时间"
"register_ip": { },
"bsonType": "string", "auth_status": {
"description": "注册时 IP 地址", "bsonType": "int",
"forceDefaultValue": { "description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败",
"$env": "clientIP" "maximum": 3,
"minimum": 0
},
"contact_email": {
"bsonType": "string",
"description": "联系人邮箱"
},
"contact_mobile": {
"bsonType": "string",
"description": "联系人手机号码"
},
"contact_person": {
"bsonType": "string",
"description": "联系人姓名"
},
"id_card_back": {
"bsonType": "string",
"description": "身份证反面照 URL"
},
"id_card_front": {
"bsonType": "string",
"description": "身份证正面照 URL"
},
"identity": {
"bsonType": "string",
"description": "身份证号码/营业执照号码"
},
"in_hand": {
"bsonType": "string",
"description": "手持身份证照片 URL"
},
"license": {
"bsonType": "string",
"description": "营业执照 URL"
},
"real_name": {
"bsonType": "string",
"description": "真实姓名/企业名称"
},
"type": {
"bsonType": "int",
"description": "用户类型:0 个人用户 1 企业用户",
"maximum": 1,
"minimum": 0
}
}, },
"permission":{ "required": [
"write":false "type",
} "auth_status"
}, ]
"last_login_date": { },
"bsonType": "timestamp", "register_date": {
"description": "最后登录时间", "bsonType": "timestamp",
"permission":{ "description": "注册时间",
"write":false "forceDefaultValue": {
} "$env": "now",
}, "read": "doc._id == auth.uid"
"last_login_ip": { }
"bsonType": "string", },
"description": "最后登录时 IP 地址", "register_ip": {
"permission":{ "bsonType": "string",
"write":false "description": "注册时 IP 地址",
} "forceDefaultValue": {
}, "$env": "clientIP",
"token": { "read": "doc._id == auth.uid"
"bsonType": "array", }
},
"role": {
"bsonType": "array",
"description": "用户角色",
"enum": {
"collection": "uni-id-roles",
"field": "role_id as value, role_name as text"
},
"foreignKey": "uni-id-roles.role_id",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
},
"title": "角色"
},
"score": {
"bsonType": "int",
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"status": {
"bsonType": "int",
"defaultValue": 0,
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
},
"enum": [{
"text": "正常",
"value": 0
},
{
"text": "禁用",
"value": 1
},
{
"text": "审核中",
"value": 2
},
{
"text": "审核拒绝",
"value": 3
}
],
"title": "用户状态"
},
"token": {
"bsonType": "array",
"description": "用户token", "description": "用户token",
"permission":{ "permission": {
"write":false "read": "doc._id == auth.uid"
} }
}, },
"inviter_uid": { "username": {
"bsonType": "array", "bsonType": "string",
"description": "用户全部上级邀请者", "description": "用户名,不允许重复",
"title": "用户名",
"trim": "both", "trim": "both",
"permission":{ "permission": {
"write":false "write": false
} }
}, },
"invite_time": { "wx_openid": {
"bsonType": "timestamp", "bsonType": "object",
"description": "受邀时间", "description": "微信各个平台openid",
"permission":{ "properties": {
"write":false "app": {
} "bsonType": "string",
}, "description": "app平台微信openid"
"my_invite_code": { },
"bsonType": "string", "mp": {
"description": "用户自身邀请码", "bsonType": "string",
"permission":{ "description": "微信小程序平台openid"
"write":false },
} "h5": {
} "bsonType": "string",
} "description": "微信公众号登录openid"
},
"web": {
"bsonType": "string",
"description": "PC页面扫码登录openid"
}
},
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"wx_unionid": {
"bsonType": "string",
"description": "微信unionid",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"qq_openid": {
"bsonType": "object",
"description": "QQ各个平台openid",
"properties": {
"app": {
"bsonType": "string",
"description": "app平台QQ openid"
},
"mp": {
"bsonType": "string",
"description": "QQ小程序平台openid"
}
},
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
},
"qq_unionid": {
"bsonType": "string",
"description": "QQ unionid",
"permission": {
"write": false,
"read": "doc._id == auth.uid"
}
}
},
"required": []
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册