Ecommerce
Tables (21)
ads
- id — bigint — Primary key — NOT NULL
- name — varchar(50) — NOT NULL
- link — text — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp
block_users
- user_id — bigint — Foreign key → users.id — NOT NULL
- blocked_user_id — bigint — Foreign key → users.id — NOT NULL
- created_at — timestamp — NOT NULL
categories
- id — int4 — Primary key — NOT NULL
- child_category_id — int4 — Foreign key → categories.id — NOT NULL
- name — varchar(20)
- created_at — timestamp — NOT NULL
- updated_at — timestamp
chat_messages
- id — bigint — Primary key — NOT NULL
- chat_room_id — bigint — Foreign key → chat_room.id — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- message — varchar(500)
- is_read — bool
- created_at — timestamp
- updated_at — timestamp
chat_room
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- goods_id — bigint — Foreign key → products.id — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp
evaluation_items
- id — int4 — Primary key — NOT NULL
- score — numeric(3,1) — NOT NULL
- text — varchar(20) — NOT NULL
file_types
- id — int4 — Primary key — NOT NULL
- name — varchar(100) — NOT NULL
files
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- type — varchar(50)
- name — varchar(255)
- created_at — timestamp
- updated_at — timestamp
- id2 — int4 — Foreign key → file_types.id — NOT NULL
goods_imgs
- goods_id — bigint — Foreign key → products.id — NOT NULL
- file_id — bigint — Foreign key → files.id — NOT NULL
notice
- id — bigint — Primary key — NOT NULL
- author — VARCHAR(255)
- title — VARCHAR(255) — NOT NULL
- contents — VARCHAR(255) — NOT NULL
- created_at — VARCHAR(255) — NOT NULL
- updated_at — VARCHAR(255)
notice alarm (Untitled)
- notice_id — bigint — Foreign key → notice.id — NOT NULL
- alarm_id — bigint — Foreign key → notifications.id — NOT NULL
notification_keywords
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- keyword — varchar(10)
- created_at — timestamp
- updated_at — timestamp
notifications
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- message — varchar(255)
- is_read — bool
- type — enum
- created_at — timestamp
- updated_at — timestamp
products (goods)
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- category_id — int4 — Foreign key → categories.id — NOT NULL
- title — varchar(100) — NOT NULL
- status — enum — NOT NULL
- sell_price — int4
- view_count — int4 — NOT NULL
- description — text — NOT NULL
- refreshed_at — timestamp
- created_at — timestamp — NOT NULL
- updated_at — timestamp
report_items
- id — int4 — Primary key — NOT NULL
- name — varchar(100) — NOT NULL
reports
- id — bigint — Primary key — NOT NULL
- report_type_id — int4 — Foreign key → report_items.id — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- goods_id — bigint — Foreign key → products.id — NOT NULL
- type — varchar(25) — NOT NULL
- description — varchar(1000) — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp
trading_reviews
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- goods_id — bigint — Foreign key → products.id — NOT NULL
- evaluation_items — int4 — Foreign key → evaluation_items.id — NOT NULL
- message — varchar(255)
- created_at — timestamp — NOT NULL
- updated_at — timestamp
user_ads
- ads_id — bigint — Foreign key → ads.id — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
user_logs
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- ip — varchar(15) — NOT NULL
- device — varchar(50) — NOT NULL
- page — varchar(255) — NOT NULL
- uri — varchar(255)
- event — varchar(20) — NOT NULL
- created_at — timestamp — NOT NULL
users
- id — bigint — Primary key — NOT NULL
- role — enum — NOT NULL
- email — email
- password — VARCHAR(255)
- mobile_number — varchar(11) — NOT NULL
- rating_score — numeric(3,1) — NOT NULL
- profile_img — bigint — Foreign key → files.id
- activated — bool — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp
wish_lists
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- id2 — bigint — Foreign key → products.id — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp