You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
827 B
41 lines
827 B
|
2 weeks ago
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class ActivitySession extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'activity_id',
|
||
|
|
'title',
|
||
|
|
'starts_at',
|
||
|
|
'ends_at',
|
||
|
|
'venue',
|
||
|
|
'capacity',
|
||
|
|
'sort',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'starts_at' => 'datetime',
|
||
|
|
'ends_at' => 'datetime',
|
||
|
|
'capacity' => 'integer',
|
||
|
|
'sort' => 'integer',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function activity(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Activity::class);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function signups(): HasMany
|
||
|
|
{
|
||
|
|
return $this->hasMany(ActivitySignup::class);
|
||
|
|
}
|
||
|
|
}
|