Week5
Tables (4)
Comments (comments)
- Comment ID (id) — BIGINT — Primary key — NOT NULL
- Post ID (post_id) — BIGINT — Primary key — NOT NULL
- Author ID (author_id) — BIGINT — Primary key — NOT NULL
- Parent ID (parent_id) — BIGINT — Primary key — NOT NULL
- Content (content) — TEXT
- Created At (created_at) — DATETIME
- Updated At (updated_at) — DATETIME
- Deleted At (deleted_at) — DATETIME
- User ID (id2) — BIGINT — Foreign key → Users.User ID — NOT NULL
- Post ID (id3) — BIGINT — Foreign key → Posts.Post ID — NOT NULL
- Author ID (author_id2) — BIGINT — Foreign key → Posts.Author ID — NOT NULL
- Comment ID (id4) — BIGINT — Foreign key → Comments.Comment ID — NOT NULL
- Post ID (post_id2) — BIGINT — Foreign key → Comments.Post ID — NOT NULL
- Author ID (author_id3) — BIGINT — Foreign key → Comments.Author ID — NOT NULL
- Parent ID (parent_id2) — BIGINT — Foreign key → Comments.Parent ID — NOT NULL
Post Likes (post_likes)
- Like ID (id) — BIGINT — Primary key — NOT NULL
- Post ID (post_id) — BIGINT — Primary key — NOT NULL
- User ID (user_id) — BIGINT — Primary key — NOT NULL
- Created At (created_at) — DATETIME
- User ID (id2) — BIGINT — Foreign key → Users.User ID — NOT NULL
- Post ID (id3) — BIGINT — Foreign key → Posts.Post ID — NOT NULL
- Author ID (author_id) — BIGINT — Foreign key → Posts.Author ID — NOT NULL
Posts (posts)
- Post ID (id) — BIGINT — Primary key — NOT NULL
- Author ID (author_id) — BIGINT — Primary key — NOT NULL
- Title (title) — VARCHAR(100)
- Content (content) — TEXT
- Image URL (image) — VARCHAR(500)
- View Count (view_count) — INT
- Created At (created_at) — DATETIME
- Updated At (updated_at) — DATETIME
- Deleted At (deleted_at) — DATETIME
- User ID (id2) — BIGINT — Foreign key → Users.User ID — NOT NULL
Users (users)
- User ID (id) — BIGINT — Primary key — NOT NULL
- Email (email) — VARCHAR(255)
- Password (password) — VARCHAR(225)
- Nickname (nickname) — VARCHAR(20)
- Profile Image (profile_image) — VARCHAR(500)
- Created At (created_at) — DATETIME
- Updated At (updated_at) — DATETIME