Files
portal/app/Models/Contact.php
T
omair saleh 7f712e6ca8 bulk commit
2020-08-24 09:54:50 +08:00

43 lines
715 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Contact
* @package App\Models
* @version August 5, 2020, 10:46 pm
*
* @property \App\Models\Company company
* @property string name
* @property string designation
* @property string email
* @property string phone
* @property string wechat_id
*/
class Contact extends AbstractModel
{
use SoftDeletes;
protected $table = 'contacts';
protected $dates = ['deleted_at'];
/**
* @return HasOne
*/
public function company(): HasOne
{
return $this->hasOne(\App\Models\Company::class, 'company_id', 'id');
}
}