update: uni-id-users 增加 title 字段, forceDefaultValue: ip, now

This commit is contained in:
handongxun 2020-10-31 18:26:14 +08:00
parent a09d2aea12
commit 0d83324a46

View File

@ -8,20 +8,24 @@
},
"username": {
"bsonType": "string",
"title": "用户名",
"description": "用户名,不允许重复"
},
"password": {
"bsonType": "string",
"title": "密码",
"description": "密码,加密存储"
},
"nickname": {
"bsonType": "string",
"title": "昵称",
"description": "用户昵称"
},
"gender": {
"bsonType": "int",
"minimum": 0,
"maximum": 2,
"title": "性别",
"description": "用户性别0 未知 1 男性 2 女性"
},
"status": {
@ -32,6 +36,7 @@
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"description": "手机号码"
},
"mobile_confirmed": {
@ -42,6 +47,7 @@
},
"email": {
"bsonType": "string",
"title": "邮箱",
"description": "邮箱地址"
},
"email_confirmed": {
@ -52,6 +58,7 @@
},
"avatar": {
"bsonType": "string",
"title": "头像地址",
"description": "头像地址"
},
"wx_unionid": {
@ -78,6 +85,7 @@
},
"comment": {
"bsonType": "string",
"title": "备注",
"description": "备注"
},
"realname_auth": {
@ -144,11 +152,17 @@
},
"register_date": {
"bsonType": "timestamp",
"description": "注册时间"
"description": "注册时间",
"forceDefaultValue": {
"$env": "now"
}
},
"register_ip": {
"bsonType": "string",
"description": "注册时 IP 地址"
"description": "注册时 IP 地址",
"forceDefaultValue": {
"$env": "ip"
}
},
"last_login_date": {
"bsonType": "timestamp",
@ -173,138 +187,115 @@
}
},
"data": [],
"index": [
{
"index": [{
"IndexName": "username",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "username",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "username",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "mobile",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "mobile",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "mobile",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "email",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "email",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "email",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_openid.app-plus",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_openid.app-plus",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "wx_openid.app-plus",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_openid.mp-weixin",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_openid.mp-weixin",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "wx_openid.mp-weixin",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_unionid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_unionid",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "wx_unionid",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "ali_openid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "ali_openid",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "ali_openid",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "my_invite_code",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "my_invite_code",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "my_invite_code",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "inviter_uid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "inviter_uid",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "inviter_uid",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "invite_time",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "invite_time",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "invite_time",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "role",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "role",
"Direction": "1"
}
],
"MgoIndexKeys": [{
"Name": "role",
"Direction": "1"
}],
"MgoIsUnique": false
}
}
]
}
}