lkshop ERD
Tables (18)
Copy Of Copy Of Untitled2 (product_status_codes)
- Key (id) — int — Primary key — NOT NULL — 1: 신상품, 2: 프리오더, 3: 이월상품
- Field (name) — text — NOT NULL — UNIQUE
Copy Of Untitled (category_codes)
- Key (id) — int — Primary key — NOT NULL
- Field (name) — text — NOT NULL — UNIQUE
- Field — int — NOT NULL — 대분류 / 1: 의류, 2: 가방, 3: 액세서리, 4: 슈즈, 5: 키즈
Copy Of Untitled2 (gender_codes)
- Key (id) — int — Primary key — NOT NULL — 1: 여성, 2: 남성, 3: 공용, 4: 아동
- Field (name) — text — NOT NULL — UNIQUE
Copy Of Untitled3 (loi_attachments (첨부파일))
- Key (id) — int — Primary key — NOT NULL
- Key (loi_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (user_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (original_name) — text — NOT NULL
- Field (mime_type) — text — NOT NULL
- Field (blob) — bytea — NOT NULL
- Field (created_at) — timestamp — NOT NULL
Copy Of Untitled4 (notices (공지 정보))
- Key (id) — int — Primary key — NOT NULL
- Key (registerer) — int — Foreign key → Untitled.Key — NOT NULL
- Field (contents) — text — NOT NULL
- Field (to_date) — date — NOT NULL — 공지 기간
- Field (created_at) — timestamp — NOT NULL
Untitled (loi_items (상품))
- Key (id) — int — Primary key — NOT NULL
- Key (loi_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (sell_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (quantity) — int — NOT NULL
Untitled (admin_logs (관리자 행위 로그))
- Key (id) — int — Primary key — NOT NULL
- Key (user_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (type) — int — NOT NULL
- Field (ip) — int — NOT NULL
- Field (content) — text — NOT NULL
- Field (created_at) — timestamp — NOT NULL
Untitled (po_items (상품))
- Key (id) — int — Primary key — NOT NULL
- Key (po_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (sell_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (price) — numeric(14,2) — NOT NULL
- Field (currency) — text — NOT NULL
- Field (quantity) — int — NOT NULL
Untitled (pos (발주서 메타 정보))
- Key (id) — int — Primary key — NOT NULL
- Key (loi_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (buyer_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (seller_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (buyer_name) — text
- Field (seller_name) — text
- Field (buyer_com_name) — text
- Field (seller_com_name) — text
- Field (buyer_com_addr) — text
- Field (seller_com_addr) — text
- Field (buyer_phone_num) — text
- Field (seller_phone_num) — text
- Field (buyer_fax_num) — text
- Field (seller_fax_num) — text
- Field (buyer_email) — text
- Field (seller_email) — text
- Field (buyer_busi_num) — text
- Field (seller_busi_num) — text
- Field (purchase_cond) — text
- Field (delivery_cond) — text
- Field (packaging_note) — text
- Field (examination_note) — text
- Field (buyer_extra_note) — text
- Field (seller_extra_note) — text
- Field (buyer_confirm) — bool
- Field (seller_confirm) — bool
- Field (buyer_confirmed_at) — timestamp
- Field (seller_confirmed_at) — timestamp
- Field (created_at) — timestamp
Untitled (naver_oauths (네이버 로그인 연동 정보))
- Key (naver_id) — text — Primary key — NOT NULL
- Key (user_id) — int — Foreign key → Untitled.Key — NOT NULL
Untitled (loi_messages (협의 코멘트))
- Key (id) — int — Primary key — NOT NULL
- Key (loi_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (user_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (message) — text — NOT NULL
- Field (created_at) — timestamp — NOT NULL
Untitled (selling_products (판매 상품))
- Key (id) — int — Primary key — NOT NULL
- Key (product_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (seller_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (size) — text — NOT NULL
- Field (init_quantity) — int — NOT NULL
- Field (rem_quantity) — int — NOT NULL
- Field (option_price) — numeric(14,2)
- Field (selling_price) — numeric(14,2) — NOT NULL — Actual price displayed for clients
- Field (created_at) — timestamp — NOT NULL
Untitled (user_accounts (회원 정보))
- Key (id) — int — Primary key — NOT NULL
- Field (password_hash) — text
- Field (email) — text — NOT NULL
- Field (oauth_token) — text — unused
- Field (com_name) — text — NOT NULL
- Field (com_date_of_estab) — date
- Field (com_website) — text
- Field (phone_num) — text — NOT NULL
- Field (office_phone_num) — text
- Field (address1) — text — NOT NULL
- Field (address2) — text — NOT NULL
- Field (city) — text — NOT NULL
- Field (state) — text — NOT NULL
- Field (country) — text — NOT NULL
- Field (business_type) — int — NOT NULL — 1: 법인사업자, 2: 개인사업자, 3: 면세사업자, 4: 기타
- Field (language) — text
- Field (timezone) — text
- Field (buyer) — bool — NOT NULL — Only one of buyer, seller, and admin must be true
- Field (seller) — bool — NOT NULL
- Field (admin) — bool — NOT NULL
- Field (status) — int — NOT NULL — 10: 가입승인대기, 11: 가입요청거부됨, 20: 사용중, 30: 사용중지
- Field (login_tried_num) — int — NOT NULL
- Field (allowed_ip1) — text — Can be not null only if admin
- Field (allowed_ip2) — text — Can be not null only if admin
- Field (created_at) — timestamp — NOT NULL
- Field (last_signin_at) — timestamp — NOT NULL
- Field (grade) — int — NOT NULL
- Field (cumulative_amount) — int — NOT NULL — unused
- Field (name) — text — NOT NULL
- Field (position) — text — NOT NULL
- Field (marketing_email_agreed) — bool — NOT NULL
- Field (products_email_agreed) — bool — NOT NULL
- Field (logo_url) — text
Untitled (lois (구매의향서 메타 정보))
- Key (id) — int — Primary key — NOT NULL
- Key (buyer_id) — int — Foreign key → Untitled.Key — NOT NULL
- Key (seller_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (buyer_confirmed) — bool — NOT NULL
- Field (seller_confirmed) — bool — NOT NULL
- Field (buyer_confirmed_at) — timestamp
- Field (seller_confirmed_at) — timestamp
- Field (invoice_date) — date
- Field (due_date) — date
- Field (created_at) — timestamp — NOT NULL
Untitled (carts (카트))
- Key (user_id) — int — Foreign key → Untitled.Key — NOT NULL
- Field (contents) — json — NOT NULL — Specific fields to be determined
Untitled (products_common (상품 공통 정보))
- Key (id) — int — Primary key — NOT NULL
- Field (code) — text — NOT NULL
- Field (name) — text — NOT NULL
- Key (brand) — int — Foreign key → Untitled.Key — NOT NULL
- Key (origin) — int — Foreign key → Untitled.Key — NOT NULL
- Key (category) — int — Foreign key → Copy Of Untitled.Key — NOT NULL
- Key (gender) — int — Foreign key → Copy Of Untitled2.Key — NOT NULL — 1: 여성, 2: 남성, 3: 공용, 4: 아동
- Key (status) — int — Foreign key → Copy Of Copy Of Untitled2.Key — NOT NULL — 1: 신상품, 2: 프리오더, 3: 이월상품
- Field (season) — text — Cannot null if status is 3 (이월상품)
- Field (price) — numeric(14,2) — NOT NULL
- Field (discounted_price) — numeric(14,2)
- Field (currency) — text — NOT NULL
- Field (description) — text
- Field (hash_tags) — text
- Field (keywords) — text
- Field (color) — text
- Field (manufacturer) — text
- Field (purchase_conds) — text
- Field (material) — text
- Field (extra_info) — text
- Field (image1) — text
- Field (image2) — text
- Field (image3) — text
- Field (image4) — text
- Field (vat) — bool
- Field (delivery_fee) — numeric(14,2)
- Field (delivery_type) — text
- Field (delivery_cond) — text
- Field (delivery_payment) — text
- Field (free_ret_ex) — text
- Field (ret_delivery_fee) — text
- Field (as_contents) — text
- Field (as_phone_number) — text
- Field (seller_memo) — text
- Field (origin_text) — text
- Field (adult_only) — bool
Untitled (origin_codes)
- Key (id) — int — Primary key — NOT NULL
- Field (name) — text — NOT NULL — UNIQUE
Untitled (brand_codes)
- Key (id) — int — Primary key — NOT NULL
- Field (name) — text — NOT NULL — UNIQUE