Skip to content

Creator entity with User relation#115

Merged
aji70 merged 1 commit into
MyFanss:mainfrom
Mimah97:feature/creator-entity
Feb 20, 2026
Merged

Creator entity with User relation#115
aji70 merged 1 commit into
MyFanss:mainfrom
Mimah97:feature/creator-entity

Conversation

@Mimah97
Copy link
Copy Markdown
Contributor

@Mimah97 Mimah97 commented Feb 20, 2026

Add Creator entity with User relation

Summary

Introduces a Creator entity as a one-to-one extension of User when user.is_creator is true, for creator-specific fields without duplicating user data.

Changes

  • User entity: Added id, email, is_creator, created_at, updated_at plus OneToOne relation to Creator
  • Creator entity: id, user_id (unique FK to User), bio, subscription_price, currency, is_verified, created_at, updated_at
  • Relation: OneToOne between User and Creator with onDelete: 'CASCADE' when User is deleted
  • UsersModule: Registers User and Creator with TypeORM
  • Docs: Entity comments and src/creators/README.md describing the relation and cascade behavior
  • Test: Unit test to create Creator and load it with User

Acceptance criteria

  • Creator entity exists and can be created/queried
  • Relation to User works; creator loads with user
  • Migration/sync runs without errors
  • Cascade delete when User is deleted
  • Index on user_id (unique constraint)
  • is_creator on User documented as matching presence of Creator row
    closes Add Creators module – entity #30

@aji70 aji70 merged commit fd902ce into MyFanss:main Feb 20, 2026
3 checks passed
aji70 added a commit that referenced this pull request Apr 30, 2026
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.

Add Creators module – entity

2 participants