mein-sterntours/app/Models/LeadParticipant.php
2025-04-01 10:40:14 +02:00

80 lines
2.5 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class LeadParticipant
*
* @property int $id
* @property int $lead_id
* @property string $participant_name
* @property string $participant_firstname
* @property Carbon $participant_birthdate
* @property int $participant_salutation_id
* @property Lead $lead
* @property Salutation $salutation
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereLeadId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantBirthdate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantFirstname($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantSalutationId($value)
* @property int|null $participant_child
* @property int|null $nationality_id
* @property-read \App\Models\TravelNationality|null $travel_nationality
* @method static \Illuminate\Database\Eloquent\Builder|LeadParticipant whereNationalityId($value)
* @method static \Illuminate\Database\Eloquent\Builder|LeadParticipant whereParticipantChild($value)
* @mixin \Eloquent
*/
class LeadParticipant extends Model
{
protected $connection = 'mysql';
protected $table = 'lead_participant';
public $timestamps = false;
protected $casts = [
'lead_id' => 'int',
'participant_salutation_id' => 'int'
];
protected $dates = [
'participant_birthdate'
];
protected $fillable = [
'lead_id',
'participant_name',
'participant_firstname',
'participant_birthdate',
'participant_salutation_id',
'participant_child',
'nationality_id'
];
public function lead()
{
return $this->belongsTo(Lead::class);
}
public function salutation()
{
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
}
public function travel_nationality()
{
return $this->belongsTo(TravelNationality::class, 'nationality_id');
}
}