<?php
namespace app\common\model;

use think\Model;

class AgentForm extends Model
{
	// 设置字段信息
    protected $schema = [
        'id'			=> 'int',
		'realname'		=> 'string',
		'mobile'		=> 'string',
		'address'		=> 'string',
		'idcard'		=> 'string',
		'recommender'	=> 'string',
		'status'		=> 'tinyint',
		'remark'		=> 'string',
		'createtime'    => 'int'
    ];
	
	// 设置字段自动转换类型
	protected $type = [
		'createtime'	=> 'timestamp:Y-m-d H:i:s'
    ];
	
	public function getStatusTextAttr($value,$data)
	{
		$status = [1=>'待处理',2=>'处理中',3=>'已处理'];
		return $status[$data['status']];
	}
	
	

}