ldc-com-app-bo/app/Models/Contact.php
Vincent BRIDIER 777d3e0e86 Multiple fix
2023-07-13 08:34:54 +00:00

63 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');
}
}