mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 02:58:42 +00:00
30 lines
496 B
PHP
30 lines
496 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
/**
|
|
* 国家/地区.
|
|
*/
|
|
class Country extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
public $incrementing = false;
|
|
|
|
protected $table = 'country';
|
|
|
|
protected $primaryKey = 'code';
|
|
|
|
protected $keyType = 'string';
|
|
|
|
protected $guarded = [];
|
|
|
|
public function nodes(): HasMany
|
|
{
|
|
return $this->hasMany(Node::class, 'country_code');
|
|
}
|
|
}
|