Tech-Tales
Tables (12)
blog_stat
- id — BIGINT — Foreign key → blogs.id — NOT NULL — PK
- post_count (post_counts) — BIGINT — NOT NULL
- view_count — BIGINT — NOT NULL
- follower_count — BIGINT — NOT NULL
blog_tags
- blog_id — BIGINT — Foreign key → blogs.id — NOT NULL — PK
- tag_id — Foreign key → tags.id — NOT NULL — PK
blogs
- id — BIGINT — Primary key — NOT NULL — PK
- user_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- title — VARCHAR(100) — NOT NULL
- description — VARCHAR(255) — NOT NULL
- visibility — ENUM(PUBLIC, PRIVATE) — NOT NULL
- slug — VARCHAR(25) — NOT NULL — UK
comment_likes
- comment_id — BIGINT — Foreign key → comments.id — NOT NULL — PK
- user_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- liked_at — TIMESTAMPTZ — NOT NULL
comments
- id — BIGINT — Primary key — NOT NULL — PK
- user_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- post_id — BIGINT — Foreign key → posts.id — NOT NULL — PK
- content — VARCHAR(500) — NOT NULL
- depth — SMALLINT — NOT NULL — enum(0,1)
- is_deleted — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ
- parent_id — BIGINT — Foreign key → comments.id — PK
member_blog_follow
- blog_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- user_id — BIGINT — Foreign key → blogs.id — NOT NULL — PK
- created_at — TIMESTAMPTZ — NOT NULL
members
- id — BIGINT — Primary key — NOT NULL — PK
- email — VARCHAR(100) — NOT NULL — UK
- password — VARCHAR(50)
- provider — VARCHAR(20)
- provider_id — VARCHAR(255) — UK
- status — VARCHAR(20) — NOT NULL — enum(ACTIVE, DELETED)
- profile_url — VARCHAR(255)
- blog_count — BIGINT — NOT NULL — MAX(10)
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ
post_attachments
- id — BIGINT — Primary key — NOT NULL — PK
- post_id — BIGINT — Foreign key → posts.id — NOT NULL — PK
- file_url — VARCHAR(255) — NOT NULL — UK
- file_type — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
post_likes
- post_id — BIGINT — Foreign key → posts.id — NOT NULL — PK
- user_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- liked_at (Field) — TIMESTAMPTZ — NOT NULL
post_tags
- tag_id — Foreign key → tags.id — NOT NULL — PK
- post_id — BIGINT — Foreign key → posts.id — NOT NULL — PK
posts
- id — BIGINT — Primary key — NOT NULL — PK
- user_id — BIGINT — Foreign key → members.id — NOT NULL — PK
- blog_id — BIGINT — Foreign key → blogs.id — NOT NULL — PK
- title — VARCHAR(100) — NOT NULL
- content — TEXT — NOT NULL
- status — VARCAHR(10) — NOT NULL — enum(PUBLIC, PRIVATE)
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ
tags
- id — Primary key — NOT NULL — PK
- name — NOT NULL — UK