Foodiful
테이블 (13)
게시판 (Board)
- id — Int — 기본 키 — NOT NULL — Auto Increment
- 제목 (title) — String — NOT NULL
- 타입 (type) — String — NOT NULL — 게시판 종류
- 내용 (content) — String — NOT NULL
- 작성일자 (publishedAt) — DateTime — NOT NULL — default(now)
- 작성자 (author) — Enum — NOT NULL — Enum = User | Admin
계정 (account)
- id (userId) — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- userId (refreshToken) — String
- 로그인일시 (loginAt) — DateTime
상품 (product)
- id (productId) — Int — 기본 키 — NOT NULL — Auto Increment
- cartId — Int — 외래 키 → 장바구니.id — NOT NULL — Auto Increment
- 이름 (name) — String — NOT NULL
- 부제목 (subTitle) — String — NOT NULL
- 가격 (price) — Int — NOT NULL
- 할인율 (discount) — Int — NOT NULL — 할인율 기본값 0
- 설명 (description) — String — NOT NULL
- 설명 이미지 (descImg) — String[]
- 배달 여부 (deliver) — Boolean — NOT NULL
- 상품 카테고리 (categories) — String[]
- 수량 (quantity) — Int — NOT NULL — default(0)
상품 리뷰 (productReview)
- id (reviewId) — Int — 기본 키 — NOT NULL — Auto Increment
- productId — Int — 외래 키 → 상품.id — NOT NULL — Auto Increment
- userId — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- 작성시간 (createdAt) — DateTime — NOT NULL
- 비밀 여부 (secret) — Boolean — NOT NULL
- 내용 (comment) — String — NOT NULL
- 평점 (rating) — Float — NOT NULL
상품 좋아요 (product-like)
- id (userId) — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- id (productId) — Int — 외래 키 → 상품.id — NOT NULL — Auto Increment
예약 (reservation)
- Key (reserveId) — Int — 기본 키 — NOT NULL — Auto Increment
- Field (reserveDate) — String — NOT NULL
- id (userId) — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- id (classId) — Int — 외래 키 → 클래스.id — NOT NULL — Auto Increment
- Field
유저 (user)
- id (userId) — Int — 기본 키 — NOT NULL — Auto Increment
- 이메일 (email) — String — NOT NULL
- 이름 (name) — String — NOT NULL
- 비밀번호 (password) — String — NOT NULL
- 핸드폰번호 (phone) — String — NOT NULL
- 생성일자 (createdAt) — DateTime — NOT NULL — 유저 생성 일자
- 삭제일자 (deleted) — Boolean — NOT NULL — default(false)
- 업데이트일자 (updatedAt) — DateTime
- Role — Enum — NOT NULL — Enum = User | Admin
장바구니 (Cart)
- id — Int — 기본 키 — NOT NULL — Auto Increment
- userId — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- product (product[]) — Product[] — NOT NULL
- 수량 (quantity) — Int — NOT NULL
- 가격 (price) — Int — NOT NULL
주문 (order)
- Key (orderId) — String — 기본 키 — NOT NULL
- 주문자아아디 (userId) — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- 주문일자 (orderDate) — DateTime — NOT NULL — default(now)
- 배송받는사람 (deliverName) — String — NOT NULL
- 배송지 (deliverAddress) — String — NOT NULL
- 받는사람번호 (deliverPhone) — String — NOT NULL
- 우편번호 (postalCode) — Int — NOT NULL
- 배송메시지 (requirement) — String
- 주문 상태 (orderStatus) — Boolean — NOT NULL — default(PROCEEDING)
- 총 가격 (totalPrice) — Int — NOT NULL
- 배송지 상세주소 (deliverSpecificAddress) — String — NOT NULL
- 총 개수 (quantity) — Int — NOT NULL
주문상품 (order-product)
- 주문상품아이디 (id) — Int — 기본 키 — NOT NULL — Auto Increment
- 상품id (productId) — Int — 외래 키 → 상품.id — NOT NULL — Auto Increment
- 주문id (orderId) — Int — 외래 키 → 주문.Key — NOT NULL — Auto Increment
- 주문수량 (orderCount) — Int — NOT NULL
- 주문가격 (orderPrice) — Int — NOT NULL
- 추가상품 (additionalCount) — Boolean — NOT NULL — default(false)
클래스 (class)
- id (classId) — Int — 기본 키 — NOT NULL — Auto Increment
- 클래스 이름 (name) — String — NOT NULL
- 가격 (price) — Int — NOT NULL
- 할인율 (discount) — Int — NOT NULL — 할인율 기본값 0
- 설명 (description) — String — NOT NULL
- 설명 이미지 (descImg) — String[] — NOT NULL
- 수업 시간 (classDuration) — Int — NOT NULL
클래스 리뷰 (classReview)
- Key (classReviewId) — Int — 기본 키 — NOT NULL — Auto Increment
- userId — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- classId — Int — 외래 키 → 클래스.id — NOT NULL — Auto Increment
- 생성일자 (createdAt) — DateTime — NOT NULL — default(now())
- 업데이트일자 (updatedAt) — DateTime
- 비밀여부 (secret) — Boolean — NOT NULL — false
- 내용 (comment) — String — NOT NULL
- 평점 (rating) — Float
클래스 좋아요 (class-like)
- id (userId) — Int — 외래 키 → 유저.id — NOT NULL — Auto Increment
- id (classId) — Int — 외래 키 → 클래스.id — NOT NULL — Auto Increment