update schedule dokter

This commit is contained in:
pajri
2023-01-28 09:44:14 +07:00
parent 335e24b17c
commit 1ce2655b65
6 changed files with 280 additions and 50 deletions

View File

@@ -0,0 +1,27 @@
<?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');
}
}

View File

@@ -17,4 +17,11 @@ class Healthcare extends Model
protected $connection = 'oldlms';
protected $table = 'tm_healthcare';
protected $primaryKey = 'nID';
public function jadwalDokter()
{
return $this->hasMany(JadwalDokter::class, 'nIDHealthCare', 'nID');
}
}

View File

@@ -19,4 +19,14 @@ class JadwalDokter extends Model
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');
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Models\OLDLMS;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class JadwalDokterDay 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_detail';
protected $primaryKey = 'nID';
}