| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Models;
- use App\Enums\AppointmentStatusEnum;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Appointment extends Model
- {
- use SoftDeletes;
- protected $guarded = ['id'];
- protected function casts(): array
- {
- return [
- 'date' => 'date',
- 'requested_at' => 'datetime',
- 'status' => AppointmentStatusEnum::class,
- ];
- }
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class);
- }
- public function partnerAgreement(): BelongsTo
- {
- return $this->belongsTo(PartnerAgreement::class);
- }
- public function partnerAgreementService(): BelongsTo
- {
- return $this->belongsTo(PartnerAgreementService::class);
- }
- }
|