Prescription
This commit is contained in:
38
app/Models/OLDLMS/Prescription.php
Normal file
38
app/Models/OLDLMS/Prescription.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\OLDLMS;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Prescription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
|
||||
// public $sStatusNames = [
|
||||
// 0 => 'Menunggu Konfirmasi',
|
||||
// 1 => 'Diterima',
|
||||
// 2 => 'Ditolak',
|
||||
// 3 => 'Selesai',
|
||||
// 4 => 'Expired',
|
||||
// ];
|
||||
|
||||
const CREATED_AT = 'dCreateOn';
|
||||
const UPDATED_AT = 'dUpdateOn';
|
||||
const DELETED_AT = 'dDeleteOn';
|
||||
|
||||
protected $connection = 'oldlms';
|
||||
|
||||
protected $table = 'tx_prescriptions';
|
||||
|
||||
// protected $appends = [
|
||||
// 'status_name',
|
||||
// ];
|
||||
|
||||
protected $casts = [
|
||||
'dTanggalResep' => 'datetime',
|
||||
];
|
||||
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class Plan extends Model
|
||||
{
|
||||
$this->attributes['start'] = empty($value) ? null : $value;
|
||||
}
|
||||
|
||||
|
||||
public function setEndAttribute($value)
|
||||
{
|
||||
$this->attributes['end'] = empty($value) ? null : $value;
|
||||
|
||||
Reference in New Issue
Block a user