mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
44 lines
821 B
PHP
44 lines
821 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class Country
|
|
* @package App\Models
|
|
*
|
|
* @property string $name
|
|
* @property string $short_code
|
|
* @property string $phone_code
|
|
*/
|
|
class Country extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'countries';
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
protected $fillable = ['name', 'short_code', 'phone_code'];
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function currencies(): HasMany
|
|
{
|
|
return $this->HasMany(Currency::class, 'country_id', 'id');
|
|
}
|
|
}
|