38 lines
688 B
PHP
38 lines
688 B
PHP
<?php
|
|
|
|
namespace app\api\model\app\agent;
|
|
|
|
use think\Model;
|
|
|
|
class WithdrawCard extends Model
|
|
{
|
|
|
|
|
|
// 表名
|
|
protected $name = 'app_agent_withdraw_card';
|
|
|
|
// 自动写入时间戳字段
|
|
protected $autoWriteTimestamp = 'integer';
|
|
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'updatetime';
|
|
protected $updateTime = false;
|
|
protected $deleteTime = false;
|
|
|
|
// 追加属性
|
|
protected $append = [
|
|
|
|
];
|
|
|
|
public function getCard($userId){
|
|
$data = self::where([
|
|
'user_id'=>$userId
|
|
])->field(['name','card_no','address'])->find();
|
|
|
|
if(!$data){
|
|
return false;
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
} |