<?php

namespace App\Models;

use App\Models\Backoffice\Support\ContentTypeModel;
use App\Models\Backoffice\Traits\LanguageSupportTrait;
use MatanYadaev\EloquentSpatial\Objects\Point;

class State extends ContentTypeModel
{
    use LanguageSupportTrait;

    protected $hidden = ['languages', "websites"];
    protected $with = ['languages', "websites"];

    protected $casts = [
        'location' => Point::class,
    ];

    public function cities()
    {
        return $this->hasMany(City::class);
    }

    public function country ()
    {
        return $this->belongsTo(Country::class);
    }
}
