01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
72
app/Models/Participant.php
Normal file
72
app/Models/Participant.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Participant
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $booking_id
|
||||
* @property string $participant_name
|
||||
* @property string $participant_firstname
|
||||
* @property Carbon $participant_birthdate
|
||||
* @property int $participant_salutation_id
|
||||
* @property bool $participant_child
|
||||
* @property Booking $booking
|
||||
* @property Salutation $salutation
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantChild($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantSalutationId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Participant extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'participant';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'participant_salutation_id' => 'int',
|
||||
'participant_child' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'participant_birthdate'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'booking_id',
|
||||
'participant_name',
|
||||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id',
|
||||
'participant_child'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue