package cn.iocoder.foodnexus.module.order.controller.app.customerOrder.vo;

import cn.idev.excel.annotation.ExcelProperty;
import cn.iocoder.foodnexus.module.product.api.dto.ProductInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

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

/**
 * @author : yanghao
 * create at:  2025/10/14  10:16
 * @description: 退货说明
 */
@Data
public class AppCustomerOrderReturnRespVO {

    @Schema(description = "退货单id")
    private Long saleReturnId;
    
    @Schema(description = "退货单编号")
    private String saleReturnNo;

    @Schema(description = "说明")
    private String remark;

    @Schema(description = "相关文件")
    private List<String> remarkFiles;

    @Schema(description = "最终合计价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "24906")
    private Integer totalReturnPrice;

    @Schema(description = "退货子项")
    private List<ReturnItems> returnItems;

    @Schema(description = "当前状态")
    private String returnsStatus;

    @Schema(description = "退货单审核情况")
    private Integer auditStatus;

    @Schema(description = "退货单审核备注")
    private String auditReason;

    @Schema(description = "当前退货进度")
    private ReturnsRecords currentReturnsRecords;

    @Schema(description = "全部退货进度")
    private List<ReturnsRecords> returnsRecords;

    @Data
    public static class ReturnsRecords {

        @Schema(description = "退货状态")
        private String returnsStatus;

        @Schema(description = "处理时间")
        private LocalDateTime recordTime;

    }

    @Data
    public static class ReturnItems {

        @Schema(description = "客户子订单id")
        private Long customerOrderItemId;

        @Schema(description = "商品id")
        private Long productId;

        @Schema(description = "商品基本信息")
        private ProductInfo productInfo;

        @Schema(description = "订单商品单价，单位：分")
        private Integer orderItemPrice;

        @Schema(description = "退货数量")
        private BigDecimal returnCount;

        @Schema(description = "退货金额,单位：分")
        private Integer returnPrice;

        @Schema(description = "退货总金额,单位：分")
        private Integer totalReturnPrice;

        @Schema(description = "备注")
        private String remark;

    }

}
