mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 17:32:09 +00:00
33 lines
564 B
PHP
33 lines
564 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Vote extends Model
|
|
{
|
|
protected $fillable = [
|
|
'round',
|
|
'value',
|
|
'room_id',
|
|
'player_id'
|
|
];
|
|
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'round' => 'integer',
|
|
];
|
|
}
|
|
|
|
public function room(): BelongsTo {
|
|
return $this->belongsTo(Room::class);
|
|
}
|
|
|
|
public function player(): BelongsTo {
|
|
return $this->belongsTo(Player::class);
|
|
}
|
|
}
|