Commit Graph

2 Commits (ebdcd141bbb0216a86a720d4947b58d590dbcfcb)

Author SHA1 Message Date
boban 6a96b8e0a3 fix(models): null-guard isExpired, remove FK from guarded, add return types and casts
- Add null check to WorkspaceInvitation::isExpired() to prevent null errors
- Remove foreign key columns from protected $guarded to prevent silent mass-assignment drops in Workspace, Link, and Domain models
- Add explicit return types (HasMany, BelongsTo) to User relationship methods
- Add return type to Click::link() relationship method
- Add protected $casts for LinkVariant (weight, clicks_count, conversions_count)

Fixes code quality and type safety issues in domain models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 00:27:15 +02:00
boban d0bb8f92ee feat(models): add core domain models
Creates Workspace, WorkspaceMember, WorkspaceInvitation, Link,
LinkVariant, Click (append-only), Plan, and Domain Eloquent models with
correct relationships. Updates User model with SoftDeletes, ULID
auto-generation on create, guarded/casts, and workspace relationships.
Fixes ProfileTest assertion to match SoftDeletes behavior on User.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 00:19:51 +02:00