Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-im
提交
0d77907a
H
hello uni-im
项目概览
DCloud
/
hello uni-im
通知
2544
Star
37
Fork
16
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-im
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
0d77907a
编写于
11月 06, 2024
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新 uni-id-pages 默认的 users 表的表结构,将email和realname_auth两个字段的权限校验放到触发器内处理
上级
56cae527
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
473 addition
and
473 deletion
+473
-473
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
...s/uni-id-pages/uniCloud/database/uni-id-users.schema.json
+473
-473
未找到文件。
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
浏览文件 @
0d77907a
{
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"permission"
:
{
"permission"
:
{
"read"
:
true
,
"read"
:
true
,
"create"
:
"'CREATE_UNI_ID_USERS' in auth.permission"
,
"create"
:
"'CREATE_UNI_ID_USERS' in auth.permission"
,
"update"
:
"doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission"
,
"update"
:
"doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission"
,
"delete"
:
"'DELETE_UNI_ID_USERS' in auth.permission"
"delete"
:
"'DELETE_UNI_ID_USERS' in auth.permission"
},
},
"properties"
:
{
"properties"
:
{
"_id"
:
{
"_id"
:
{
"description"
:
"存储文档 ID(用户 ID),系统自动生成"
"description"
:
"存储文档 ID(用户 ID),系统自动生成"
},
},
"ali_openid"
:
{
"ali_openid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"支付宝平台openid"
,
"description"
:
"支付宝平台openid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"apple_openid"
:
{
"apple_openid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"苹果登录openid"
,
"description"
:
"苹果登录openid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"avatar"
:
{
"avatar"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"头像地址"
,
"description"
:
"头像地址"
,
"title"
:
"头像地址"
,
"title"
:
"头像地址"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
true
,
"read"
:
true
,
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"avatar_file"
:
{
"avatar_file"
:
{
"bsonType"
:
"file"
,
"bsonType"
:
"file"
,
"description"
:
"用file类型方便使用uni-file-picker组件"
,
"description"
:
"用file类型方便使用uni-file-picker组件"
,
"title"
:
"头像文件"
,
"title"
:
"头像文件"
,
"permission"
:
{
"permission"
:
{
"read"
:
true
,
"read"
:
true
,
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"comment"
:
{
"comment"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"备注"
,
"description"
:
"备注"
,
"title"
:
"备注"
,
"title"
:
"备注"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"dcloud_appid"
:
{
"dcloud_appid"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"允许登录的客户端的appid列表"
,
"description"
:
"允许登录的客户端的appid列表"
,
"foreignKey"
:
"opendb-app-list.appid"
,
"foreignKey"
:
"opendb-app-list.appid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"department_id"
:
{
"department_id"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"部门ID"
,
"description"
:
"部门ID"
,
"enum"
:
{
"enum"
:
{
"collection"
:
"opendb-department"
,
"collection"
:
"opendb-department"
,
"field"
:
"_id as value, name as text"
,
"field"
:
"_id as value, name as text"
,
"orderby"
:
"name asc"
"orderby"
:
"name asc"
},
},
"enumType"
:
"tree"
,
"enumType"
:
"tree"
,
"title"
:
"部门"
,
"title"
:
"部门"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"email"
:
{
"email"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"邮箱地址"
,
"description"
:
"邮箱地址"
,
"format"
:
"email"
,
"format"
:
"email"
,
"title"
:
"邮箱"
,
"title"
:
"邮箱"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
true
,
//
在触发器内会拦截,只有特定员才能读取
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"email_confirmed"
:
{
"email_confirmed"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"邮箱验证状态:0 未验证 1 已验证"
,
"description"
:
"邮箱验证状态:0 未验证 1 已验证"
,
"enum"
:
[{
"enum"
:
[{
"text"
:
"未验证"
,
"text"
:
"未验证"
,
"value"
:
0
"value"
:
0
},
},
{
{
"text"
:
"已验证"
,
"text"
:
"已验证"
,
"value"
:
1
"value"
:
1
}
}
],
],
"title"
:
"邮箱验证状态"
,
"title"
:
"邮箱验证状态"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"gender"
:
{
"gender"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"用户性别:0 未知 1 男性 2 女性"
,
"description"
:
"用户性别:0 未知 1 男性 2 女性"
,
"enum"
:
[{
"enum"
:
[{
"text"
:
"未知"
,
"text"
:
"未知"
,
"value"
:
0
"value"
:
0
},
},
{
{
"text"
:
"男"
,
"text"
:
"男"
,
"value"
:
1
"value"
:
1
},
},
{
{
"text"
:
"女"
,
"text"
:
"女"
,
"value"
:
2
"value"
:
2
}
}
],
],
"title"
:
"性别"
,
"title"
:
"性别"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"invite_time"
:
{
"invite_time"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"timestamp"
,
"description"
:
"受邀时间"
,
"description"
:
"受邀时间"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"inviter_uid"
:
{
"inviter_uid"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"用户全部上级邀请者"
,
"description"
:
"用户全部上级邀请者"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"last_login_date"
:
{
"last_login_date"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"timestamp"
,
"description"
:
"最后登录时间"
,
"description"
:
"最后登录时间"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"last_login_ip"
:
{
"last_login_ip"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"最后登录时 IP 地址"
,
"description"
:
"最后登录时 IP 地址"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"mobile"
:
{
"mobile"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"手机号码"
,
"description"
:
"手机号码"
,
"pattern"
:
"^
\\
+?[0-9-]{3,20}$"
,
"pattern"
:
"^
\\
+?[0-9-]{3,20}$"
,
"title"
:
"手机号码"
,
"title"
:
"手机号码"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"mobile_confirmed"
:
{
"mobile_confirmed"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"手机号验证状态:0 未验证 1 已验证"
,
"description"
:
"手机号验证状态:0 未验证 1 已验证"
,
"enum"
:
[{
"enum"
:
[{
"text"
:
"未验证"
,
"text"
:
"未验证"
,
"value"
:
0
"value"
:
0
},
},
{
{
"text"
:
"已验证"
,
"text"
:
"已验证"
,
"value"
:
1
"value"
:
1
}
}
],
],
"title"
:
"手机号验证状态"
,
"title"
:
"手机号验证状态"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"my_invite_code"
:
{
"my_invite_code"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"用户自身邀请码"
,
"description"
:
"用户自身邀请码"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"nickname"
:
{
"nickname"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"用户昵称"
,
"description"
:
"用户昵称"
,
"title"
:
"昵称"
,
"title"
:
"昵称"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
true
,
"read"
:
true
,
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"password"
:
{
"password"
:
{
"bsonType"
:
"password"
,
"bsonType"
:
"password"
,
"description"
:
"密码,加密存储"
,
"description"
:
"密码,加密存储"
,
"title"
:
"密码"
,
"title"
:
"密码"
,
"trim"
:
"both"
"trim"
:
"both"
},
},
"password_secret_version"
:
{
"password_secret_version"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"密码使用的passwordSecret版本"
,
"description"
:
"密码使用的passwordSecret版本"
,
"title"
:
"passwordSecret"
,
"title"
:
"passwordSecret"
,
"permission"
:
{
"permission"
:
{
"read"
:
false
,
"read"
:
false
,
"write"
:
false
"write"
:
false
}
}
},
},
"realname_auth"
:
{
"realname_auth"
:
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"description"
:
"实名认证信息"
,
"description"
:
"实名认证信息"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
true
,
//
触发器内限制
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
},
},
"properties"
:
{
"properties"
:
{
"auth_date"
:
{
"auth_date"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"timestamp"
,
"description"
:
"认证通过时间"
"description"
:
"认证通过时间"
},
},
"auth_status"
:
{
"auth_status"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
,
"description"
:
"认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
,
"maximum"
:
3
,
"maximum"
:
3
,
"minimum"
:
0
"minimum"
:
0
},
},
"contact_email"
:
{
"contact_email"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"联系人邮箱"
"description"
:
"联系人邮箱"
},
},
"contact_mobile"
:
{
"contact_mobile"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"联系人手机号码"
"description"
:
"联系人手机号码"
},
},
"contact_person"
:
{
"contact_person"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"联系人姓名"
"description"
:
"联系人姓名"
},
},
"id_card_back"
:
{
"id_card_back"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证反面照 URL"
"description"
:
"身份证反面照 URL"
},
},
"id_card_front"
:
{
"id_card_front"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证正面照 URL"
"description"
:
"身份证正面照 URL"
},
},
"identity"
:
{
"identity"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"身份证号码/营业执照号码"
"description"
:
"身份证号码/营业执照号码"
},
},
"in_hand"
:
{
"in_hand"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"手持身份证照片 URL"
"description"
:
"手持身份证照片 URL"
},
},
"license"
:
{
"license"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"营业执照 URL"
"description"
:
"营业执照 URL"
},
},
"real_name"
:
{
"real_name"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"真实姓名/企业名称"
"description"
:
"真实姓名/企业名称"
},
},
"type"
:
{
"type"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"用户类型:0 个人用户 1 企业用户"
,
"description"
:
"用户类型:0 个人用户 1 企业用户"
,
"maximum"
:
1
,
"maximum"
:
1
,
"minimum"
:
0
"minimum"
:
0
}
}
},
},
"required"
:
[
"required"
:
[
"type"
,
"type"
,
"auth_status"
"auth_status"
]
]
},
},
"register_date"
:
{
"register_date"
:
{
"bsonType"
:
"timestamp"
,
"bsonType"
:
"timestamp"
,
"description"
:
"注册时间"
,
"description"
:
"注册时间"
,
"forceDefaultValue"
:
{
"forceDefaultValue"
:
{
"$env"
:
"now"
"$env"
:
"now"
},
},
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"register_ip"
:
{
"register_ip"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"注册时 IP 地址"
,
"description"
:
"注册时 IP 地址"
,
"forceDefaultValue"
:
{
"forceDefaultValue"
:
{
"$env"
:
"clientIP"
"$env"
:
"clientIP"
},
},
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"role"
:
{
"role"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"用户角色"
,
"description"
:
"用户角色"
,
"enum"
:
{
"enum"
:
{
"collection"
:
"uni-id-roles"
,
"collection"
:
"uni-id-roles"
,
"field"
:
"role_id as value, role_name as text"
"field"
:
"role_id as value, role_name as text"
},
},
"foreignKey"
:
"uni-id-roles.role_id"
,
"foreignKey"
:
"uni-id-roles.role_id"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
},
},
"title"
:
"角色"
"title"
:
"角色"
},
},
"tags"
:{
"tags"
:{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"用户标签"
,
"description"
:
"用户标签"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
},
},
"title"
:
"标签"
"title"
:
"标签"
},
},
"score"
:
{
"score"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"description"
:
"用户积分,积分变更记录可参考:uni-id-scores表定义"
,
"description"
:
"用户积分,积分变更记录可参考:uni-id-scores表定义"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"status"
:
{
"status"
:
{
"bsonType"
:
"int"
,
"bsonType"
:
"int"
,
"defaultValue"
:
0
,
"defaultValue"
:
0
,
"description"
:
"用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝"
,
"description"
:
"用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
},
},
"enum"
:
[{
"enum"
:
[{
"text"
:
"正常"
,
"text"
:
"正常"
,
"value"
:
0
"value"
:
0
},
},
{
{
"text"
:
"禁用"
,
"text"
:
"禁用"
,
"value"
:
1
"value"
:
1
},
},
{
{
"text"
:
"审核中"
,
"text"
:
"审核中"
,
"value"
:
2
"value"
:
2
},
},
{
{
"text"
:
"审核拒绝"
,
"text"
:
"审核拒绝"
,
"value"
:
3
"value"
:
3
}
}
],
],
"title"
:
"用户状态"
"title"
:
"用户状态"
},
},
"token"
:
{
"token"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"用户token"
,
"description"
:
"用户token"
,
"permission"
:
{
"permission"
:
{
"read"
:
false
,
"read"
:
false
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"username"
:
{
"username"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"用户名,不允许重复"
,
"description"
:
"用户名,不允许重复"
,
"title"
:
"用户名"
,
"title"
:
"用户名"
,
"trim"
:
"both"
,
"trim"
:
"both"
,
"permission"
:
{
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"wx_openid"
:
{
"wx_openid"
:
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"description"
:
"微信各个平台openid"
,
"description"
:
"微信各个平台openid"
,
"properties"
:
{
"properties"
:
{
"app"
:
{
"app"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"app平台微信openid"
"description"
:
"app平台微信openid"
},
},
"mp"
:
{
"mp"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"微信小程序平台openid"
"description"
:
"微信小程序平台openid"
},
},
"h5"
:
{
"h5"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"微信公众号登录openid"
"description"
:
"微信公众号登录openid"
},
},
"web"
:
{
"web"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"PC页面扫码登录openid"
"description"
:
"PC页面扫码登录openid"
}
}
},
},
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"wx_unionid"
:
{
"wx_unionid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"微信unionid"
,
"description"
:
"微信unionid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"qq_openid"
:
{
"qq_openid"
:
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"description"
:
"QQ各个平台openid"
,
"description"
:
"QQ各个平台openid"
,
"properties"
:
{
"properties"
:
{
"app"
:
{
"app"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"app平台QQ openid"
"description"
:
"app平台QQ openid"
},
},
"mp"
:
{
"mp"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"QQ小程序平台openid"
"description"
:
"QQ小程序平台openid"
}
}
},
},
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"qq_unionid"
:
{
"qq_unionid"
:
{
"bsonType"
:
"string"
,
"bsonType"
:
"string"
,
"description"
:
"QQ unionid"
,
"description"
:
"QQ unionid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
},
},
"third_party"
:
{
"third_party"
:
{
"bsonType"
:
"object"
,
"bsonType"
:
"object"
,
"description"
:
"三方平台凭证"
,
"description"
:
"三方平台凭证"
,
"permission"
:
{
"permission"
:
{
"read"
:
false
,
"read"
:
false
,
"write"
:
false
"write"
:
false
}
}
},
},
"identities"
:
{
"identities"
:
{
"bsonType"
:
"array"
,
"bsonType"
:
"array"
,
"description"
:
"三方平台身份信息;一个对象代表一个身份,参数支持: provider 身份源, userInfo 三方用户信息, openid 三方openid, unionid 三方unionid, uid 三方uid"
,
"description"
:
"三方平台身份信息;一个对象代表一个身份,参数支持: provider 身份源, userInfo 三方用户信息, openid 三方openid, unionid 三方unionid, uid 三方uid"
,
"permission"
:
{
"permission"
:
{
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
}
}
}
},
},
"required"
:
[]
"required"
:
[]
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录