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.
67 lines
1.3 KiB
67 lines
1.3 KiB
<?php |
|
/** |
|
* |
|
* Member.php |
|
* User: ChenLong |
|
* DateTime: 2020-12-21 09:45:12 |
|
*/ |
|
|
|
|
|
namespace app\common\model; |
|
|
|
use think\Model; |
|
use app\common\BaseModel; |
|
use sdModule\layui\Layui; |
|
|
|
/** |
|
* Class Member |
|
* @package app\common\model\Member |
|
* @author chenlong <vip_chenlong@163.com> |
|
*/ |
|
class Member extends Model |
|
{ |
|
use BaseModel; |
|
protected $autoWriteTimestamp = true; |
|
protected $schema = [ |
|
'id' => 'int', |
|
'username' => 'varchar', |
|
'password' => 'varchar', |
|
'mobile' => 'varchar', |
|
'avatar' => 'varchar', |
|
'email' => 'varchar', |
|
'company' => 'varchar', |
|
'position' => 'varchar', |
|
'status' => 'tinyint', |
|
'is_tender' => 'tinyint', |
|
'create_time' => 'datetime', |
|
'update_time' => 'datetime', |
|
'delete_time' => 'int', |
|
'security_question' =>'tinyint', |
|
'security_answer' => 'varchar', |
|
]; |
|
|
|
|
|
|
|
/** |
|
* 状态返回值处理 |
|
* @param bool $tag |
|
* @return array |
|
*/ |
|
public static function getStatusSc($tag = true) |
|
{ |
|
return $tag === true |
|
? [ |
|
'1' => Layui::tag()->red('正常'), |
|
'0' => Layui::tag()->gray('禁止'), |
|
|
|
] |
|
: [ |
|
'1' => '正常', |
|
'0' => '禁止', |
|
|
|
]; |
|
} |
|
|
|
|
|
} |
|
|
|
|