This commit is contained in:
崔红保 2020-11-04 15:46:34 +08:00
commit f09d462214
3 changed files with 104 additions and 7 deletions

View File

@ -23,21 +23,32 @@
},
"gender": {
"bsonType": "int",
"minimum": 0,
"maximum": 2,
"title": "性别",
"description": "用户性别0 未知 1 男性 2 女性"
"description": "用户性别0 未知 1 男性 2 女性",
"defaultValue": 0,
"component": {
"name": "radio-group",
"childrenData": [{
"label": "未知",
"value": 0
}, {
"label": "男",
"value": 1
}, {
"label": "女",
"value": 2
}]
}
},
"status": {
"bsonType": "int",
"minimum": 0,
"maximum": 3,
"description": "用户状态0 正常 1 禁用 2 审核中 3 审核拒绝"
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"description": "手机号码"
"description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$"
},
"mobile_confirmed": {
"bsonType": "int",
@ -47,6 +58,7 @@
},
"email": {
"bsonType": "string",
"format": "email",
"title": "邮箱",
"description": "邮箱地址"
},
@ -161,7 +173,7 @@
"bsonType": "string",
"description": "注册时 IP 地址",
"forceDefaultValue": {
"$env": "ip"
"$env": "clientIP"
}
},
"last_login_date": {

View File

@ -0,0 +1,68 @@
{
"schema": {
"bsonType": "object",
"required": [],
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"mobile": {
"bsonType": "string",
"description": "手机号码"
},
"email": {
"bsonType": "string",
"description": "邮箱"
},
"code": {
"bsonType": "string",
"description": "验证码"
},
"type": {
"bsonType": "string",
"description": "验证类型login, bind, unbind, pay"
},
"state": {
"bsonType": "int",
"description": "验证状态0 未验证、1 已验证、2 已作废"
},
"ip": {
"bsonType": "string",
"description": "请求时客户端IP地址"
},
"created_at": {
"bsonType": "timestamp",
"description": "创建时间"
},
"expired_at": {
"bsonType": "timestamp",
"description": "过期时间"
}
}
},
"index": [{
"IndexName": "mobile_code_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "mobile",
"Direction": "1"
}, {
"Name": "code",
"Direction": "1"
}],
"MgoIsUnique": false
}
}, {
"IndexName": "email_code_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "email",
"Direction": "1"
}, {
"Name": "code",
"Direction": "1"
}],
"MgoIsUnique": false
}
}]
}

View File

@ -0,0 +1,17 @@
{
"name": "@opendb/uni-verify",
"version": "0.0.1",
"description": "uni-verify 验证码",
"keywords": ["验证码"],
"opendb": {
"title": "验证码",
"type": "collection",
"contributors": [
{
"name": "DCloud",
"email": "",
"homepage": "https://gitee.com/dcloud/opendb"
}
]
}
}