Files
fewo-stommer/app/Models/Amenity.php
LarsandCursor 8ebc1a3878 Assign the existing site to one landlord so stommer.info can run tenancy.
Seebad 0.3 stays in this release. With a single landlord every host still reaches the default website.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 12:00:11 +02:00

43 lines
1.0 KiB
PHP

<?php
namespace App\Models;
use App\Enums\AmenityArea;
use App\Models\Concerns\BelongsToTenant;
use Database\Factories\AmenityFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* One line of the equipment list; highlights are featured on the home page.
*/
#[Fillable(['property_id', 'area', 'name', 'is_highlight', 'sort_order'])]
class Amenity extends Model
{
/** @use HasFactory<AmenityFactory> */
use BelongsToTenant, HasFactory;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'area' => AmenityArea::class,
'is_highlight' => 'boolean',
];
}
/**
* @return BelongsTo<Property, $this>
*/
public function property(): BelongsTo
{
return $this->belongsTo(Property::class);
}
}