Files
core/hwe/sammo/DTO/BettingInfo.php
T
Hide_D f59449c15b feat(WIP): 베팅 개시 타입 변경
-candidate를 미리 추가.
-이를 통해 betting을 중립적으로 운용 가능
2022-01-26 23:10:55 +09:00

43 lines
794 B
PHP

<?php
namespace sammo\DTO;
use Sammo\DTO\SelectItem;
use Spatie\DataTransferObject\Attributes\CastWith;
use Spatie\DataTransferObject\Attributes\Strict;
use Spatie\DataTransferObject\DataTransferObject;
//https://json2dto.atymic.dev/
#[Strict]
class BettingInfo extends DataTransferObject
{
public int $id;
public string $type;
public string $name;
public bool $finished;
public int $selectCnt;
public bool $reqInheritancePoint;
public int $openYearMonth;
public int $closeYearMonth;
/** @var \sammo\DTO\SelectItem[] */
#[CastWith(ArrayCaster::class, itemType: SelectItem::class)]
public array $candidates;
}
/*
{
"id": 45,
"name": "1차전",
"finished": false,
"selectCnt": 1,
"reqInheritancePoint": true,
"openYearMonth": 110,
"closeYearMonth": 120
}
*/