paymentservice/app/Models/Country.php

57 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2023-07-12 19:27:10 +00:00
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Country
*
* @property int $id
* @property string $code_dial
* @property string $name
* @property string $code_country
* @property float $longitude
* @property float $latitude
* @property int $idCurrency
*
* @property Currency $currency
* @property Collection|Admin[] $admins
* @property Collection|ConfigGame[] $config_games
* @property Collection|Identification[] $identifications
* @property Collection|WalletIlinkTransaction[] $wallet_ilink_transactions
*
* @package App\Models
*/
class Country extends Model
{
protected $table = 'countries';
public $timestamps = false;
protected $guarded = ['id'];
protected $casts = [
'longitude' => 'float',
'latitude' => 'float',
'idCurrency' => 'int'
];
protected $fillable = [
'code_dial',
'name',
'code_country',
'longitude',
'latitude',
'idCurrency'
];
public function currency()
{
return $this->belongsTo(Currency::class, 'idCurrency');
}
}