⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
app
/
Models
/
View File Name :
OpdPrescription.php
<?php namespace App\Models; use App\Traits\PopulateTenantID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Stancl\Tenancy\Database\Concerns\BelongsToTenant; /** * App\Models\OpdPrescription * * @property int $id * @property int $opd_patient_department_id * @property int $category_id * @property int $medicine_id * @property string $dosage * @property int $dose_interval * @property int|null $day * @property int|null $time * @property string $instruction * @property string|null $header_note * @property string|null $footer_note * @property string|null $tenant_id * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property-read Collection|OpdPrescriptionItem[] $opdPrescriptionItems * @property-read int|null $opd_prescription_items_count * @property-read \App\Models\OpdPatientDepartment $patient * @property-read \App\Models\MultiTenant|null $tenant * * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription newQuery() * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription query() * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereOpdPatientDepartmentId($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereHeaderNote($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereFooterNote($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereTenantId($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|OpdPrescription whereUpdatedAt($value) * * @mixin \Eloquent */ class OpdPrescription extends Model { use BelongsToTenant, PopulateTenantID; public $table = 'opd_prescriptions'; public $fillable = [ 'opd_patient_department_id', 'header_note', 'footer_note', ]; /** * Validation rules * * @var array */ public static $rules = [ 'category_id.*' => 'required', 'dosage.*' => 'required', 'day.*' => 'required', 'dose_interval.*' => 'required', 'time.*' => 'required', 'instruction.*' => 'required', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'opd_patient_department_id' => 'integer', 'header_note' => 'string', 'footer_note' => 'string', ]; } public function patient(): BelongsTo { return $this->belongsTo(OpdPatientDepartment::class, 'opd_patient_department_id'); } public function opdPrescriptionItems(): HasMany { return $this->hasMany(OpdPrescriptionItem::class, 'opd_prescription_id'); } }