diff --git a/src/Studio/Resource/Grayscale.php b/src/Studio/Resource/Grayscale.php new file mode 100644 index 0000000..2f15093 --- /dev/null +++ b/src/Studio/Resource/Grayscale.php @@ -0,0 +1,44 @@ + + * Powered by PhpStorm + * Created on 2022/8/29 + */ + +namespace Singularity\HDK\Studio\Resource; + +use Hyperf\Resource\Json\JsonResource; +use Singularity\HDK\Utils\Resource\ClassicResponse; + +/** + * Singularity\HDK\Studio\Resource\Grayscale@HDK + * + * @author 李东云 + * Powered by PhpStorm + * Created on 2022/8/29 + * + * @property int $id + * @property string $nameZh 中文名称 + * @property string $nameEn 英文名称 + * @property string $path 原始图片路径 + * @property string $pathPreview 压缩的预览用图片路径 + * @property int $sort 排序值,数字越大越靠前 + */ +class Grayscale extends JsonResource +{ + use ClassicResponse; + + public function toArray(): array + { + return [ + 'id' => $this->id, + 'nameZh' => $this->nameZh, + 'nameEn' => $this->nameEn, + 'path' => $this->path, + 'pathPreview' => $this->pathPreview, + 'sort' => $this->sort, + ]; + } +} \ No newline at end of file diff --git a/src/Studio/Resource/GrayscaleCollection.php b/src/Studio/Resource/GrayscaleCollection.php new file mode 100644 index 0000000..0ed18c4 --- /dev/null +++ b/src/Studio/Resource/GrayscaleCollection.php @@ -0,0 +1,25 @@ + + * Powered by PhpStorm + * Created on 2022/8/29 + */ + +namespace Singularity\HDK\Studio\Resource; + +use Hyperf\Resource\Json\ResourceCollection; +use Singularity\HDK\Utils\Resource\ClassicResponse; + +/** + * Singularity\HDK\Studio\Resource\ GrayscaleCollection@HDK + * + * @author 李东云 + * Powered by PhpStorm + * Created on 2022/8/29 + */ +class GrayscaleCollection extends ResourceCollection +{ + use ClassicResponse; +} \ No newline at end of file