'datetime', 'consumed_at' => 'datetime', 'attempts' => 'integer', ]; } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function isExpired(): bool { return $this->expires_at->isPast(); } public function isConsumed(): bool { return $this->consumed_at !== null; } public function isExhausted(): bool { return $this->attempts >= self::MAX_ATTEMPTS; } }