You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
837 B
37 lines
837 B
<?php
|
|
|
|
namespace app\base\model\user;
|
|
|
|
use app\base\model\Base;
|
|
use think\model\concern\SoftDelete;
|
|
|
|
|
|
class UserVerify extends Base
|
|
{
|
|
|
|
use SoftDelete;
|
|
|
|
// 设置当前模型对应的完整数据表名称
|
|
protected $table = 'base_user_verify';
|
|
|
|
// 设置字段自动转换类型
|
|
protected $type = [
|
|
'check_time' => 'timestamp',
|
|
];
|
|
|
|
/**
|
|
* 获取手机验证码
|
|
* @param string $mobile_phone 手机号
|
|
* @param int $type 验证码类型 1--注册 2--绑定手机号
|
|
* @date 2021-02-25
|
|
*/
|
|
public function getCodeByMobilePhone($mobile_phone, $type)
|
|
{
|
|
return $this->getOneData([
|
|
['mobile_phone', '=', $mobile_phone],
|
|
['status', '=', 0],
|
|
['type', '=', $type]
|
|
],'id,mobile_phone,code,status,create_time','id desc');
|
|
}
|
|
}
|