| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | <?phpnamespace App\Model;use App\Scopes\TopDepartmentScope;use Illuminate\Database\Eloquent\Model;class BasicType extends Model{    protected $guarded = [];    protected $table = "basic_type"; //指定表    const CREATED_AT = 'crt_time';    const UPDATED_AT = 'upd_time';    protected $dateFormat = 'U';    const type_22 = 22;    public static $type = [        1 => '客户意向类型',        2 => '客户来源类型',        3 => '客户类型',        4 => '客户电话类型',        5 => '进展阶段类型',        6 => '客户状态类型',        7 => '决策关系类型',        8 => '客户分级',        9 => '状态类型',        10 => '车型',        11 => '订单类型',        12 => '成交类型',        13 => '合同状态',        14 => '合同类型',        15 => '付款方式',        16 => '发货状态',        17 => '物流公司',        18 => '安装方式',        19 => '紧急程度',        20 => '产品单位',        21 => '跟进方式',        22 => '产品价格',        23 => '安装地点',    ];    public static $user = [];    public static $search = [];    public function __construct(array $attributes = [])    {        if(! empty($attributes['userData'])) {            self::$user = $attributes['userData'];            self::$search = $attributes['search'] ?? [];            static::addGlobalScope(new TopDepartmentScope(self::$user, self::$search));        }        parent::__construct($attributes);    }}
 |