update schedule dokter
This commit is contained in:
27
app/Models/OLDLMS/Dokter.php
Normal file
27
app/Models/OLDLMS/Dokter.php
Normal 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');
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
22
app/Models/OLDLMS/JadwalDokterDay.php
Normal file
22
app/Models/OLDLMS/JadwalDokterDay.php
Normal 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';
|
||||
}
|
||||
Reference in New Issue
Block a user