This commit is contained in:
Kevin Adametz 2020-02-14 10:18:20 +01:00
parent bed91c4f4a
commit c8948338bb
122 changed files with 7911 additions and 1639 deletions

63
app/Models/Salutation.php Normal file
View file

@ -0,0 +1,63 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Reliese\Database\Eloquent\Model;
/**
* Class Salutation
*
* @property int $id
* @property string $name
* @property Collection|Customer[] $customers
* @property Collection|Lead[] $leads
* @property Collection|LeadParticipant[] $lead_participants
* @property Collection|Participant[] $participants
* @package App\Models
* @property-read int|null $customers_count
* @property-read int|null $lead_participants_count
* @property-read int|null $leads_count
* @property-read int|null $participants_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation whereName($value)
* @mixin \Eloquent
*/
class Salutation extends Model
{
protected $connection = 'mysql';
protected $table = 'salutation';
public $timestamps = false;
protected $fillable = [
'name'
];
public function customers()
{
return $this->hasMany(Customer::class);
}
public function leads()
{
return $this->hasMany(Lead::class, 'participant_salutation_id');
}
public function lead_participants()
{
return $this->hasMany(LeadParticipant::class, 'participant_salutation_id');
}
public function participants()
{
return $this->hasMany(Participant::class, 'participant_salutation_id');
}
}