87 lines
2.2 KiB
PHP
87 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Game\Player;
|
|
|
|
use App\Models\Account;
|
|
use App\Models\Enums\EmpireEnum;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property int|null $pid1
|
|
* @property int|null $pid2
|
|
* @property int|null $pid3
|
|
* @property int|null $pid4
|
|
* @property EmpireEnum $empire
|
|
* @property-read Account $account
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex whereEmpire($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid1($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid2($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid3($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid4($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class PlayerIndex extends Model
|
|
{
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'player_index';
|
|
|
|
/**
|
|
* The primary key for the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'id';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for serialization.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $hidden = [
|
|
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'empire' => EmpireEnum::class,
|
|
];
|
|
|
|
/**
|
|
* Get the account that owns the player index.
|
|
*/
|
|
public function account(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Account::class, 'id', 'id');
|
|
}
|
|
}
|