chat
Tables (16)
cart_items
- id — BIGINT — Primary key — NOT NULL — 수정일
- cart_id — BIGINT — Foreign key → carts.id — NOT NULL — 찜 ID
- product_id — BIGINT — Foreign key → products.id — NOT NULL — 사용자 ID
- quantity — INT — NOT NULL — 상품 ID
- created_at — DATETIME — 생성일
- modified_at — DATETIME — 수정일
carts
- id — BIGINT — Primary key — NOT NULL — 장바구니 상품 ID
- user_id — BIGINT — Foreign key → members.id — NOT NULL — 장바구니 ID
- created_at — DATETIME — 상품 ID
- modified_at — DATETIME — 담은 수량
categories
- id — BIGINT — Primary key — NOT NULL — 대분류 ID
- name — VARCHAR(100) — NOT NULL — 생성일
- parent_id — BIGINT — Foreign key → categories.id — 수정일
- created_at — DATETIME — 상품 ID
- modified_at — DATETIME — 상품명
coupons
- id — BIGINT — Primary key — NOT NULL — 사용자 ID
- name — VARCHAR(100) — NOT NULL — 쿠폰 ID
- discount_value — DECIMAL(15, 2) — NOT NULL — 주문 ID
- quantity — INT — NOT NULL — 쿠폰 상태
- status — VARCHAR(100) — NOT NULL — 발급일시
- issue_start_at — DATETIME — NOT NULL — 사용일시
- issue_end_at — DATETIME — NOT NULL — 생성일
- use_start_at — DATETIME — NOT NULL — 수정일
- use_end_at — DATETIME — NOT NULL — 채팅방 ID
- created_at — DATETIME — 사용자 ID
- modified_at — DATETIME — 관리자 ID
members
- id — BIGINT — Primary key — NOT NULL — 사용자 이메일
- email — VARCHAR(255) — NOT NULL — 사용자 비밀번호
- password — VARCHAR(255) — NOT NULL — 사용자 이름
- name — VARCHAR(100) — NOT NULL — 사용자 전화번호
- phone — VARCHAR(20) — 사용자 역할
- role — VARCHAR(100) — NOT NULL — 현재 포인트
- point_balance — DECIMAL(15, 2) — 멤버십 등급 ID
- membership_id — BIGINT — Foreign key → memberships.id — 생성일
- created_at — DATETIME — 수정일
- modified_at — DATETIME — 카테고리 ID
memberships
- id — BIGINT — Primary key — NOT NULL — 멤버십 등급 ID
- name — VARCHAR(100) — NOT NULL — 등급명
- min_spent_amount — DECIMAL(15, 2) — NOT NULL — 등급 최소 누적 결제 금액
- point_rate — DECIMAL(5, 2) — NOT NULL — 포인트 적립률
- created_at — DATETIME — 생성일
- modified_at — DATETIME — 수정일
order_items
- id — BIGINT — Primary key — NOT NULL — 결제 ID
- order_id — BIGINT — Foreign key → orders.id — NOT NULL — 주문 ID
- product_id — BIGINT — Foreign key → products.id — NOT NULL — 결제금액
- product_name — VARCHAR(100) — NOT NULL — 결제일
- product_price — DECIMAL(15, 2) — NOT NULL — 주문일
- quantity — INT — NOT NULL — 수정일
- created_at — DATETIME — 환불일
- modified_at — DATETIME — 주문 환불 ID
orders
- id — BIGINT — Primary key — NOT NULL — 수정일
- order_number — VARCHAR(100) — NOT NULL — 주문상품 ID
- user_id — BIGINT — Foreign key → members.id — NOT NULL — 주문 ID
- total_amount — DECIMAL(15, 2) — NOT NULL — 상품 ID
- status — VARCHAR(100) — NOT NULL — 상품명
- used_points — DECIMAL(15, 2) — 상품 가격
- created_at — DATETIME — 주문 수량
- modified_at — DATETIME — 생성일
payments
- id — BIGINT — Primary key — NOT NULL — 환불금액
- order_id — BIGINT — Foreign key → orders.id — NOT NULL — 환불사유
- amount — DECIMAL(15, 2) — NOT NULL — 환불상태
- paid_at — DATETIME — NOT NULL — 생성일
- created_at — DATETIME — 수정일
- modified_at — DATETIME — 포인트 거래내역 ID
- refunded_at — DATETIME — 사용자 ID
point_transactions
- id — BIGINT — Primary key — NOT NULL — 발급 가능 수량
- user_id — BIGINT — Foreign key → members.id — NOT NULL — 쿠폰 상태
- order_id — BIGINT — Foreign key → orders.id — 발급 시작일시
- points — DECIMAL(15, 2) — NOT NULL — 발급 종료일시
- transaction_type — VARCHAR(100) — NOT NULL — 사용 시작일시
- expired_at — DATETIME — 사용 종료일시
- created_at — DATETIME — 생성일
- modified_at — DATETIME — 수정일
products
- id — BIGINT — Primary key — NOT NULL — 재고수량
- name — VARCHAR(100) — NOT NULL — 상품설명
- price — DECIMAL(15, 2) — NOT NULL — 상품상태
- stock — INT — NOT NULL — 카테고리 ID
- description — VARCHAR(255) — 조회수
- status — VARCHAR(100) — NOT NULL — 생성일
- category_id — BIGINT — Foreign key → categories.id — 수정일
- views — INT — 장바구니 ID
- created_at — DATETIME — 사용자 ID
- modified_at — DATETIME — 생성일
refunds
- id — BIGINT — Primary key — NOT NULL — 변동 포인트
- payment_id — BIGINT — Foreign key → payments.id — NOT NULL — 포인트 거래 타입
- price — DECIMAL(15, 2) — NOT NULL — 포인트 만료일
- reason — VARCHAR(255) — 생성일
- status — VARCHAR(100) — NOT NULL — 수정일
- created_at — DATETIME — 쿠폰 ID
- modified_at — DATETIME — 쿠폰명
user_coupons
- id — BIGINT — Primary key — NOT NULL — 생성일
- user_id — BIGINT — Foreign key → members.id — NOT NULL — 수정일
- coupon_id — BIGINT — Foreign key → coupons.id — NOT NULL — 메시지 ID
- order_id — BIGINT — Foreign key → orders.id — 채팅방 ID
- status — VARCHAR(100) — NOT NULL — 발신자 ID
- issued_at — DATETIME — 메시지 내용
- used_at — DATETIME — 메시지 타입
- created_at — DATETIME — 생성일
- modified_at — DATETIME — 수정일
wishlists
- id — BIGINT — Primary key — NOT NULL — 주문번호
- user_id — BIGINT — Foreign key → members.id — NOT NULL — 주문한 사용자 ID
- product_id — BIGINT — Foreign key → products.id — NOT NULL — 주문금액
- created_at — DATETIME — 주문상태
- modified_at — DATETIME — 주문 시 사용한 포인트