⚝
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 :
ScheduleDay.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; /** * App\Models\ScheduleDay * * @property int $id * @property int $doctor_id * @property string $per_patient_time * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property-read \App\Models\Doctor $doctor * * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay query() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereDoctorId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay wherePerPatientTime($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereSerialVisibility($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereUpdatedAt($value) * * @mixin \Eloquent * * @property int $schedule_id * @property string $available_on * @property string $available_from * @property string $available_to * * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereAvailableFrom($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereAvailableOn($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereAvailableTo($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ScheduleDay whereScheduleId($value) * * @property-read Schedule $schedule */ class ScheduleDay extends Model { /** * Validation rules * * @var array */ public static $rules = [ 'doctor_id' => 'required', 'available_on' => 'required', 'available_from' => 'required', 'available_to' => 'required', ]; /** * @var string */ public $table = 'schedule_days'; /** * @var array */ public $fillable = [ 'doctor_id', 'schedule_id', 'available_on', 'available_from', 'available_to', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'doctor_id' => 'integer', ]; } public function doctor(): BelongsTo { return $this->belongsTo(Doctor::class, 'doctor_id'); } public function schedule(): BelongsTo { return $this->belongsTo(Schedule::class, 'schedule_id'); } public function prepareScheduleDay() { return [ 'available_on' => $this->available_on ?? __('messages.common.n/a'), 'available_from' => $this->available_from ?? __('messages.common.n/a'), 'available_to' => $this->available_to ?? __('messages.common.n/a'), ]; } }