<?php

namespace Modules\Mall\Http\Resources\Api\Activity;

use Illuminate\Http\Resources\Json\JsonResource;
use Jason\Api\Api;
use Modules\Mall\Http\Resources\Api\Category\CategoryBaseResource;
use Modules\Mall\Http\Resources\Api\Shop\ShopBaseInfoResource;

class ActivityResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'activity_id' => $this->id,
            'cover'       => $this->cover_url,
            'title'       => $this->title,
            'description' => $this->description,
            'content'     => $this->content,
            'created_at'  => $this->created_at->format('Y-m-d'),
        ];
    }

}
