Notification.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * @property int $id
  7. * @property string $origin_table
  8. * @property int $origin_id
  9. * @property int|null $unit_id
  10. * @property int|null $franchisee_id
  11. * @property string $notification_type
  12. * @property string $title
  13. * @property string $message
  14. * @property string|null $url
  15. * @property string|null $action_text
  16. * @property string $priority
  17. * @property string|null $expires_at
  18. * @property int $created_by_user_id
  19. * @property \Illuminate\Support\Carbon|null $created_at
  20. * @property \Illuminate\Support\Carbon|null $updated_at
  21. * @property string|null $deleted_at
  22. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification newModelQuery()
  23. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification newQuery()
  24. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification query()
  25. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereActionText($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereCreatedAt($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereCreatedByUserId($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereDeletedAt($value)
  29. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereExpiresAt($value)
  30. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereFranchiseeId($value)
  31. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereId($value)
  32. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereMessage($value)
  33. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereNotificationType($value)
  34. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereOriginId($value)
  35. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereOriginTable($value)
  36. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification wherePriority($value)
  37. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereTitle($value)
  38. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereUnitId($value)
  39. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereUpdatedAt($value)
  40. * @method static \Illuminate\Database\Eloquent\Builder<static>|Notification whereUrl($value)
  41. * @mixin \Eloquent
  42. */
  43. class Notification extends Model
  44. {
  45. use HasFactory;
  46. protected $table = 'notifications';
  47. protected $guarded = [
  48. 'id', // Add more fields that shouldn't be edited here
  49. ];
  50. protected $casts = [
  51. 'created_at' => 'datetime',
  52. 'updated_at' => 'datetime',
  53. // Add your casts here (e.g., 'is_active' => 'boolean')
  54. ];
  55. // Relationships
  56. // Business Logic Methods
  57. // Custom Finders
  58. // Query Scopes
  59. }