<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
use App\Models\DataPasien;

class Pemeriksaan extends Model
{
  use SoftDeletes;

  protected $table = 'pemeriksaan';
  protected $guarded = [
    'p_id'
  ];

  protected $primaryKey = 'p_id';

  const CREATED_AT = 'p_created_at';
  const UPDATED_AT = 'p_updated_at';
  const DELETED_AT = 'p_deleted_at';

  public function dataPasien()
  {
    return $this->belongsTo(DataPasien::class, 'dp_id')->withTrashed();
  }
}
