<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class NasOlt extends Model
{
    protected $guarded = ['id'];

    protected $hidden = ['community', 'auth_password', 'privacy_password'];

    protected function casts(): array
    {
        return [
            'community' => 'encrypted',
            'auth_password' => 'encrypted',
            'privacy_password' => 'encrypted',
        ];
    }

    public function tenant()
    {
        return $this->belongsTo(Tenant::class);
    }
}
