mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 17:03:59 +00:00
pull
This commit is contained in:
+30
-9
@@ -5,31 +5,37 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
/**
|
||||
* Class Address
|
||||
* @package App\Models
|
||||
* @version August 4, 2020, 4:36 am
|
||||
*
|
||||
* @property \App\Models\Company company
|
||||
* @property \App\Models\Country country_id
|
||||
* @property \App\Models\Company company_id
|
||||
* @property \App\Models\State state_id
|
||||
* @property \App\Models\District district_id
|
||||
* @property string postcode
|
||||
* @property string street_one
|
||||
* @property string street_two
|
||||
* @property string city
|
||||
* @property string state
|
||||
* @property string post_code
|
||||
* @property string country
|
||||
* @property integer billing_type
|
||||
*/
|
||||
class Address extends AbstractModel
|
||||
{
|
||||
|
||||
use SoftDeletes;
|
||||
|
||||
|
||||
protected $table = 'addresses';
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
/**
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
public function country(): HasOne
|
||||
{
|
||||
return $this->hasOne(Country::class, 'country_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
public function company(): HasOne
|
||||
@@ -37,4 +43,19 @@ class Address extends AbstractModel
|
||||
return $this->hasOne(Company::class, 'company_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
public function state(): HasOne
|
||||
{
|
||||
return $this->hasOne(State::class, 'state_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
public function district(): HasOne
|
||||
{
|
||||
return $this->hasOne(District::class, 'district_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user