<?php

namespace app\common\model;

use think\Model;

class MobileFollowLog extends Model
{
    // 设置字段信息
    protected $schema = [
        'id'         => 'int',
        'follow_id'  => 'int',
        'type'       => 'int',
        'remark'     => 'string',
        'createtime' => 'int',
    ];

    // 设置字段自动转换类型
    protected $type = [
        'createtime' => 'timestamp:Y-m-d H:i:s',
    ];

    public static $typeText = [1 => '电话跟进', 2 => '微信跟进', 3 => '面谈'];

    public function getTypeTextAttr($value, $data)
    {
        return self::$typeText[$data['type']];
    }
}