Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tanjunming2020
hello_uni-id-pages
提交
7d910b25
H
hello_uni-id-pages
项目概览
tanjunming2020
/
hello_uni-id-pages
与 Fork 源项目一致
Fork自
DCloud / hello_uni-id-pages
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello_uni-id-pages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7d910b25
编写于
9月 26, 2022
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: update uni-id-users schema
上级
022223ee
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
93 addition
and
68 deletion
+93
-68
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
...s/uni-id-pages/uniCloud/database/uni-id-users.schema.json
+93
-68
未找到文件。
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
浏览文件 @
7d910b25
{
"bsonType"
:
"object"
,
"required"
:
[
"username"
,
"password"
],
"permission"
:
{
"read"
:
true
,
"create"
:
"'CREATE_UNI_ID_USERS' in auth.permission"
,
"update"
:
"doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission"
,
"read"
:
true
,
"create"
:
"'CREATE_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"
},
"properties"
:
{
...
...
@@ -15,28 +14,36 @@
"bsonType"
:
"string"
,
"description"
:
"支付宝平台openid"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"apple_openid"
:
{
"bsonType"
:
"string"
,
"description"
:
"苹果登录openid"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"avatar"
:
{
"bsonType"
:
"string"
,
"description"
:
"头像地址"
,
"title"
:
"头像地址"
,
"trim"
:
"both"
"trim"
:
"both"
,
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_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"
:
{
"bsonType"
:
"file"
,
"description"
:
"用file类型方便使用uni-file-picker组件"
,
"title"
:
"头像文件"
"title"
:
"头像文件"
,
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_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"
:
{
"bsonType"
:
"string"
,
...
...
@@ -44,8 +51,8 @@
"title"
:
"备注"
,
"trim"
:
"both"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
false
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
},
"dcloud_appid"
:
{
...
...
@@ -53,8 +60,8 @@
"description"
:
"允许登录的客户端的appid列表"
,
"foreignKey"
:
"opendb-app-list.appid"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"department_id"
:
{
...
...
@@ -68,8 +75,8 @@
"enumType"
:
"tree"
,
"title"
:
"部门"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"email"
:
{
...
...
@@ -79,8 +86,8 @@
"title"
:
"邮箱"
,
"trim"
:
"both"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"email_confirmed"
:
{
...
...
@@ -98,8 +105,8 @@
],
"title"
:
"邮箱验证状态"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"gender"
:
{
...
...
@@ -121,16 +128,16 @@
],
"title"
:
"性别"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"invite_time"
:
{
"bsonType"
:
"timestamp"
,
"description"
:
"受邀时间"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"inviter_uid"
:
{
...
...
@@ -138,24 +145,24 @@
"description"
:
"用户全部上级邀请者"
,
"trim"
:
"both"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"last_login_date"
:
{
"bsonType"
:
"timestamp"
,
"description"
:
"最后登录时间"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"last_login_ip"
:
{
"bsonType"
:
"string"
,
"description"
:
"最后登录时 IP 地址"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"mobile"
:
{
...
...
@@ -165,8 +172,8 @@
"title"
:
"手机号码"
,
"trim"
:
"both"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"mobile_confirmed"
:
{
...
...
@@ -184,50 +191,50 @@
],
"title"
:
"手机号验证状态"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"my_invite_code"
:
{
"bsonType"
:
"string"
,
"description"
:
"用户自身邀请码"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"nickname"
:
{
"bsonType"
:
"string"
,
"description"
:
"用户昵称"
,
"title"
:
"昵称"
,
"trim"
:
"both"
"trim"
:
"both"
,
"permission"
:
{
"read"
:
"doc._id == auth.uid || 'READ_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"
:
{
"bsonType"
:
"password"
,
"description"
:
"密码,加密存储"
,
"title"
:
"密码"
,
"trim"
:
"both"
,
"permission"
:
{
"write"
:
false
,
"read"
:
false
}
"trim"
:
"both"
},
"password_secret_version"
:
{
"bsonType"
:
"int"
,
"description"
:
"密码使用的passwordSecret版本"
,
"title"
:
"passwordSecret"
,
"permission"
:
{
"
write
"
:
false
,
"
read
"
:
false
"
read
"
:
false
,
"
write
"
:
false
}
},
"realname_auth"
:
{
"bsonType"
:
"object"
,
"description"
:
"实名认证信息"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
}
,
"
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
"
}
"properties"
:
{
"auth_date"
:
{
"bsonType"
:
"timestamp"
,
...
...
@@ -291,16 +298,22 @@
"bsonType"
:
"timestamp"
,
"description"
:
"注册时间"
,
"forceDefaultValue"
:
{
"$env"
:
"now"
,
"read"
:
"doc._id == auth.uid"
"$env"
:
"now"
},
"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"
}
},
"register_ip"
:
{
"bsonType"
:
"string"
,
"description"
:
"注册时 IP 地址"
,
"forceDefaultValue"
:
{
"$env"
:
"clientIP"
,
"read"
:
"doc._id == auth.uid"
"$env"
:
"clientIP"
},
"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"
}
},
"role"
:
{
...
...
@@ -311,9 +324,10 @@
"field"
:
"role_id as value, role_name as text"
},
"foreignKey"
:
"uni-id-roles.role_id"
,
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
},
"title"
:
"角色"
},
...
...
@@ -321,8 +335,8 @@
"bsonType"
:
"int"
,
"description"
:
"用户积分,积分变更记录可参考:uni-id-scores表定义"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
}
},
"status"
:
{
...
...
@@ -330,8 +344,8 @@
"defaultValue"
:
0
,
"description"
:
"用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
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
"
},
"enum"
:
[{
"text"
:
"正常"
,
...
...
@@ -356,7 +370,8 @@
"bsonType"
:
"array"
,
"description"
:
"用户token"
,
"permission"
:
{
"read"
:
"doc._id == auth.uid"
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
},
"username"
:
{
...
...
@@ -365,7 +380,8 @@
"title"
:
"用户名"
,
"trim"
:
"both"
,
"permission"
:
{
"write"
:
false
"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"
}
},
"wx_openid"
:
{
...
...
@@ -390,16 +406,16 @@
}
},
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"wx_unionid"
:
{
"bsonType"
:
"string"
,
"description"
:
"微信unionid"
,
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"qq_openid"
:
{
...
...
@@ -416,17 +432,26 @@
}
},
"permission"
:
{
"
write"
:
false
,
"
read"
:
"doc._id == auth.uid
"
"
read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"
write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission
"
}
},
"qq_unionid"
:
{
"bsonType"
:
"string"
,
"description"
:
"QQ unionid"
,
"permission"
:
{
"write"
:
false
,
"read"
:
"doc._id == auth.uid"
"read"
:
"'READ_UNI_ID_USERS' in auth.permission"
,
"write"
:
"'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
}
},
"third_party"
:
{
"bsonType"
:
"object"
,
"description"
:
"三方平台凭证"
,
"permission"
:
{
"read"
:
false
,
"write"
:
false
}
}
}
},
"required"
:
[]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录