首次完整推送,
V:1.20240808.006
This commit is contained in:
@ -0,0 +1,142 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": false,
|
||||
"create": true,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"appid": {
|
||||
"bsonType": "string",
|
||||
"description": "DCloud appid"
|
||||
},
|
||||
"device_id": {
|
||||
"bsonType": "string",
|
||||
"description": "设备唯一标识"
|
||||
},
|
||||
"vendor": {
|
||||
"bsonType": "string",
|
||||
"description": "设备厂商"
|
||||
},
|
||||
"push_clientid": {
|
||||
"bsonType": "string",
|
||||
"description": "推送设备客户端标识"
|
||||
},
|
||||
"imei": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||
},
|
||||
"oaid": {
|
||||
"bsonType": "string",
|
||||
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||
},
|
||||
"idfa": {
|
||||
"bsonType": "string",
|
||||
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||
},
|
||||
"imsi": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动用户识别码(International Mobile Subscriber Identification Number)"
|
||||
},
|
||||
"model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备型号"
|
||||
},
|
||||
"platform": {
|
||||
"bsonType": "string",
|
||||
"description": "平台类型"
|
||||
},
|
||||
"uni_platform": {
|
||||
"bsonType": "string",
|
||||
"description": "uni-app 运行平台,与条件编译平台相同。"
|
||||
},
|
||||
"os_name": {
|
||||
"bsonType": "string",
|
||||
"description": "ios|android|windows|mac|linux "
|
||||
},
|
||||
"os_version": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统版本号 "
|
||||
},
|
||||
"os_language": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统语言 "
|
||||
},
|
||||
"os_theme": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统主题 light|dark"
|
||||
},
|
||||
"pixel_ratio": {
|
||||
"bsonType": "string",
|
||||
"description": "设备像素比 "
|
||||
},
|
||||
"network_model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备网络型号wifi\/3G\/4G\/"
|
||||
},
|
||||
"window_width": {
|
||||
"bsonType": "string",
|
||||
"description": "设备窗口宽度 "
|
||||
},
|
||||
"window_height": {
|
||||
"bsonType": "string",
|
||||
"description": "设备窗口高度"
|
||||
},
|
||||
"screen_width": {
|
||||
"bsonType": "string",
|
||||
"description": "设备屏幕宽度"
|
||||
},
|
||||
"screen_height": {
|
||||
"bsonType": "string",
|
||||
"description": "设备屏幕高度"
|
||||
},
|
||||
"rom_name": {
|
||||
"bsonType": "string",
|
||||
"description": "rom 名称"
|
||||
},
|
||||
"rom_version": {
|
||||
"bsonType": "string",
|
||||
"description": "rom 版本"
|
||||
},
|
||||
"location_latitude": {
|
||||
"bsonType": "double",
|
||||
"description": "纬度"
|
||||
},
|
||||
"location_longitude": {
|
||||
"bsonType": "double",
|
||||
"description": "经度"
|
||||
},
|
||||
"location_country": {
|
||||
"bsonType": "string",
|
||||
"description": "国家"
|
||||
},
|
||||
"location_province": {
|
||||
"bsonType": "string",
|
||||
"description": "省份"
|
||||
},
|
||||
"location_city": {
|
||||
"bsonType": "string",
|
||||
"description": "城市"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"last_update_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最后一次修改时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"permission": {
|
||||
"read": "doc._id == auth.uid || '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",
|
||||
"delete": "'DELETE_UNI_ID_USERS' in auth.permission"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID(用户 ID),系统自动生成"
|
||||
},
|
||||
"certify_id": {
|
||||
"bsonType": "string",
|
||||
"description": "认证id"
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"description": "用户id"
|
||||
},
|
||||
"real_name": {
|
||||
"bsonType": "string",
|
||||
"description": "姓名"
|
||||
},
|
||||
"identity": {
|
||||
"bsonType": "string",
|
||||
"description": "身份证号码"
|
||||
},
|
||||
"status": {
|
||||
"bsonType": "int",
|
||||
"description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败",
|
||||
"maximum": 3,
|
||||
"minimum": 0
|
||||
},
|
||||
"created_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": [
|
||||
"user_id"
|
||||
],
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"description": "用户id,参考uni-id-users表"
|
||||
},
|
||||
"ua": {
|
||||
"bsonType": "string",
|
||||
"description": "userAgent"
|
||||
},
|
||||
"uuid": {
|
||||
"bsonType": "string",
|
||||
"description": "设备唯一标识(需要加密存储)"
|
||||
},
|
||||
"os_name": {
|
||||
"bsonType": "string",
|
||||
"description": "ios|android|windows|mac|linux "
|
||||
},
|
||||
"os_version": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统版本号 "
|
||||
},
|
||||
"os_language": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统语言 "
|
||||
},
|
||||
"os_theme": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统主题 light|dark"
|
||||
},
|
||||
"vendor": {
|
||||
"bsonType": "string",
|
||||
"description": "设备厂商"
|
||||
},
|
||||
"push_clientid": {
|
||||
"bsonType": "string",
|
||||
"description": "推送设备客户端标识"
|
||||
},
|
||||
"imei": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||
},
|
||||
"oaid": {
|
||||
"bsonType": "string",
|
||||
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||
},
|
||||
"idfa": {
|
||||
"bsonType": "string",
|
||||
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||
},
|
||||
"model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备型号"
|
||||
},
|
||||
"platform": {
|
||||
"bsonType": "string",
|
||||
"description": "平台类型"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"last_active_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最后登录时间"
|
||||
},
|
||||
"last_active_ip": {
|
||||
"bsonType": "string",
|
||||
"description": "最后登录IP"
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": ["user_id"],
|
||||
"permission": {
|
||||
"read": "'READ_UNI_ID_LOG' in auth.permission"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"device_uuid": {
|
||||
"bsonType": "string",
|
||||
"description": "设备唯一标识"
|
||||
},
|
||||
"ip": {
|
||||
"bsonType": "string",
|
||||
"description": "ip地址"
|
||||
},
|
||||
"state": {
|
||||
"bsonType": "int",
|
||||
"description": "结果:0 失败、1 成功"
|
||||
},
|
||||
"type": {
|
||||
"bsonType": "string",
|
||||
"description": "操作类型",
|
||||
"enum": [
|
||||
"logout",
|
||||
"login",
|
||||
"register",
|
||||
"reset-pwd",
|
||||
"bind-mobile",
|
||||
"bind-weixin",
|
||||
"bind-qq",
|
||||
"bind-apple",
|
||||
"bind-alipay"
|
||||
]
|
||||
},
|
||||
"ua": {
|
||||
"bsonType": "string",
|
||||
"description": "userAgent"
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"foreignKey": "uni-id-users._id",
|
||||
"description": "用户id,参考uni-id-users表"
|
||||
},
|
||||
"username": {
|
||||
"bsonType": "string",
|
||||
"description": "用户名"
|
||||
},
|
||||
"email": {
|
||||
"bsonType": "string",
|
||||
"description": "邮箱"
|
||||
},
|
||||
"mobile": {
|
||||
"bsonType": "string",
|
||||
"description": "手机号"
|
||||
},
|
||||
"appid": {
|
||||
"bsonType": "string",
|
||||
"description": "客户端DCloud AppId"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": ["permission_id", "permission_name"],
|
||||
"permission": {
|
||||
"read": "'READ_UNI_ID_PERMISSIONS' in auth.permission",
|
||||
"create": "'CREATE_UNI_ID_PERMISSIONS' in auth.permission",
|
||||
"update": "'UPDATE_UNI_ID_PERMISSIONS' in auth.permission",
|
||||
"delete": "'DELETE_UNI_ID_PERMISSIONS' in auth.permission"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID,系统自动生成"
|
||||
},
|
||||
"comment": {
|
||||
"bsonType": "string",
|
||||
"component": {
|
||||
"name": "textarea"
|
||||
},
|
||||
"description": "备注",
|
||||
"label": "备注",
|
||||
"title": "备注",
|
||||
"trim": "both"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"permission_id": {
|
||||
"bsonType": "string",
|
||||
"component": {
|
||||
"name": "input"
|
||||
},
|
||||
"description": "权限唯一标识,不可修改,不允许重复",
|
||||
"label": "权限标识",
|
||||
"title": "权限ID",
|
||||
"trim": "both"
|
||||
},
|
||||
"permission_name": {
|
||||
"bsonType": "string",
|
||||
"component": {
|
||||
"name": "input"
|
||||
},
|
||||
"description": "权限名称",
|
||||
"label": "权限名称",
|
||||
"title": "权限名称",
|
||||
"trim": "both"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": ["role_id", "role_name"],
|
||||
"permission": {
|
||||
"read": "'READ_UNI_ID_ROLES' in auth.permission",
|
||||
"create": "'CREATE_UNI_ID_ROLES' in auth.permission",
|
||||
"update": "'UPDATE_UNI_ID_ROLES' in auth.permission",
|
||||
"delete": "'DELETE_UNI_ID_ROLES' in auth.permission"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID,系统自动生成"
|
||||
},
|
||||
"comment": {
|
||||
"title": "备注",
|
||||
"bsonType": "string",
|
||||
"description": "备注",
|
||||
"trim": "both"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"title": "权限",
|
||||
"bsonType": "array",
|
||||
"foreignKey": "uni-id-permissions.permission_id",
|
||||
"description": "角色拥有的权限列表",
|
||||
"enum": {
|
||||
"collection": "uni-id-permissions",
|
||||
"field": "permission_name as text, permission_id as value"
|
||||
}
|
||||
},
|
||||
"role_id": {
|
||||
"title": "唯一ID",
|
||||
"bsonType": "string",
|
||||
"description": "角色唯一标识,不可修改,不允许重复",
|
||||
"trim": "both"
|
||||
},
|
||||
"role_name": {
|
||||
"title": "名称",
|
||||
"bsonType": "string",
|
||||
"description": "角色名称",
|
||||
"trim": "both"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,473 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"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": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID(用户 ID),系统自动生成"
|
||||
},
|
||||
"ali_openid": {
|
||||
"bsonType": "string",
|
||||
"description": "支付宝平台openid",
|
||||
"permission": {
|
||||
"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": {
|
||||
"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",
|
||||
"permission": {
|
||||
"read": true,
|
||||
"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": "头像文件",
|
||||
"permission": {
|
||||
"read": true,
|
||||
"write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"bsonType": "string",
|
||||
"description": "备注",
|
||||
"title": "备注",
|
||||
"trim": "both",
|
||||
"permission": {
|
||||
"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": {
|
||||
"bsonType": "array",
|
||||
"description": "允许登录的客户端的appid列表",
|
||||
"foreignKey": "opendb-app-list.appid",
|
||||
"permission": {
|
||||
"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": {
|
||||
"bsonType": "array",
|
||||
"description": "部门ID",
|
||||
"enum": {
|
||||
"collection": "opendb-department",
|
||||
"field": "_id as value, name as text",
|
||||
"orderby": "name asc"
|
||||
},
|
||||
"enumType": "tree",
|
||||
"title": "部门",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
"bsonType": "string",
|
||||
"description": "邮箱地址",
|
||||
"format": "email",
|
||||
"title": "邮箱",
|
||||
"trim": "both",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"email_confirmed": {
|
||||
"bsonType": "int",
|
||||
"defaultValue": 0,
|
||||
"description": "邮箱验证状态:0 未验证 1 已验证",
|
||||
"enum": [{
|
||||
"text": "未验证",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"text": "已验证",
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"title": "邮箱验证状态",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"gender": {
|
||||
"bsonType": "int",
|
||||
"defaultValue": 0,
|
||||
"description": "用户性别:0 未知 1 男性 2 女性",
|
||||
"enum": [{
|
||||
"text": "未知",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"text": "男",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"text": "女",
|
||||
"value": 2
|
||||
}
|
||||
],
|
||||
"title": "性别",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"invite_time": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "受邀时间",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"inviter_uid": {
|
||||
"bsonType": "array",
|
||||
"description": "用户全部上级邀请者",
|
||||
"trim": "both",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"last_login_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最后登录时间",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"last_login_ip": {
|
||||
"bsonType": "string",
|
||||
"description": "最后登录时 IP 地址",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"mobile": {
|
||||
"bsonType": "string",
|
||||
"description": "手机号码",
|
||||
"pattern": "^\\+?[0-9-]{3,20}$",
|
||||
"title": "手机号码",
|
||||
"trim": "both",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"mobile_confirmed": {
|
||||
"bsonType": "int",
|
||||
"defaultValue": 0,
|
||||
"description": "手机号验证状态:0 未验证 1 已验证",
|
||||
"enum": [{
|
||||
"text": "未验证",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"text": "已验证",
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"title": "手机号验证状态",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"my_invite_code": {
|
||||
"bsonType": "string",
|
||||
"description": "用户自身邀请码",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"nickname": {
|
||||
"bsonType": "string",
|
||||
"description": "用户昵称",
|
||||
"title": "昵称",
|
||||
"trim": "both",
|
||||
"permission": {
|
||||
"read": true,
|
||||
"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"
|
||||
},
|
||||
"password_secret_version": {
|
||||
"bsonType": "int",
|
||||
"description": "密码使用的passwordSecret版本",
|
||||
"title": "passwordSecret",
|
||||
"permission": {
|
||||
"read": false,
|
||||
"write": false
|
||||
}
|
||||
},
|
||||
"realname_auth": {
|
||||
"bsonType": "object",
|
||||
"description": "实名认证信息",
|
||||
"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"
|
||||
},
|
||||
"properties": {
|
||||
"auth_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "认证通过时间"
|
||||
},
|
||||
"auth_status": {
|
||||
"bsonType": "int",
|
||||
"description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败",
|
||||
"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
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"auth_status"
|
||||
]
|
||||
},
|
||||
"register_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "注册时间",
|
||||
"forceDefaultValue": {
|
||||
"$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"
|
||||
},
|
||||
"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": {
|
||||
"bsonType": "array",
|
||||
"description": "用户角色",
|
||||
"enum": {
|
||||
"collection": "uni-id-roles",
|
||||
"field": "role_id as value, role_name as text"
|
||||
},
|
||||
"foreignKey": "uni-id-roles.role_id",
|
||||
"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"
|
||||
},
|
||||
"title": "角色"
|
||||
},
|
||||
"tags":{
|
||||
"bsonType": "array",
|
||||
"description": "用户标签",
|
||||
"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"
|
||||
},
|
||||
"title": "标签"
|
||||
},
|
||||
"score": {
|
||||
"bsonType": "int",
|
||||
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"bsonType": "int",
|
||||
"defaultValue": 0,
|
||||
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
|
||||
"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"
|
||||
},
|
||||
"enum": [{
|
||||
"text": "正常",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"text": "禁用",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"text": "审核中",
|
||||
"value": 2
|
||||
},
|
||||
{
|
||||
"text": "审核拒绝",
|
||||
"value": 3
|
||||
}
|
||||
],
|
||||
"title": "用户状态"
|
||||
},
|
||||
"token": {
|
||||
"bsonType": "array",
|
||||
"description": "用户token",
|
||||
"permission": {
|
||||
"read": false,
|
||||
"write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
|
||||
}
|
||||
},
|
||||
"username": {
|
||||
"bsonType": "string",
|
||||
"description": "用户名,不允许重复",
|
||||
"title": "用户名",
|
||||
"trim": "both",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"wx_openid": {
|
||||
"bsonType": "object",
|
||||
"description": "微信各个平台openid",
|
||||
"properties": {
|
||||
"app": {
|
||||
"bsonType": "string",
|
||||
"description": "app平台微信openid"
|
||||
},
|
||||
"mp": {
|
||||
"bsonType": "string",
|
||||
"description": "微信小程序平台openid"
|
||||
},
|
||||
"h5": {
|
||||
"bsonType": "string",
|
||||
"description": "微信公众号登录openid"
|
||||
},
|
||||
"web": {
|
||||
"bsonType": "string",
|
||||
"description": "PC页面扫码登录openid"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"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": {
|
||||
"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": {
|
||||
"bsonType": "object",
|
||||
"description": "QQ各个平台openid",
|
||||
"properties": {
|
||||
"app": {
|
||||
"bsonType": "string",
|
||||
"description": "app平台QQ openid"
|
||||
},
|
||||
"mp": {
|
||||
"bsonType": "string",
|
||||
"description": "QQ小程序平台openid"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"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": {
|
||||
"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
|
||||
}
|
||||
},
|
||||
"identities": {
|
||||
"bsonType": "array",
|
||||
"description": "三方平台身份信息;一个对象代表一个身份,参数支持: provider 身份源, userInfo 三方用户信息, openid 三方openid, unionid 三方unionid, uid 三方uid",
|
||||
"permission": {
|
||||
"read": "'READ_UNI_ID_USERS' in auth.permission",
|
||||
"write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
}
|
Reference in New Issue
Block a user