<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Office extends Model
{
    use HasFactory, SoftDeletes;
    protected $table = "offices";
    protected $primaryKey="property_id";
    public $incrementing= false;

    protected $fillable  = [
        'property_id',
        'number_rooms',
        'number_bathrooms',
        'floor',
        'builded_surface',
        'entity_status',
    ];

    protected $hidden = [
        'updated_at',
        'deleted_at',
        'created_by',
        'updated_by',
        'deleted_by',
    ];

    public function property()
    {
        return $this->belongsTo(Property::class);
    }
}
