Skip to content

Feature/post entity#119

Merged
aji70 merged 4 commits into
MyFanss:mainfrom
Mimah97:feature/post-entity
Feb 20, 2026
Merged

Feature/post entity#119
aji70 merged 4 commits into
MyFanss:mainfrom
Mimah97:feature/post-entity

Conversation

@Mimah97
Copy link
Copy Markdown
Contributor

@Mimah97 Mimah97 commented Feb 20, 2026

Add Post entity for creator content

Summary

Introduces a Post entity for creator content with free/paid types, drafts, and media URLs.

Changes

  • Post entity: id, creator_id, title, body, type (free|paid), price (nullable), media_urls (JSON array), published_at (nullable), created_at, updated_at
  • Relations: ManyToOne to Creator; OneToMany on Creator
  • Indexes: (creator_id, published_at) for creator listings; (type) for filtering
  • Validation: price null when type=free; price >= 0 when type=paid (enforced in entity hooks)
  • PostsModule: Registers Post entity with TypeORM
  • Docs: src/posts/README.md describing fields and validation

Behavior

  • Draft vs published: Draft when published_at is null; published when set
  • media_urls: Stored as JSON array of strings

Acceptance criteria

  • Post entity exists and syncs
  • Can create post with creator_id, title, body, type, price, media_urls
  • Relation to Creator works
  • media_urls stores array of URLs
  • Draft support (published_at null)
  • Price validation for free vs paid
    closes Add Posts/Content module – entity #34

@aji70 aji70 merged commit 0615ac1 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 Posts/Content module – entity

2 participants