ALLREVIEW
Tables (8)
Comments
- Key — Foreign key → Users.Key — NOT NULL
- Key (Key2) — Foreign key → Posts.Key — NOT NULL
- Key (Key22) — Foreign key → Posts.Key — NOT NULL
- comment_id — INT
- post_id — INT
- user_id — INT
- content — TEXT
- created_at — TIMESTAMP
Follows
- Key — Foreign key → Users.Key — NOT NULL
- follower_id — INT
- following_id — INT
Likes
- Key — Foreign key → Users.Key — NOT NULL
- Key (Key2) — Foreign key → Posts.Key — NOT NULL
- Key (Key22) — Foreign key → Posts.Key — NOT NULL
- like_id — INT
- post_id — INT
- user_id — INT
- created_at — TIMESTAMP
LocationTags
- Key — Foreign key → Posts.Key — NOT NULL
- Key (Key2) — Foreign key → Posts.Key — NOT NULL
- location_id — INT
- post_id — INT
- location — VARCHAR(255)
PostImages
- Key — Foreign key → Posts.Key — NOT NULL
- Key (Key2) — Foreign key → Posts.Key — NOT NULL
- image_id — INT
- post_id — INT
- image_url — VARCHAR(255)
Posts
- Key — Primary key — NOT NULL
- Key (Key2) — Foreign key → Users.Key — NOT NULL
- post_id — INT
- user_id — INT
- content — TEXT
- location — VARCHAR(255)
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
UserTags
- Key — Foreign key → Users.Key — NOT NULL
- tag_id — INT
- post_id — INT
- user_id — INT
Users
- Key — Primary key — NOT NULL
- user_id — INT
- username — VARCHAR(50) — NOT NULL
- phone_number — VARCHAR(15) — NOT NULL
- email — VARCHAR(100)
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(50)
- profile_picture — VARCHAR(255)
- website — VARCHAR(255)
- introduction — TEXT
- birth_date — DATE
- gender — ENUM('male', 'female', 'other')
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
- CHECK — (DATEDIFF(CURDATE()
- birth_date) — >=