29 lines
516 B
PHP
29 lines
516 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Slot extends Model
|
|
{
|
|
protected $fillable = [
|
|
'capacity',
|
|
'remaining',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'capacity' => 'integer',
|
|
'remaining' => 'integer',
|
|
];
|
|
}
|
|
|
|
/** @return HasMany<Hold, $this> */
|
|
public function holds(): HasMany
|
|
{
|
|
return $this->hasMany(Hold::class);
|
|
}
|
|
}
|