mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKit.git
synced 2026-01-15 00:35:08 +08:00
feat(studio): 更新 task 的 source 字段值资源模型,以兼容传入数组
Signed-off-by: 李东云 <dongyun.li@luxcreo.ai>
This commit is contained in:
@@ -36,12 +36,12 @@ final class Frame extends JsonResource
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'modelId' => $this->modelId,
|
||||
'modelUrl' => $this->modelUrl,
|
||||
'latticeId' => $this->latticeId,
|
||||
'scalingRatio' => $this->scalingRatio,
|
||||
'size' => $this->size,
|
||||
'surfaceNum' => $this->surfaceNum,
|
||||
'modelId' => $this->modelId ?? $this['modelId'],
|
||||
'modelUrl' => $this->modelUrl ?? $this['modelUrl'],
|
||||
'latticeId' => $this->latticeId ?? $this['latticeId'],
|
||||
'scalingRatio' => $this->scalingRatio ?? $this['scalingRatio'],
|
||||
'size' => $this->size ?? $this['size'],
|
||||
'surfaceNum' => $this->surfaceNum ?? $this['size'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -39,14 +39,14 @@ final class Lattice extends JsonResource
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'modelId' => $this->modelId,
|
||||
'modelUrl' => $this->modelUrl,
|
||||
'action' => $this->action->getValue(),
|
||||
'latticeId' => $this->latticeId,
|
||||
'scalingRatio' => $this->scalingRatio,
|
||||
'size' => $this->size,
|
||||
'wide' => $this->wide,
|
||||
'surfaceNum' => $this->surfaceNum,
|
||||
'modelId' => $this->modelId ?? $this['modelId'],
|
||||
'modelUrl' => $this->modelUrl ?? $this['modelUrl'],
|
||||
'action' => ($this->action ?? $this['action'])->getValue(),
|
||||
'latticeId' => $this->latticeId ?? $this['latticeId'],
|
||||
'scalingRatio' => $this->scalingRatio ?? $this['scalingRatio'],
|
||||
'size' => $this->size ?? $this['size'],
|
||||
'wide' => $this->wide ?? $this['wide'],
|
||||
'surfaceNum' => $this->surfaceNum ?? $this['surfaceNum'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -31,8 +31,8 @@ final class Preflight extends JsonResource
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'modelId' => $this->modelId,
|
||||
'modelUrl' => $this->modelUrl,
|
||||
'modelId' => $this->modelId ?? $this['modelId'],
|
||||
'modelUrl' => $this->modelUrl ?? $this['modelUrl'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user