PushNotificationLog.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Models;
  3. use App\Enums\PushNotificationTargetEnum;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. /**
  7. * @property int $id
  8. * @property string $label
  9. * @property int $user_id
  10. * @property PushNotificationTargetEnum $target
  11. * @property string $category
  12. * @property \Illuminate\Support\Carbon $sent_at
  13. * @property \Illuminate\Support\Carbon|null $created_at
  14. * @property \Illuminate\Support\Carbon|null $updated_at
  15. * @property-read \App\Models\User $user
  16. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog newModelQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog newQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog query()
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereCategory($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereCreatedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereLabel($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereSentAt($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereTarget($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereUpdatedAt($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|PushNotificationLog whereUserId($value)
  27. * @mixin \Eloquent
  28. */
  29. class PushNotificationLog extends Model
  30. {
  31. protected $guarded = ['id'];
  32. protected $casts = [
  33. 'sent_at' => 'datetime',
  34. 'target' => PushNotificationTargetEnum::class,
  35. ];
  36. public function user(): BelongsTo
  37. {
  38. return $this->belongsTo(User::class);
  39. }
  40. }