Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace App\Models;
use App\Models\Concerns\BelongsToUser;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class RadioContestEntry extends Model
{
use BelongsToUser;
#[\Override]
protected $table = 'radio_contest_entries';
#[\Override]
protected $guarded = ['id', 'created_at', 'updated_at', 'user_id', 'contest_id'];
/** @var array<string, string> */
#[\Override]
protected $casts = [
'submitted_at' => 'datetime',
'is_winner' => 'boolean',
];
public function contest(): BelongsTo
{
return $this->belongsTo(RadioContest::class);
}
public function markAsWinner(): void
{
$this->update(['is_winner' => true]);
}
}