'integer', 'blood_sugar' => 'integer', 'age' => 'integer', 'current_illness_1' => 'array', 'current_illness_2' => 'array', 'has_alergyto' => 'array', 'photos_before' => 'array', 'photos_after' => 'array', 'videos' => 'array', 'audio_files' => 'array', 'created_at' => JalaliDatetime::class, 'updated_at' => JalaliDatetime::class, ]; } public function getFullNameAttribute(): string { return trim($this->first_name . ' ' . $this->last_name); } public function creator(): BelongsTo { return $this->belongsTo(User::class, 'created_by'); } public function updator(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); } public function surgeryAppointment(): HasOne { return $this->hasOne(SurgeryAppointment::class); } public function prescriptions(): HasMany { return $this->hasMany(Prescription::class, 'patient'); } public function visits(): HasMany { return $this->hasMany(Visit::class, 'patient'); } }