PlanPick
Tables (10)
comments
- id — INT — Primary key — NOT NULL
- Key (post_id) — INT — Foreign key → posts.Key — NOT NULL
- id (user_id) — INT — Foreign key → users.id — NOT NULL
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP
- is_deleted — BOOLEAN — NOT NULL
likes
- Key (id) — INT — Primary key — NOT NULL
- Key (post_id) — INT — Foreign key → posts.Key — NOT NULL
- id (user_id) — INT — Foreign key → users.id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
places
- Key (place_id) — INT — Primary key — NOT NULL
- place_name — VARCHAR(100) — NOT NULL
- category — VARCHAR(50)
- address — VARCHAR(255)
- latitude — FLOAT
- longitude — FLOAT
- memo — TEXT
posts
- Key (id) — INT — Primary key — NOT NULL
- id (user_id) — INT — Foreign key → users.id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP
- views — INT
- is_deleted — BOOLEAN — NOT NULL
reports
- Key (report_id) — INT — Primary key — NOT NULL
- Key (target_id) — INT — Foreign key → posts.Key — NOT NULL
- id (target_type) — INT — Foreign key → posts.id — NOT NULL
- id (user_id) — INT — Foreign key → users.id — NOT NULL
- reason — VARCHAR(255) — NOT NULL
- description — TEXT
- created_at — TIMESTAMP
schedules
- Key (schedule_id) — INT — Primary key — NOT NULL
- trip_day_id — INT — Foreign key → trip_days.trip_day_id — NOT NULL
- Key (place_id) — INT — Foreign key → places.Key — NOT NULL
- order_in_day — INT — NOT NULL
- start_time — TIME
- end_time — TIME
- memo — TEXT
- region — VARCHAR(100)
stays
- (stays_id) — int — Primary key — NOT NULL
- Key (trip_id) — INT — Foreign key → trips.Key — NOT NULL
- stay_name — VARCHAR(100) — NOT NULL
- address — VARCHAR(255)
- check_in — DATETIME
- check_out — DATETIME
- memo — TEXT
trip_days
- trip_day_id — INT — Primary key — NOT NULL
- Key (trip_id) — INT — Foreign key → trips.Key — NOT NULL
- n_day — INT — NOT NULL
- d_day — DATE
- memo — TEXT
trips
- Key (trip_id) — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- start_date — DATE — NOT NULL
- end_date — DATE — NOT NULL
- memo — TEXT
- created_at — TIMESTAMP
users
- id — INT — Primary key — NOT NULL
- username — VARCHAR(50) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- pwd — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50)
- state — int
- created_at — TIMESTAMP