'待联系', '2' =>'已联系']; } public function getCooperationStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['cooperation_status']) ? $data['cooperation_status'] : ''); $list = $this->getCooperationStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('User', 'user_id', 'id',[],'LEFT')->setEagerlyType(0); } public function servicetype() { return $this->belongsTo('Servicetype', 'servicetype_id', 'id',[],'LEFT')->setEagerlyType(0); } }