Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
德宏大魔王
uni-starter
提交
1f3a17fe
U
uni-starter
项目概览
德宏大魔王
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1f3a17fe
编写于
9月 19, 2022
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新uni-id-users表的schema
上级
a255360c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
416 addition
and
352 deletion
+416
-352
uniCloud-aliyun/database/uni-id-users.schema.json
uniCloud-aliyun/database/uni-id-users.schema.json
+416
-352
未找到文件。
uniCloud-aliyun/database/uni-id-users.schema.json
浏览文件 @
1f3a17fe
{
{
"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),系统自动生成"
},
},
"
username"
:
{
"
ali_openid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"title"
:
"用户名"
,
"description"
:
"支付宝平台openid"
,
"description"
:
"用户名,不允许重复"
,
"permission"
:
{
"trim"
:
"both"
,
"write"
:
false
,
"permission"
:{
"read"
:
"doc._id == auth.uid"
"write"
:
false
}
},
"password"
:
{
"bsonType"
:
"password"
,
"title"
:
"密码"
,
"description"
:
"密码,加密存储"
,
"trim"
:
"both"
,
"permission"
:{
"write"
:
false
}
}
},
},
"
password_secret_version"
:
{
"
apple_openid"
:
{
"bsonType"
:
"
int"
,
"bsonType"
:
"
string"
,
"
title"
:
"passwordSecret"
,
"
description"
:
"苹果登录openid"
,
"
description"
:
"密码使用的passwordSecret版本"
,
"
permission"
:
{
"permission"
:{
"write"
:
false
,
"
write"
:
false
"
read"
:
"doc._id == auth.uid"
}
}
},
},
"
nickname"
:
{
"
avatar"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"
title"
:
"昵称"
,
"
description"
:
"头像地址"
,
"
description"
:
"用户昵称"
,
"
title"
:
"头像地址"
,
"trim"
:
"both"
"trim"
:
"both"
},
},
"gender"
:
{
"avatar_file"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"file"
,
"title"
:
"性别"
,
"description"
:
"用file类型方便使用uni-file-picker组件"
,
"description"
:
"用户性别:0 未知 1 男性 2 女性"
,
"title"
:
"头像文件"
"defaultValue"
:
0
,
"enum"
:
[{
"text"
:
"未知"
,
"value"
:
0
},
{
"text"
:
"男"
,
"value"
:
1
},
},
{
"comment"
:
{
"text"
:
"女"
,
"bsonType"
:
"string"
,
"value"
:
2
"description"
:
"备注"
,
"title"
:
"备注"
,
"trim"
:
"both"
,
"permission"
:
{
"write"
:
false
,
"read"
:
false
}
}
]
},
},
"status"
:
{
"dcloud_appid"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"array"
,
"description"
:
"用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝"
,
"description"
:
"允许登录的客户端的appid列表"
,
"title"
:
"用户状态"
,
"foreignKey"
:
"opendb-app-list.appid"
,
"defaultValue"
:
0
,
"permission"
:
{
"permission"
:{
"write"
:
false
,
"write"
:
false
"read"
:
"doc._id == auth.uid"
},
}
"enum"
:
[{
"text"
:
"正常"
,
"value"
:
0
},
{
"text"
:
"禁用"
,
"value"
:
1
},
},
{
"department_id"
:
{
"text"
:
"审核中"
,
"bsonType"
:
"array"
,
"value"
:
2
"description"
:
"部门ID"
,
"enum"
:
{
"collection"
:
"opendb-department"
,
"field"
:
"_id as value, name as text"
,
"orderby"
:
"name asc"
},
},
{
"enumType"
:
"tree"
,
"text"
:
"审核拒绝"
,
"title"
:
"部门"
,
"value"
:
3
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
]
},
},
"
mobile"
:
{
"
email"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"
title"
:
"手机号码"
,
"
description"
:
"邮箱地址"
,
"
description"
:
"手机号码"
,
"
format"
:
"email"
,
"
pattern"
:
"^
\\
+?[0-9-]{3,20}$"
,
"
title"
:
"邮箱"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:{
"permission"
:
{
"write"
:
false
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"
mobile_confirmed"
:
{
"
email_confirmed"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"手机号验证状态:0 未验证 1 已验证"
,
"title"
:
"手机号验证状态"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"邮箱验证状态:0 未验证 1 已验证"
,
"enum"
:
[{
"enum"
:
[{
"text"
:
"未验证"
,
"text"
:
"未验证"
,
"value"
:
0
"value"
:
0
...
@@ -110,165 +93,172 @@
...
@@ -110,165 +93,172 @@
"value"
:
1
"value"
:
1
}
}
],
],
"permission"
:{
"title"
:
"邮箱验证状态"
,
"write"
:
false
"permission"
:
{
}
"write"
:
false
,
},
"read"
:
"doc._id == auth.uid"
"email"
:
{
"bsonType"
:
"string"
,
"format"
:
"email"
,
"title"
:
"邮箱"
,
"description"
:
"邮箱地址"
,
"trim"
:
"both"
,
"permission"
:{
"write"
:
false
}
}
},
},
"
email_confirmed"
:
{
"
gender"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"邮箱验证状态:0 未验证 1 已验证"
,
"title"
:
"邮箱验证状态"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"用户性别:0 未知 1 男性 2 女性"
,
"enum"
:
[{
"enum"
:
[{
"text"
:
"未
验证"
,
"text"
:
"未
知"
,
"value"
:
0
"value"
:
0
},
},
{
{
"text"
:
"
已验证"
,
"text"
:
"
男"
,
"value"
:
1
"value"
:
1
},
{
"text"
:
"女"
,
"value"
:
2
}
}
],
],
"permission"
:{
"title"
:
"性别"
,
"write"
:
false
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"avatar"
:
{
"invite_time"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"timestamp"
,
"title"
:
"头像地址"
,
"description"
:
"受邀时间"
,
"description"
:
"头像地址"
,
"permission"
:
{
"trim"
:
"both"
"write"
:
false
,
},
"read"
:
"doc._id == auth.uid"
"avatar_file"
:
{
"bsonType"
:
"file"
,
"title"
:
"头像文件"
,
"description"
:
"用file类型方便使用uni-file-picker组件"
},
"department_id"
:
{
"bsonType"
:
"array"
,
"description"
:
"部门ID"
,
"permission"
:{
"write"
:
false
},
"title"
:
"部门"
,
"enumType"
:
"tree"
,
"enum"
:
{
"collection"
:
"opendb-department"
,
"orderby"
:
"name asc"
,
"field"
:
"_id as value, name as text"
}
}
},
},
"
role"
:
{
"
inviter_uid"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"title"
:
"角色"
,
"description"
:
"用户全部上级邀请者"
,
"description"
:
"用户角色"
,
"trim"
:
"both"
,
"enum"
:
{
"collection"
:
"uni-id-roles"
,
"field"
:
"role_id as value, role_name as text"
},
"foreignKey"
:
"uni-id-roles.role_id"
,
"permission"
:
{
"permission"
:
{
"write"
:
false
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"wx_unionid"
:
{
"last_login_date"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"timestamp"
,
"description"
:
"微信unionid"
,
"description"
:
"最后登录时间"
,
"permission"
:{
"permission"
:
{
"write"
:
false
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"wx_openid"
:
{
"last_login_ip"
:
{
"bsonType"
:
"object"
,
"description"
:
"微信各个平台openid"
,
"properties"
:
{
"app-plus"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"app平台微信openid"
"description"
:
"最后登录时 IP 地址"
,
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
},
},
"mp-weixin"
:
{
"mobile"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"微信小程序平台openid"
"description"
:
"手机号码"
,
"pattern"
:
"^
\\
+?[0-9-]{3,20}$"
,
"title"
:
"手机号码"
,
"trim"
:
"both"
,
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"permission"
:{
"mobile_confirmed"
:
{
"write"
:
false
"bsonType"
:
"int"
,
}
"defaultValue"
:
0
,
"description"
:
"手机号验证状态:0 未验证 1 已验证"
,
"enum"
:
[{
"text"
:
"未验证"
,
"value"
:
0
},
},
"ali_openid"
:
{
{
"bsonType"
:
"string"
,
"text"
:
"已验证"
,
"description"
:
"支付宝平台openid"
,
"value"
:
1
"permission"
:{
}
"write"
:
false
],
"title"
:
"手机号验证状态"
,
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"
apple_openid"
:
{
"
my_invite_code"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"苹果登录openid"
,
"description"
:
"用户自身邀请码"
,
"permission"
:{
"permission"
:
{
"write"
:
false
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
}
},
},
"
comment"
:
{
"
nickname"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"title"
:
"备注"
,
"description"
:
"用户昵称"
,
"description"
:
"备注"
,
"title"
:
"昵称"
,
"trim"
:
"both"
},
"password"
:
{
"bsonType"
:
"password"
,
"description"
:
"密码,加密存储"
,
"title"
:
"密码"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:{
"permission"
:
{
"write"
:
false
"write"
:
false
,
"read"
:
false
}
},
"password_secret_version"
:
{
"bsonType"
:
"int"
,
"description"
:
"密码使用的passwordSecret版本"
,
"title"
:
"passwordSecret"
,
"permission"
:
{
"write"
:
false
,
"read"
:
false
}
}
},
},
"realname_auth"
:
{
"realname_auth"
:
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"description"
:
"实名认证信息"
,
"description"
:
"实名认证信息"
,
"required"
:
[
"permission"
:
{
"type"
,
"write"
:
false
,
"auth_status"
"read"
:
"doc._id == auth.uid"
],
"permission"
:{
"write"
:
false
},
},
"properties"
:
{
"properties"
:
{
"type"
:
{
"auth_date"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"timestamp"
,
"minimum"
:
0
,
"description"
:
"认证通过时间"
"maximum"
:
1
,
"description"
:
"用户类型:0 个人用户 1 企业用户"
},
},
"auth_status"
:
{
"auth_status"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"
minimum"
:
0
,
"
description"
:
"认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
,
"maximum"
:
3
,
"maximum"
:
3
,
"
description"
:
"认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
"
minimum"
:
0
},
},
"
auth_date"
:
{
"
contact_email"
:
{
"bsonType"
:
"
timestamp"
,
"bsonType"
:
"
string"
,
"description"
:
"
认证通过时间"
"description"
:
"
联系人邮箱"
},
},
"
real_name"
:
{
"
contact_mobile"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"
真实姓名/企业名称"
"description"
:
"
联系人手机号码"
},
},
"
identity"
:
{
"
contact_person"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证号码/营业执照号码"
"description"
:
"联系人姓名"
},
"id_card_back"
:
{
"bsonType"
:
"string"
,
"description"
:
"身份证反面照 URL"
},
},
"id_card_front"
:
{
"id_card_front"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证正面照 URL"
"description"
:
"身份证正面照 URL"
},
},
"id
_card_back"
:
{
"id
entity"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证
反面照 URL"
"description"
:
"身份证
号码/营业执照号码"
},
},
"in_hand"
:
{
"in_hand"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
...
@@ -278,89 +268,163 @@
...
@@ -278,89 +268,163 @@
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"营业执照 URL"
"description"
:
"营业执照 URL"
},
},
"contact_person"
:
{
"real_name"
:
{
"bsonType"
:
"string"
,
"description"
:
"联系人姓名"
},
"contact_mobile"
:
{
"bsonType"
:
"string"
,
"description"
:
"联系人手机号码"
},
"contact_email"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"联系人邮箱"
"description"
:
"真实姓名/企业名称"
}
}
},
},
"score"
:
{
"type"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"用户积分,积分变更记录可参考:uni-id-scores表定义
"
,
"description"
:
"用户类型:0 个人用户 1 企业用户
"
,
"permission"
:{
"maximum"
:
1
,
"write"
:
false
"minimum"
:
0
}
}
},
},
"required"
:
[
"type"
,
"auth_status"
]
},
"register_date"
:
{
"register_date"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"timestamp"
,
"description"
:
"注册时间"
,
"description"
:
"注册时间"
,
"forceDefaultValue"
:
{
"forceDefaultValue"
:
{
"$env"
:
"now"
"$env"
:
"now"
,
},
"read"
:
"doc._id == auth.uid"
"permission"
:{
"write"
:
false
}
}
},
},
"register_ip"
:
{
"register_ip"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"注册时 IP 地址"
,
"description"
:
"注册时 IP 地址"
,
"forceDefaultValue"
:
{
"forceDefaultValue"
:
{
"$env"
:
"clientIP"
"$env"
:
"clientIP"
,
},
"read"
:
"doc._id == auth.uid"
"permission"
:{
"write"
:
false
}
}
},
},
"last_login_date"
:
{
"role"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"array"
,
"description"
:
"最后登录时间"
,
"description"
:
"用户角色"
,
"permission"
:{
"enum"
:
{
"write"
:
false
"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"
}
}
},
},
"last_login_ip"
:
{
"status"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"int"
,
"description"
:
"最后登录时 IP 地址"
,
"defaultValue"
:
0
,
"permission"
:{
"description"
:
"用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝"
,
"write"
:
false
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
},
"enum"
:
[{
"text"
:
"正常"
,
"value"
:
0
},
{
"text"
:
"禁用"
,
"value"
:
1
},
{
"text"
:
"审核中"
,
"value"
:
2
},
{
"text"
:
"审核拒绝"
,
"value"
:
3
}
}
],
"title"
:
"用户状态"
},
},
"token"
:
{
"token"
:
{
"bsonType"
:
"array"
,
"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"
},
"mp"
:
{
"bsonType"
:
"string"
,
"description"
:
"微信小程序平台openid"
},
"h5"
:
{
"bsonType"
:
"string"
,
"description"
:
"微信公众号登录openid"
},
"web"
:
{
"bsonType"
:
"string"
,
"description"
:
"PC页面扫码登录openid"
}
}
},
},
"my_invite_code"
:
{
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
}
},
"wx_unionid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"用户自身邀请码"
,
"description"
:
"微信unionid"
,
"permission"
:{
"permission"
:
{
"write"
:
false
"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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录