'json', 'data' => 'json', ]; public static $statusMap = [ self::STATUS_PROCESSING => '处理中', self::STATUS_SUCCESS => '成功', self::STATUS_FAIL => '失败', ]; public static $statusColor = [ self::STATUS_PROCESSING => 'primary', self::STATUS_SUCCESS => 'success', self::STATUS_FAIL => 'danger', ]; public function device() { return $this->belongsTo(Device::class, 'device_id'); } public function store() { return $this->belongsTo(Store::class, 'store_id'); } public function resource() { return $this->morphTo(); } }