mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 14:52:09 +00:00
39 lines
777 B
PHP
39 lines
777 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Room extends Model
|
|
{
|
|
use HasUuids;
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'current_round',
|
|
'deck_config',
|
|
'revealed_at',
|
|
'state_version',
|
|
];
|
|
|
|
protected function casts() :array
|
|
{
|
|
return [
|
|
'current_round' => 'integer',
|
|
'state_version' => 'integer',
|
|
'revealed_at' => 'immutable_datetime',
|
|
'deck_config' => 'array',
|
|
];
|
|
}
|
|
|
|
|
|
public function players(): HasMany
|
|
{
|
|
return $this->hasMany(Player::class);
|
|
|
|
}
|
|
}
|