<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class Contact
 * @package App\Models
 *
 * @property \App\Models\Country country_id
 * @property \App\Models\Company company_id
 * @property string reference
 * @property string phone
 * @property string email
 * @property string wechat_id
 */
class Contact extends AbstractModel
{
    use SoftDeletes;

    protected $table = 'contacts';

    protected $dates = ['deleted_at'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     **/
    public function company(): HasOne
    {
        return $this->hasOne(Company::class);
    }

    /**
     * @return belongsTo
     **/
    public function country(): belongsTo
    {
        return $this->belongsTo(Country::class);
    }
}
