to-you-dream-1
Tables (21)
book_products
- id — BIGINT — Primary key — NOT NULL — 상품번호
- work_id — BIGINT — Foreign key → works.id — NOT NULL — 작품번호
- format — ENUM('전자책', '종이책') — NOT NULL — 상품형태
- price — INT — NOT NULL — 판매가
- stock — INT — 재고수량
- sale_status — ENUM('판매중', '품절', '판매중지') — 판매상태
- created_at — DATETIME — 등록일시
- updated_at — DATETIME — 수정일시
cart_items
- id — BIGINT — Primary key — NOT NULL — 장바구니번호
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- book_product_id — BIGINT — Foreign key → book_products.id — NOT NULL — 상품번호
- quantity — INT — NOT NULL — 수량
- created_at — DATETIME — 담은일시
coupons
- id — BIGINT — Primary key — NOT NULL — 쿠폰번호
- code — VARCHAR(30) — NOT NULL — 쿠폰코드
- name — VARCHAR(100) — 쿠폰명
- discount_type — ENUM('정액', '정률') — NOT NULL — 할인방식
- discount_value — INT — NOT NULL — 할인값
- starts_at — DATETIME — 시작일시
- ends_at — DATETIME — 종료일시
- created_at — DATETIME — 등록일시
genres
- id — INT — Primary key — NOT NULL — 장르번호
- name — VARCHAR(50) — NOT NULL — 장르명
- created_at — DATETIME — 등록일시
grades
- id — INT — Primary key — NOT NULL — 등급번호
- name — VARCHAR(20) — NOT NULL — 등급명
- min_amount — INT — 기준 최소구매액
- point_rate — DECIMAL(4, 2) — 적립률
inquiries
- id — BIGINT — Primary key — NOT NULL — 문의번호
- ip_listing_id — BIGINT — Foreign key → ip_listings.id — NOT NULL — 판권번호
- type — ENUM('소개서', '다운로드', '원고요청') — NOT NULL — 문의유형
- email — VARCHAR(255) — NOT NULL — 이메일
- company — VARCHAR(150) — 회사명
- country — VARCHAR(50) — 국가
- company_type — VARCHAR(50) — 회사유형
- position — VARCHAR(50) — 직책
- website — VARCHAR(255) — 웹사이트
- interested_rights — VARCHAR(255) — 관심권리
- agree_privacy — TINYINT(1) — 개인정보동의여부
- agree_marketing — TINYINT(1) — 마케팅동의여부
- status — ENUM('접수', '검토중', '승인', '거절', '완료') — 처리상태
- internal_memo — TEXT — 내부메모
- handled_by — BIGINT — Foreign key → users.id — 처리담당자
- handled_at — DATETIME — 처리일시
- created_at — DATETIME — 신청일시
ip_export_countries
- country — VARCHAR(50) — Primary key — NOT NULL — 국가명
- ip_listing_id — BIGINT — Foreign key → ip_listings.id — NOT NULL — 판권번호
ip_listing_rights
- right_type — ENUM('출판', '영상화', '오디오', '웹툰', '게임', '기타') — Primary key — NOT NULL — 권리종류
- ip_listing_id — BIGINT — Foreign key → ip_listings.id — NOT NULL — 판권번호
ip_listings
- id — BIGINT — Primary key — NOT NULL — 판권번호
- work_id — BIGINT — Foreign key → works.id — NOT NULL — 작품번호
- is_exclusive — TINYINT(1) — 독점여부
- brochure_url — VARCHAR(500) — 소개서파일
- created_at — DATETIME — 등록일시
- updated_at — DATETIME — 수정일시
meetings
- id — BIGINT — Primary key — NOT NULL — 미팅번호
- ip_listing_id — BIGINT — Foreign key → ip_listings.id — 판권번호
- requester_name — VARCHAR(100) — 신청자명
- company — VARCHAR(150) — 회사명
- email — VARCHAR(255) — NOT NULL — 이메일
- contact — VARCHAR(30) — 연락처
- scheduled_start — DATETIME — 시작일시
- scheduled_end — DATETIME — 종료일시
- method — ENUM('화상', '대면') — 미팅방식
- purpose — TEXT — 미팅목적
- status — ENUM('requested', 'accepted', 'rejected', 'completed') — 진행상태
- handled_by — BIGINT — Foreign key → users.id — 처리담당자
- created_at — DATETIME — 신청일시
nda_agreements
- id — BIGINT — Primary key — NOT NULL — NDA번호
- inquiry_id — BIGINT — Foreign key → inquiries.id — NOT NULL — 문의번호
- status — ENUM('pending', 'signing', 'done', 'rejected') — 서명상태
- provider — VARCHAR(30) — 서명서비스
- signed_at — DATETIME — 서명완료일시
- created_at — DATETIME — 등록일시
order_items
- id — BIGINT — Primary key — NOT NULL — 주문상세번호
- order_id — BIGINT — Foreign key → orders.id — NOT NULL — 주문번호
- book_product_id — BIGINT — Foreign key → book_products.id — NOT NULL — 상품번호
- quantity — INT — NOT NULL — 수량
- unit_price — INT — NOT NULL — 단가
orders
- id — BIGINT — Primary key — NOT NULL — 주문번호
- order_no — VARCHAR(30) — NOT NULL — 주문코드
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- receiver_name — VARCHAR(50) — 수령인명
- contact — VARCHAR(30) — 연락처
- total_amount — INT — NOT NULL — 총결제금액
- payment_method — ENUM('카드', '계좌이체', '간편결제') — 결제수단
- payment_status — ENUM('대기', '완료', '취소', '환불') — 결제상태
- shipping_status — ENUM('해당없음', '배송준비', '배송중', '배송완료') — 배송상태
- ordered_at — DATETIME — 주문일시
point_transactions
- id — BIGINT — Primary key — NOT NULL — 내역번호
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- amount — INT — NOT NULL — 포인트금액
- type — ENUM('적립', '사용', '만료', '조정') — NOT NULL — 내역구분
- order_id — BIGINT — Foreign key → orders.id — 주문번호
- created_at — DATETIME — 등록일시
reviews
- id — BIGINT — Primary key — NOT NULL — 후기번호
- work_id — BIGINT — Foreign key → works.id — NOT NULL — 작품번호
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- rating — TINYINT — NOT NULL — 별점
- content — TEXT — 후기내용
- is_purchased — TINYINT(1) — 구매여부
- status — ENUM('정상', '숨김', '신고') — 후기상태
- created_at — DATETIME — 등록일시
- deleted_at — DATETIME — 삭제일시
submissions
- id — BIGINT — Primary key — NOT NULL — 투고번호
- author_name — VARCHAR(100) — NOT NULL — 작가명
- work_title — VARCHAR(200) — NOT NULL — 작품명
- genre_id — INT — Foreign key → genres.id — 장르번호
- email — VARCHAR(255) — 이메일
- contact — VARCHAR(30) — 연락처
- file_url — VARCHAR(500) — 원고파일
- status — ENUM('접수', '검토중', '승인', '거절') — 검토상태
- internal_memo — TEXT — 내부메모
- received_at — DATETIME — 접수일시
translations
- id — BIGINT — Primary key — NOT NULL — 번역번호
- work_id — BIGINT — Foreign key → works.id — NOT NULL — 작품번호
- source_text — TEXT — 원문
- translated_text — TEXT — 번역문
- compressed_text — TEXT — 압축본
- status — ENUM('작성중', '저장됨', '완료') — 작업상태
- updated_at — DATETIME — 수정일시
user_coupons
- id — BIGINT — Primary key — NOT NULL — 회원쿠폰번호
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- coupon_id — BIGINT — Foreign key → coupons.id — NOT NULL — 쿠폰번호
- used_at — DATETIME — 사용일시
users
- id — BIGINT — Primary key — NOT NULL — 회원번호
- name — VARCHAR(50) — NOT NULL — 이름
- email — VARCHAR(255) — NOT NULL — 이메일
- password_hash — VARCHAR(255) — 비밀번호
- signup_provider — ENUM('email', 'kakao', 'naver') — 가입경로
- role — ENUM('customer', 'admin') — 권한
- grade_id — INT — Foreign key → grades.id — 등급번호
- point_balance — INT — 보유포인트
- agree_marketing — TINYINT(1) — 마케팅동의여부
- created_at — DATETIME — 등록일시
- updated_at — DATETIME — 수정일시
- deleted_at — DATETIME — 삭제일시
wishlists
- id — BIGINT — Primary key — NOT NULL — 찜번호
- user_id — BIGINT — Foreign key → users.id — NOT NULL — 회원번호
- book_product_id — BIGINT — Foreign key → book_products.id — NOT NULL — 상품번호
- created_at — DATETIME — 찜한일시
works
- id — BIGINT — Primary key — NOT NULL — 작품번호
- title — VARCHAR(200) — NOT NULL — 작품명
- author — VARCHAR(100) — NOT NULL — 작가명
- genre_id — INT — Foreign key → genres.id — 장르번호
- synopsis — TEXT — 줄거리
- cover_image — VARCHAR(500) — 표지이미지
- page_count — INT — 쪽수
- published_at — DATE — 출간일
- status — ENUM('연재중', '출간', '완결') — 출간상태
- created_at — DATETIME — 등록일시
- updated_at — DATETIME — 수정일시
- deleted_at — DATETIME — 삭제일시