Files
shipping-portal/app/Models/Contact.php
T

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();
}
}