ClientFavoriteProvider.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7. /**
  8. * @property int $id
  9. * @property int $client_id
  10. * @property int $provider_id
  11. * @property string|null $notes
  12. * @property \Illuminate\Support\Carbon|null $created_at
  13. * @property \Illuminate\Support\Carbon|null $updated_at
  14. * @property \Illuminate\Support\Carbon|null $deleted_at
  15. * @property-read \App\Models\Client $client
  16. * @property-read \App\Models\Provider $provider
  17. *
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider newModelQuery()
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider newQuery()
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider onlyTrashed()
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider query()
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereClientId($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereCreatedAt($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereDeletedAt($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereId($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereNotes($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereProviderId($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereUpdatedAt($value)
  29. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider withTrashed(bool $withTrashed = true)
  30. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider withoutTrashed()
  31. *
  32. * @mixin \Eloquent
  33. */
  34. class ClientFavoriteProvider extends Model
  35. {
  36. use HasFactory, SoftDeletes;
  37. protected $fillable = [
  38. 'client_id',
  39. 'provider_id',
  40. 'notes',
  41. ];
  42. protected $casts = [
  43. 'created_at' => 'datetime',
  44. 'updated_at' => 'datetime',
  45. 'deleted_at' => 'datetime',
  46. ];
  47. public function client(): BelongsTo
  48. {
  49. return $this->belongsTo(Client::class);
  50. }
  51. public function provider(): BelongsTo
  52. {
  53. return $this->belongsTo(Provider::class);
  54. }
  55. }