mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
44 lines
891 B
PHP
44 lines
891 B
PHP
<?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);
|
|
}
|
|
}
|