38 lines
809 B
PHP
Executable File
38 lines
809 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models\OLDLMS;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Dokter extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
const CREATED_AT = 'dCreateOn';
|
|
const UPDATED_AT = 'dUpdateOn';
|
|
const DELETED_AT = 'dDeleteOn';
|
|
|
|
protected $connection = 'oldlms';
|
|
|
|
protected $table = 'tm_dokter';
|
|
|
|
protected $primaryKey = 'nID';
|
|
|
|
public function jadwalDokter()
|
|
{
|
|
return $this->hasMany(JadwalDokter::class, 'nIDDokter', 'nID');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'nIDUser', 'nID');
|
|
}
|
|
|
|
public function speciality()
|
|
{
|
|
return $this->belongsTo(Speciality::class, 'nIDSpesialis', 'nID');
|
|
}
|
|
}
|