AppointmentExam.php 582 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. class AppointmentExam extends Model
  6. {
  7. protected $guarded = ['id'];
  8. protected function casts(): array
  9. {
  10. return [
  11. 'service_price' => 'decimal:2',
  12. ];
  13. }
  14. public function appointment(): BelongsTo
  15. {
  16. return $this->belongsTo(Appointment::class);
  17. }
  18. public function partnerAgreementService(): BelongsTo
  19. {
  20. return $this->belongsTo(PartnerAgreementService::class)->withTrashed();
  21. }
  22. }