mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 15:52:09 +00:00
initial Setup and data structure
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Vote extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'round',
|
||||
'value',
|
||||
];
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user