mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
65 lines
2.2 KiB
PHP
65 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Eloquent;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Query\Builder;
|
|
use Illuminate\Support\Carbon;
|
|
use Spatie\Activitylog\Models\Activity;
|
|
|
|
/**
|
|
* Class Country
|
|
*
|
|
* @package App\Models
|
|
* @property string name
|
|
* @property string short_code
|
|
* @property string phone_code
|
|
* @property int $id
|
|
* @property Carbon|null $deleted_at
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property-read Collection|Activity[] $activities
|
|
* @property-read int|null $activities_count
|
|
* @property-read Model|Eloquent $causer
|
|
* @property-read Collection|Currency[] $currencies
|
|
* @property-read int|null $currencies_count
|
|
* @property-read Model|Eloquent $subject
|
|
* @property-read Model|Eloquent $target
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country newQuery()
|
|
* @method static Builder|Country onlyTrashed()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereDeletedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country wherePhoneCode($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereShortCode($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Country whereUpdatedAt($value)
|
|
* @method static Builder|Country withTrashed()
|
|
* @method static Builder|Country withoutTrashed()
|
|
* @mixin Eloquent
|
|
*/
|
|
class Country extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'countries';
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
protected $fillable = ['name', 'short_code', 'phone_code'];
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function currencies(): HasMany
|
|
{
|
|
return $this->HasMany(Currency::class, 'country_id', 'id');
|
|
}
|
|
}
|