<?php

namespace App\Models;

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

class PengaturanBantaranSungaiModel extends Model
{
    use HasFactory;
    protected $table = 'pengaturan_bantaran_sungai';
    protected $primaryKey = 'uuid';
    protected $fillable = [
        'bantaran_sungai_id',
        'max_normal',
        'min_waspada',
        'max_waspada',
        'min_meluap',
        'status_ketinggian_air',
        'waktu',
        'created_at',
        'updated_at'
    ];

    public function bantaran_sungai()
    {
        return $this->belongsTo(BantaranSungaiModel::class,'bantaran_sungai_id');
    }

    public function bantaranSungai()
    {
        return $this->belongsTo(BantaranSungaiModel::class, 'bantaran_sungai_id', 'uuid');
    }

}
