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