CustomScheduleSpeciality.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. use Illuminate\Database\Eloquent\SoftDeletes;
  6. /**
  7. * @property int $id
  8. * @property int $custom_schedule_id
  9. * @property int $speciality_id
  10. * @property \Illuminate\Support\Carbon|null $created_at
  11. * @property \Illuminate\Support\Carbon|null $updated_at
  12. * @property \Illuminate\Support\Carbon|null $deleted_at
  13. * @property-read \App\Models\CustomSchedule $customSchedule
  14. * @property-read \App\Models\Speciality $speciality
  15. *
  16. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality newModelQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality newQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality onlyTrashed()
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality query()
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereCreatedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereCustomScheduleId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereDeletedAt($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereId($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereSpecialityId($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereUpdatedAt($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality withTrashed(bool $withTrashed = true)
  27. * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality withoutTrashed()
  28. *
  29. * @mixin \Eloquent
  30. */
  31. class CustomScheduleSpeciality extends Model
  32. {
  33. use SoftDeletes;
  34. protected $table = 'custom_schedules_specialities';
  35. protected $fillable = [
  36. 'custom_schedule_id',
  37. 'speciality_id',
  38. ];
  39. public function customSchedule(): BelongsTo
  40. {
  41. return $this->belongsTo(CustomSchedule::class);
  42. }
  43. public function speciality(): BelongsTo
  44. {
  45. return $this->belongsTo(Speciality::class);
  46. }
  47. }