<?php

namespace App\Models\OLDLMS;

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

class JadwalDokter extends Model
{
    use HasFactory, SoftDeletes;

    const CREATED_AT = 'dCreateOn';
    const UPDATED_AT = 'dUpdateOn';
    const DELETED_AT = 'dDeleteOn';

    protected $connection = 'oldlms';

    protected $table = 'tx_jadwal_dokter';

    protected $primaryKey = 'nID';

    public function jadwalDokterDay()
    {
        return $this->hasMany(JadwalDokterDay::class, 'nIDJadwalDokter', 'nID');
    }

    public function healthcare()
    {
        return $this->belongsTo(Healthcare::class, 'nIDHealthCare', 'nID');
    }

}
