64 lines
1.2 KiB
PHP
64 lines
1.2 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Kwaadpepper\Enum\Traits\CastsEnums;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @property integer $app_user_id
|
||
|
|
* @property integer $id
|
||
|
|
* @property string $email
|
||
|
|
* @property string $type
|
||
|
|
* @property string $other
|
||
|
|
* @property string $select1
|
||
|
|
* @property string $select2
|
||
|
|
* @property string $name
|
||
|
|
* @property string $firstname
|
||
|
|
* @property string $company
|
||
|
|
* @property string $address
|
||
|
|
* @property string $phone
|
||
|
|
* @property string $products
|
||
|
|
* @property string $card_url
|
||
|
|
* @property string $notes
|
||
|
|
* @property string $visits
|
||
|
|
*/
|
||
|
|
class Contact extends Model
|
||
|
|
{
|
||
|
|
use CastsEnums;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* fillable
|
||
|
|
* @var string[]
|
||
|
|
*/
|
||
|
|
protected $fillable = [
|
||
|
|
'app_user_id',
|
||
|
|
'email',
|
||
|
|
'type',
|
||
|
|
'other',
|
||
|
|
'select1',
|
||
|
|
'select2',
|
||
|
|
'name',
|
||
|
|
'firstname',
|
||
|
|
'company',
|
||
|
|
'address',
|
||
|
|
'phone',
|
||
|
|
'products',
|
||
|
|
'card_url',
|
||
|
|
'notes',
|
||
|
|
'visits',
|
||
|
|
];
|
||
|
|
|
||
|
|
// * RELATIONSHIPS
|
||
|
|
|
||
|
|
/**
|
||
|
|
* MorphToMany Directories
|
||
|
|
*
|
||
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||
|
|
*/
|
||
|
|
public function appUser()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(AppUser::class, 'id', 'app_user_id');
|
||
|
|
}
|
||
|
|
}
|