my-real-blog
Tables (9)
Posts (article)
- Key (article_id) — BIGINT — Primary key — NOT NULL
- Key (user_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Key (category_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Key (topic_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Field (title) — VARCHAR(100) — NOT NULL
- Field (content) — TEXT — NOT NULL
- Field (slug) — VARCHAR(100) — NOT NULL
- Field (thumbnail_url) — VARCHAR(255)
- Field (excerpt) — VARCHAR(150)
- Field (status) — ENUM — NOT NULL — PRIVATE, PUBLIC, DRAFT
- Field (published_date) — DATETIME — NOT NULL
- Field (reaction_count) — INT — NOT NULL
- Field (discussion_count) — INT — NOT NULL
Untitled (topics)
- Key (topic_id) — BIGINT — Primary key — NOT NULL
- Field (name) — VARCHAR(25) — NOT NULL
Untitled (discussions)
- Key (discussion_id) — BIGINT — Primary key — NOT NULL
- Key (user_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Key (article_id) — BIGINT — Foreign key → Posts.Key — NOT NULL
- Key (parent_discussion_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Field (content) — VARCHAR — NOT NULL
- Field (depth) — INT — NOT NULL
Untitled (article_reaction)
- Key (article_reaction_id) — BIGINT — Primary key — NOT NULL
- Key (article_id) — BIGINT — Foreign key → Posts.Key — NOT NULL
- Key (user_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
Untitled (discussion_reaction)
- Key (discussion_reaction_id) — BIGINT — Primary key — NOT NULL
- Key (discussion_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Key (user_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
Untitled (article_attachment)
- Key (article_attachment_id) — BIGINT — Primary key — NOT NULL
- Field (url) — VARCHAR(255) — NOT NULL
- Key (article_id) — BIGINT — Foreign key → Posts.Key — NOT NULL
Untitled (users)
- Key (user_id) — BIGINT — Primary key — NOT NULL
- Key (profile_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
- Field (username) — VARCHAR(50) — NOT NULL — unique
- Field (email) — VARCHAR(100) — NOT NULL — unique
- Field (password) — VARCHAR(255) — NOT NULL
Untitled (profile)
- Key (profile_id) — BIGINT — Primary key — NOT NULL
- Field (display_name) — VARCHAR
- Field (avatar_url) — VARCHAR
- Field (bio) — VARCHAR
Untitled (categories)
- Key (category_id) — BIGINT — Primary key — NOT NULL
- Key (parent_category_id) — BIGINT — Foreign key → Untitled.Key
- Field (name) — VARCHAR — NOT NULL
- Field (depth) — INT
- Key (user_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL