ClientFavoriteProvider.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider newModelQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider newQuery()
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider onlyTrashed()
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider query()
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereClientId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereCreatedAt($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereDeletedAt($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereId($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereNotes($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereProviderId($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider whereUpdatedAt($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider withTrashed(bool $withTrashed = true)
  29. * @method static \Illuminate\Database\Eloquent\Builder<static>|ClientFavoriteProvider withoutTrashed()
  30. * @mixin \Eloquent
  31. */
  32. class ClientFavoriteProvider extends Model
  33. {
  34. use HasFactory, SoftDeletes;
  35. protected $fillable = [
  36. 'client_id',
  37. 'provider_id',
  38. 'notes',
  39. ];
  40. protected $casts = [
  41. 'created_at' => 'datetime',
  42. 'updated_at' => 'datetime',
  43. 'deleted_at' => 'datetime',
  44. ];
  45. public function client(): BelongsTo
  46. {
  47. return $this->belongsTo(Client::class);
  48. }
  49. public function provider(): BelongsTo
  50. {
  51. return $this->belongsTo(Provider::class);
  52. }
  53. }