정산 배치 프로그램
테이블 (12)
Copy Of Untitled (product_statistics_monthly)
- Key (product_statistics_id) — bigint — 기본 키 — NOT NULL — 상품통계ID
- product_no — bigint — 외래 키 → product.product_no — NOT NULL — 상품 no
- Field (total_orders) — bigint — NOT NULL — 주문 총 건수
- Field (total_amount) — bigint — NOT NULL — 주문 총 금액
- Field (total_quantity) — bigint — NOT NULL — 주문 상품 총 개수
- Field (avg_order_amount) — decimal — NOT NULL — 평균 주문 금액
- Field (avg_order_quantity) — int — NOT NULL — 평균 주문 상품 개수
- Field (created_at) — datetime — NOT NULL — 통계 생성일
- Field (updated_at) — datetime — NOT NULL — 통계 수정일
Untitled (product_statistics_daily)
- Key (product_statistics_id) — bigint — 기본 키 — NOT NULL — 상품통계ID
- product_no — bigint — 외래 키 → product.product_no — NOT NULL — 상품 no
- Field (total_orders) — bigint — NOT NULL — 주문 총 건수
- Field (total_amount) — bigint — NOT NULL — 주문 총 금액
- Field (total_quantity) — bigint — NOT NULL — 주문 상품 총 개수
- Field (avg_order_amount) — decimal — NOT NULL — 평균 주문 금액
- Field (avg_order_quantity) — int — NOT NULL — 평균 주문 상품 개수
- Field (created_at) — datetime — NOT NULL — 통계 생성일
- Field (updated_at) — datetime — NOT NULL — 통계 수정일
claim_receipt
- claim_receipt_no — bigint — 기본 키 — NOT NULL — 클레임 접수 번호
- order_no — bigint — 외래 키 → order.order_no — NOT NULL — FK
- request_type — varchar(50) — NOT NULL — 클레임 요청 종류
- claim_status — varchar(50) — NOT NULL — 클레임 상태
- extra_fee_payer — varchar(50) — NOT NULL — 추가비용 부담 주체
- claim_reason — varchar(50) — NOT NULL — 클레임 사유
- completed_at — datetime — 클레임 처리 완료 시간
- created_at — datetime — NOT NULL — 생성시간
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제시간
claim_receipt_item
- claim_receipt_item_no — bigint — 기본 키 — NOT NULL — 클레임 접수 상품 no
- claim_receipt_no — bigint — 외래 키 → claim_receipt.claim_receipt_no — NOT NULL — FK
- order_item_no — bigint — 외래 키 → order_item.order_item_no — NOT NULL — FK
- claim_count — int — NOT NULL — 클레임 접수 상품 수량
- created_at — datetime — NOT NULL — 생성시간
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제시간
claim_refund_history
- claim_refund_no — bigint — 기본 키 — NOT NULL
- seller_no — bigint — 외래 키 → 판매자.seller_no — NOT NULL — 셀러 no
- claim_receipt_no — bigint — 외래 키 → claim_receipt.claim_receipt_no — NOT NULL — FK
- refund_cash_amount — decimal(14, 5) — NOT NULL — 현금성 환불 금액
- coupon_discount_amount — decimal(14, 5) — NOT NULL
- refund_mileage_amount — decimal(14, 5) — NOT NULL — 마일리지 환불 금액
- subtract_delivery_amount — decimal(14, 5) — NOT NULL — 배송비 차감 금액
- refund_delivery_amount — decimal(14, 5) — NOT NULL — 배송비 환불 금액
- (created_at) — datetime — NOT NULL — 생성시간
- Field2 (updated_at) — datetime — NOT NULL — 수정시간
- (deleted_at) — datetime — 삭제시간
- Field (refund_at) — datetime — 환불시간
order
- order_no — bigint — 기본 키 — NOT NULL — 주문번호
- paid_pg_amount — decimal(14, 5) — NOT NULL — 결제 금액
- used_mileage_amount — decimal(14, 5) — NOT NULL — 마일리지 사용 금액
- coupon_discount_amount — decimal(14, 5) — NOT NULL — 쿠폰 할인 금액
- paid_confirmed_at — datetime — 결제 완료일
- created_at — datetime — NOT NULL — 주문 생성일
- updated_at — datetime — NOT NULL — 주문 갱신일
- deleted_at — datetime — 삭제일
order_item
- order_item_no — bigint — 기본 키 — NOT NULL — 주문 상품 no
- order_no — bigint — 외래 키 → order.order_no — NOT NULL — FK
- order_item_snapshot_no — bigint — 외래 키 → order_item_snapshot.order_item_snapshot_no — NOT NULL — FK
- order_count — int — NOT NULL — 주문 수량
- item_delivery_status — int — 아이템 배송 상태
- purchase_confirmed_at — datetime — 구매 확정 시간
- shipped_complete_At — datetime — 배송 완료 시간
- created_at — datetime — NOT NULL — 생성시간
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제시간
order_item_snapshot
- order_item_snapshot_no — bigint — 기본 키 — NOT NULL — 주문 상품 스냅샷 no
- product_no — bigint — 외래 키 → product.product_no — NOT NULL — FK
- seller_no — bigint — 외래 키 → 판매자.seller_no — NOT NULL — FK
- sell_price — decimal(14, 5) — NOT NULL — 판매가
- supply_price — decimal(14, 5) — 공급가
- promotion_amount — decimal(14, 5) — 프로모션 할인가
- mileage_usage_amount — decimal(14, 5) — 마일리지 사용 금액
- default_delivery_amount — decimal(14, 5) — 기본 배송료
- tax_rate — int — NOT NULL
- tax_type — varchar(10) — NOT NULL — 세금 유형
- item_category — varchar(50) — 상품 유형
- created_at — datetime — NOT NULL — 생성날짜
- updated_at — datetime — NOT NULL — 수정 날짜
- deleted_at — datetime — 삭제시간
product
- product_no — bigint — 기본 키 — NOT NULL — 상품 no
- Key (seller_no) — bigint — 외래 키 → 판매자.seller_no — NOT NULL — FK
- 상품명 (product_name) — varchar(100) — NOT NULL
- category — int — NOT NULL — 상품 카테고리
- tax_type — char(4) — NOT NULL — 세금유형
- sell_price — decimal(14, 5) — NOT NULL — 판매가
- supply_price — decimal(14, 5) — NOT NULL — 공급가
- is_active — tinyint(1) — 상품 활성화 여부
- created_at — datetime — NOT NULL — 생성시간
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제시간
settlement_daily
- settlement_id — bigint — 기본 키 — NOT NULL — 일별 정산 ID
- seller_no — bigint — NOT NULL — 셀러 no
- order_no — bigint — NOT NULL — 주문 번호
- claim_receipt_no — bigint — NOT NULL — 클레임 접수 번호
- settlement_date — date — NOT NULL — 정산 날짜
- seller_name — varchar(255) — NOT NULL — 셀러 이름
- seller_business_number — varchar(255) — 셀러 사업자 번호
- tax_type — varchar(10) — NOT NULL — 세금 유형
- sell_type — varchar(10) — NOT NULL — 판매 유형
- pg_sales_amount — decimal(16, 5) — NOT NULL — 'PG 판매 금액'
- coupon_discount_amount — decimal(16, 5) — NOT NULL — 쿠폰 할인 금액
- mileage_used_amount — decimal(16, 5) — NOT NULL — 마일리시 사용 금액
- shipping_fee — decimal(16, 5) — NOT NULL — 배송비
- claim_shipping_fee — decimal(16, 5) — NOT NULL — 클레임 발생 배송료
- commission_amount — decimal(16, 5) — NOT NULL — 수수료
- created_at — datetime — NOT NULL — 주문 생성일
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제 시간
- Field (tax_amount) — decimal(16,5) — NOT NULL — 세금
settlement_total
- settlement_total_id — bigint — 기본 키 — NOT NULL — 월별 총 정산 id
- seller_no — bigint — NOT NULL — 셀러 no
- settlement_date — date — NOT NULL — 정산 날짜
- seller_name — varchar(255) — NOT NULL — 셀러 이름
- seller_business_number — varchar(255) — 셀러 사업자 번호
- tax_type — varchar(10) — NOT NULL — 세금 유형
- sell_type — varchar(10) — NOT NULL — 판매 유형
- pg_sales_amount — decimal(16, 5) — NOT NULL — PG 판매 금액
- coupon_discount_amount — decimal(16, 5) — NOT NULL — 쿠폰 할인 금액
- mileage_used_amount — decimal(16, 5) — NOT NULL — 마일리시 사용 금액
- shipping_fee — decimal(16, 5) — NOT NULL — 배송비
- claim_shipping_fee — decimal(16, 5) — NOT NULL — 클레임 발생 배송료
- commission_amount — decimal(16, 5) — NOT NULL — 수수료
- created_at — datetime — NOT NULL — 주문 생성일
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제 시간
판매자 (seller)
- seller_no — bigint — 기본 키 — NOT NULL — 셀러 no
- 판매자명 (seller_name) — varchar(50) — NOT NULL — 셀러명
- 사업자 번호 (business_no) — int — NOT NULL — 셀러의 사업자 번호
- sell_type — char(1) — NOT NULL — 판매유형(P: 매입, C: 위탁)
- bank_type — varchar(10) — 은행타입
- account_no — int — 계좌번호
- account_owner_name — varchar(50) — 계좌주
- is_active — tinyint(1) — NOT NULL — 셀러 활성화 여부
- default_delivery_amount — int — NOT NULL — 기본 배송 금액
- commission — int — NOT NULL — 수수료율
- created_at — datetime — NOT NULL — 생성시간
- updated_at — datetime — NOT NULL — 수정시간
- deleted_at — datetime — 삭제시간