__('Status invalid'), 'ing' => __('Status ing'), 'finish' => __('Status finish'), 'finish-fictitious' => __('Status finish-fictitious')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function grouponLog() { return $this->hasMany(\app\admin\model\shopro\activity\GrouponLog::class, 'groupon_id', 'id'); } public function user() { return $this->belongsTo(\app\admin\model\User::class, 'user_id', 'id'); } public function goods() { return $this->belongsTo(\app\admin\model\shopro\goods\Goods::class, 'goods_id', 'id'); } }