<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\MorphTo;

/**
 * Class Contact
 * @package App\Models
 *
 * @property int owner_id
 * @property string owner_type
 * @property string reference
 * @property string phone
 * @property string email
 * @property string wechat_id
 * @property int default
 */
class Contact extends AbstractModel
{
    use SoftDeletes;

    protected $table = 'contacts';

    protected $dates = ['deleted_at'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\MorphTo
     */
    public function owner(): morphTo
    {
        return $this->morphTo();
    }

}
