- add explicit confirmed_at assignment state (red/amber/green) with confirm/unconfirm endpoints - clone leader arrangement before opening dialog to avoid flicker - agenda slide strip: show all previews, drag-reorder, number badges, auto-hide uploader - fix info-slide expire-date saving via axios (was rendering raw JSON modal) - point top-left logo to / instead of /dashboard
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ServiceSong extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'service_id',
|
|
'song_id',
|
|
'song_arrangement_id',
|
|
'use_translation',
|
|
'order',
|
|
'cts_song_name',
|
|
'cts_ccli_id',
|
|
'cts_song_id',
|
|
'matched_at',
|
|
'confirmed_at',
|
|
'request_sent_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'use_translation' => 'boolean',
|
|
'matched_at' => 'datetime',
|
|
'confirmed_at' => 'datetime',
|
|
'request_sent_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function service(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Service::class);
|
|
}
|
|
|
|
public function song(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Song::class);
|
|
}
|
|
|
|
public function arrangement(): BelongsTo
|
|
{
|
|
return $this->belongsTo(SongArrangement::class, 'song_arrangement_id');
|
|
}
|
|
}
|