shop_practice
Tables (6)
cart (장바구니 테이블)
- id (장바구니ID) — bigint auto_increment — Primary key — NOT NULL
- user_id (회원ID) — bigint not null — Foreign key → user.id — NOT NULL
- product_option_id (상품옵션ID) — bigint not null — Foreign key → product_option.id — NOT NULL
- cart_quantity (장바구니 수량) — bigint not null
order_item (주문 테이블)
- id (주문ID) — bigint auto_increment — Primary key — NOT NULL
- user_id (회원ID) — bigint not null — Foreign key → user.id — NOT NULL
- order_time (주문시각) — date-time not null
order_list (주문 내역 테이블)
- id (주문내역ID) — bigint auto_increment — Primary key — NOT NULL
- procudt_option_id (상품옵션ID) — bigint not null — Foreign key → product_option.id — NOT NULL
- order_item_id (주문ID) — bigint not null — Foreign key → order_item.id — NOT NULL
- order_quantity (주문 수량) — bigint not null
product (상품 테이블)
- id (상품ID) — bigint auto_increment — Primary key — NOT NULL
- name (상품명) — varchar(255) not null
product_option (상품 옵션 테이블)
- id (상품옵션ID) — bigint auto_increment — Primary key — NOT NULL
- product_id (상품ID) — bigint not null — Foreign key → product.id — NOT NULL
- width (너비) — bigint not null
- length (길이) — bigint not null
- stock (옵션별 재고) — bigint
- price (옵션별가격) — bigint not null
user (회원 테이블)
- id (회원ID) — bigint auto_increment — Primary key — NOT NULL
- name (이름) — varchar(255) not null
- email (이메일) — varchar(255) not null
- password (비밀번호) — varchar(255) not null
- address (주소) — varchar(255)
- role (회원 유형) — enum('member','admin') not null