Skip to content

CONV-295: Create ApiKey model and relations#255

Merged
menvil merged 1 commit into
developfrom
feature/CONV-295-create-api-key-model-and-relations
Jun 3, 2026
Merged

CONV-295: Create ApiKey model and relations#255
menvil merged 1 commit into
developfrom
feature/CONV-295-create-api-key-model-and-relations

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds ApiKey model with user() relation and isRevoked() helper
  • Adds User::apiKeys() HasMany relation
  • Adds ApiKeyFactory with revoked() state

Test plan

  • ApiKey belongs to User
  • User has many api keys
  • isRevoked() returns true/false correctly
  • composer test passes (538 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds an ApiKey model and user relations to support per-user API keys. Addresses Linear CONV-295 with revoke checks and a factory for testing.

  • New Features
    • ApiKey model with fillable fields and datetime casts for last_used_at and revoked_at.
    • user() belongsTo and User::apiKeys() hasMany relations.
    • isRevoked() helper based on revoked_at.
    • ApiKeyFactory with revoked() state.
    • Feature tests covering relations and revoke logic.

Written for commit 81167be. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b34e547d-6d1b-494c-92ac-56e89632993a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-295-create-api-key-model-and-relations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@menvil menvil merged commit 86ceafc into develop Jun 3, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant