%PDF- %PDF-
Direktori : /mnt/tnb2/git/loslex/app/Models/ |
Current File : //mnt/tnb2/git/loslex/app/Models/Registration.php |
<?php namespace App\Models; use App\Models\User; use App\Models\Contest; use App\Models\ContestDivision; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Factories\HasFactory; class Registration extends Model { use HasFactory; protected $fillable = [ 'contest_id', 'user_id', 'licence_number', 'contest_division_id', 'squad', 'note', ]; protected $hidden = [ 'canceltoken', ]; // protected $casts = [ // 'notcomp' => 'boolean', // 'lexmember' => 'boolean', // 'rookie' => 'boolean', // 'builder' => 'boolean', // 'referee' => 'boolean', // ]; /* Get the user that owns the Registration */ /* @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /* Get the Contest related to the Registration */ /* @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function contest(): BelongsTo { return $this->belongsTo(Contest::class); } public function division(): BelongsTo { return $this->belongsTo(ContestDivision::class, 'contest_division_id'); } }