__('Agent'), 'store' => __('Store'), 'massager' => __('Massager'), 'user' => __('User')]; } public function getIdentityTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['identity_type']) ? $data['identity_type'] : ''); $list = $this->getIdentityTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('app\admin\model\User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function massager() { return $this->belongsTo('app\admin\model\Massager', 'to_massager_id', 'id', [], 'LEFT')->setEagerlyType(0); } }