package com.zioinfo.mall.order;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 주문 (mall_order).
 *
 * <p>상태 전이: PENDING → PAID → PREPARING → SHIPPED → DELIVERED → CONFIRMED
 * (취소: CANCELLED, 환불: REFUNDED)
 */
@Data
public class MallOrder {
    private Long id;
    private String orderNo;
    private String owner;            // username (고객)
    private Long storeId;            // 처리 매장
    private String fulfillmentType;  // DELIVERY / PICKUP
    private String status;
    private BigDecimal totalAmount;
    private BigDecimal discountAmount;
    private BigDecimal taxAmount;
    private BigDecimal surgeAmount;
    private BigDecimal payAmount;
    private String receiverName;
    private String receiverPhone;
    private String address;
    private String deliveryZip;
    private java.time.LocalDate scheduledDate;
    private Long slotId;
    private String slotLabel;
    private String cardMessage;
    private String memo;
    private Long couponId;
    private String proofPhotoUrl;    // 제작완료 꽃사진(Proof of Quality)
    private String podPhotoUrl;      // 문앞사진(Proof of Delivery)
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    private List<MallOrderItem> items;
}
