mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-22 14:04:06 +00:00
45 lines
810 B
PHP
45 lines
810 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
|
|
/**
|
|
* Class Contact
|
|
* @package App\Models
|
|
*
|
|
* @property int $id
|
|
* @property int $owner_id
|
|
* @property string $owner_type
|
|
* @property string $reference
|
|
* @property string $phone
|
|
* @property string $email
|
|
* @property string $wechat_id
|
|
* @property int $default
|
|
*
|
|
* @property mixed $owner
|
|
*/
|
|
class Contact extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'contacts';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
*/
|
|
public function owner(): morphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
}
|