<?php

namespace App\Models;

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

class NamaPos extends Model
{
    use HasFactory;

    protected $table = 'nama_pos';
    protected $primaryKey = 'id';
    public $incrementing = false;
    protected $keyType = 'string';

    protected $fillable = [
        'id','nama','jenis','tanggal','lokasi','grace_period','manless','area'
    ];

    public function posParams() {
        return $this->hasOne(ConfigPos::class, 'id_pos', 'id');
    }

    public function posHardware() {
        return $this->hasOne(ConfigHardware::class, 'id_pos', 'id');
    }
}
