mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKit.git
synced 2026-01-15 00:35:08 +08:00
feat(resource): 实现了灰度图的资源
This commit is contained in:
44
src/Studio/Resource/Grayscale.php
Normal file
44
src/Studio/Resource/Grayscale.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Grayscale.php@HDK
|
||||
*
|
||||
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* 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 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* 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,
|
||||
];
|
||||
}
|
||||
}
|
||||
25
src/Studio/Resource/GrayscaleCollection.php
Normal file
25
src/Studio/Resource/GrayscaleCollection.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* GrayscaleCollection.php@HDK
|
||||
*
|
||||
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* 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 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||||
* Powered by PhpStorm
|
||||
* Created on 2022/8/29
|
||||
*/
|
||||
class GrayscaleCollection extends ResourceCollection
|
||||
{
|
||||
use ClassicResponse;
|
||||
}
|
||||
Reference in New Issue
Block a user