mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 17:12:08 +00:00
46 lines
902 B
PHP
46 lines
902 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property int $player_id
|
|
* @property string $room_id
|
|
* @property int $round
|
|
* @property string $value
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*/
|
|
class Vote extends Model
|
|
{
|
|
protected $fillable = [
|
|
'round',
|
|
'value',
|
|
'room_id',
|
|
'player_id',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'round' => 'integer',
|
|
];
|
|
}
|
|
|
|
/** @return BelongsTo<Room, $this> */
|
|
public function room(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Room::class);
|
|
}
|
|
|
|
/** @return BelongsTo<Player, $this> */
|
|
public function player(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Player::class);
|
|
}
|
|
}
|