2020-11-14 14:53:45 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
|
|
|
|
"required": [],
|
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "ID,系统自动生成"
|
|
|
|
|
},
|
|
|
|
|
"mobile": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "手机号码"
|
|
|
|
|
},
|
|
|
|
|
"email": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "邮箱"
|
|
|
|
|
},
|
2022-10-13 15:34:24 +08:00
|
|
|
|
"device_uuid": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "设备UUID,常用于图片验证码"
|
|
|
|
|
},
|
2020-11-14 14:53:45 +08:00
|
|
|
|
"code": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "验证码"
|
|
|
|
|
},
|
2021-01-26 20:42:52 +08:00
|
|
|
|
"scene": {
|
2020-11-14 14:53:45 +08:00
|
|
|
|
"bsonType": "string",
|
2021-01-26 20:42:52 +08:00
|
|
|
|
"description": "使用验证码的场景,如:login, bind, unbind, pay"
|
2020-11-14 14:53:45 +08:00
|
|
|
|
},
|
|
|
|
|
"state": {
|
|
|
|
|
"bsonType": "int",
|
|
|
|
|
"description": "验证状态:0 未验证、1 已验证、2 已作废"
|
|
|
|
|
},
|
|
|
|
|
"ip": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "请求时客户端IP地址"
|
|
|
|
|
},
|
2022-10-13 16:02:40 +08:00
|
|
|
|
"created_date": {
|
2020-11-14 14:53:45 +08:00
|
|
|
|
"bsonType": "timestamp",
|
|
|
|
|
"description": "创建时间"
|
|
|
|
|
},
|
2021-01-26 20:42:52 +08:00
|
|
|
|
"expired_date": {
|
2020-11-14 14:53:45 +08:00
|
|
|
|
"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
|
|
|
|
|
}
|
2021-01-27 18:07:52 +08:00
|
|
|
|
}, {
|
2022-10-13 15:34:24 +08:00
|
|
|
|
"IndexName": "device_uuid_code_",
|
2021-01-27 18:07:52 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [{
|
2022-10-13 15:34:24 +08:00
|
|
|
|
"Name": "device_uuid",
|
2021-01-27 18:07:52 +08:00
|
|
|
|
"Direction": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"Name": "code",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}],
|
|
|
|
|
"MgoIsUnique": false
|
|
|
|
|
}
|
2020-11-14 14:53:45 +08:00
|
|
|
|
}]
|
|
|
|
|
}
|