game-village-politics-backend/app/Models/UnitStack.php

23 lines
458 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** Units of one type standing in a village, owned by their home village. */
class UnitStack extends Model
{
protected $guarded = [];
protected function casts(): array
{
return ['count' => 'integer'];
}
public function village(): BelongsTo
{
return $this->belongsTo(Village::class);
}
}