mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-20 21:13:59 +00:00
Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker
This commit is contained in:
+19
-12
@@ -10,12 +10,12 @@ 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
|
||||
* @property int $country_id
|
||||
* @property int $company_id
|
||||
* @property string $reference
|
||||
* @property string $phone
|
||||
* @property string $email
|
||||
* @property string $wechat_id
|
||||
*/
|
||||
class Contact extends AbstractModel
|
||||
{
|
||||
@@ -23,20 +23,27 @@ class Contact extends AbstractModel
|
||||
|
||||
protected $table = 'contacts';
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function company(): HasOne
|
||||
{
|
||||
return $this->hasOne(Company::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return belongsTo
|
||||
* @return BelongsTo
|
||||
**/
|
||||
public function country(): belongsTo
|
||||
public function country(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user