feat(WIP): 베팅 개시 타입 변경
-candidate를 미리 추가. -이를 통해 betting을 중립적으로 운용 가능
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user