refac: Auction DTO류를 새 DTO에 맞게 변경
This commit is contained in:
@@ -2,27 +2,19 @@
|
||||
|
||||
namespace sammo\DTO;
|
||||
|
||||
use Spatie\DataTransferObject\Attributes\CastWith;
|
||||
use Spatie\DataTransferObject\Attributes\Strict;
|
||||
use Spatie\DataTransferObject\DataTransferObject;
|
||||
|
||||
use sammo\Enums\ResourceType;
|
||||
use sammo\DTO\Caster\BackedEnumCaster;
|
||||
|
||||
//https://json2dto.atymic.dev/
|
||||
|
||||
|
||||
|
||||
#[Strict]
|
||||
class AuctionInfo extends DataTransferObject
|
||||
class AuctionInfo extends DTO
|
||||
{
|
||||
public int $id;
|
||||
public int $openerName;
|
||||
public int $openerGeneralID;
|
||||
public string $type;
|
||||
public bool $finished;
|
||||
#[CastWith(BackedEnumCaster::class)]
|
||||
public ResourceType $reqResource;
|
||||
public string $openDate;
|
||||
public string $closeDate;
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public int $openerName,
|
||||
public int $openerGeneralID,
|
||||
public string $type,
|
||||
public bool $finished,
|
||||
public ResourceType $reqResource,
|
||||
public string $openDate,
|
||||
public string $closeDate,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user