01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
63
app/Models/Salutation.php
Normal file
63
app/Models/Salutation.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue