package com.sckw.order.model.vo.res;

import com.sckw.transport.api.model.vo.LogisticsOrderVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author :chenXiaoFei
 * @version :1.0
 * @description : 贸易订单详情查询请求参数
 * @create :2025-11-07 16:49:00
 */
@Data
public class TradeOrderDetailResp implements Serializable {
    @Serial
    private static final long serialVersionUID = 6441044501410981032L;
    /**
     * 贸易订单id
     */
    @Schema(description = "贸易订单id")
    @NotBlank(message = "贸易订单id不能为空")
    private String tradeOrderId;
    /**
     * 合同信息列表
     */
    @Schema(description = "合同信息")
    private TradeOrderContractInfo tradeOrderContractInfo;
    /**
     * 单位信息列表
     */
    @Schema(description = "单位信息")
    private TradeOrderUnitInfo tradeOrderUnitInfo;
    /**
     * 商品信息
     */
    @Schema(description = "商品信息")
    private TradeOrderGoodsInfo tradeOrderGoodsInfo;
    /**
     * 卸货信息
     */
    @Schema(description = "卸货信息")
    private TradeOrderUnloadInfo tradeOrderUnloadInfo;
    /**
     * 履约信息
     */
    @Schema(description = "履约信息")
    private TradeOrderPerformanceInfo tradeOrderPerformanceInfo;
    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
    @Data
    public static class TradeOrderContractInfo implements Serializable{
        @Serial
        private static final long serialVersionUID = -2721141435748386755L;
        /**
         * 贸易合同名称
         */
        @Schema(description = "贸易合同名称")
        private String contractName;
        /**
         * 贸易合同编号
         */
        @Schema(description = "贸易合同编号")
        private String contractNo;

        private List<LogisticsContract> logisticsContracts;

    }
    @Data
    public static class TradeOrderUnitInfo implements Serializable{
        @Serial
        private static final long serialVersionUID = -9038880677807691151L;
        /**
         * 采购单位id
         */
        @Schema(description = "采购单位id")
        private String purchaseUnitId;
        /**
         * 采购单位名称
         */
        @Schema(description = "采购单位名称")
        private String purchaseUnitName;
        /**
         * 采购联系人
         */
        @Schema(description = "采购联系人")
        private String purchaseContacts;
        /**
         * 采购联系人手机号
         */
        @Schema(description = "采购联系人手机号")
        private String purchaseContactsPhone;
        /**
         * 供应单位id
         */
        @Schema(description = "供应单位id")
        private String supplyUnitId;
        /**
         * 供应单位名称
         */
        @Schema(description = "供应单位名称")
        private String supplyUnitName;
        /**
         * 供应联系人
         */
        @Schema(description = "供应联系人")
        private String supplyContacts;
        /**
         * 供应联系人手机号
         */
        @Schema(description = "供应联系人手机号")
        private String supplyContactsPhone;
        /**
         * 承运单位id
         */
        @Schema(description = "承运单位id")
        private String carriageUnitId;
        /**
         * 承运单位名称
         */
        @Schema(description = "承运单位名称")
        private String carriageUnitName;
        /**
         * 承运联系人
         */
        @Schema(description = "承运联系人")
        private String carriageContacts;
        /**
         * 承运联系人手机号
         */
        @Schema(description = "承运联系人手机号")
        private String carriageContactsPhone;
        /**
         * 运输单价
         */
        @Schema(description = "运输单价")
        private String carriagePrice;
        /**
         * 运输费用（下单量*运输单价）
         */
        @Schema(description = "运输费用")
        private String carriageCost;
    }
    @Data
    public static class TradeOrderGoodsInfo implements Serializable{
        @Serial
        private static final long serialVersionUID = -9038880677807691151L;
        /**
         * 商品id
         */
        @Schema(description = "商品id")
        private String goodsId;
        /**
         * 商品名称
         */
        @Schema(description = "商品名称")
        private String goodsName;
        /**
         * 商品单价
         */
        @Schema(description = "商品单价")
        private String unitPrice;
        /**
         * 订单总量
         */
        @Schema(description = "订单总量")
        private String orderTotal;
        /**
         * 订单金额（下单量*单价）
         */
        @Schema(description = "订单金额")
        private String orderAmount;
    }
    @Data
    public static class TradeOrderUnloadInfo implements Serializable{
        @Serial
        private static final long serialVersionUID = -9038880677807691151L;
        /**
         * 卸货地址
         */
        @Schema(description = "卸货地址")
        private String unloadAddress;
        /**
         * 卸货联系人
         */
        @Schema(description = "卸货联系人")
        private String unloadContacts;
        /**
         * 卸货联系人手机号
         */
        @Schema(description = "卸货联系人手机号")
        private String unloadContactsPhone;
    }
    @Data
    public static class TradeOrderPerformanceInfo implements Serializable{
        @Serial
        private static final long serialVersionUID = -9038880677807691151L;
        /**
         * 支付方式
         */
        @Schema(description = "支付方式")
        private String payType;
        /**
         * 支付方式描述
         */
        @Schema(description = "支付方式描述")
        private String payTypeDesc;
        /**
         * 托运方式
         */
        @Schema(description = "托运方式")
        private String transportType;
        /**
         *托运方式描述
         */
        @Schema(description = "托运方式描述")
        private String transportTypeDesc;
        /**
         * 计费方式
         */
        @Schema(description = "计费方式")
        private String priceType;
        /**
         * 计费方式描述
         */
        @Schema(description = "计费方式描述")
        private String priceTypeDesc;
        /**
         * 已履量
         */
        @Schema(description = "已履量")
        private String loadAmount;
        /**
         * 已履金额
         */
        @Schema(description = "已履金额")
        private String loadAmountPrice;
        /**
         * 累计装货量
         */
        @Schema(description = "累计装货量")
        private String loadTotal;
        /**
         * 累计卸货量
         */
        @Schema(description = "累计卸货量")
        private String unloadTotal;
    }
    @Data
    public static class LogisticsContract implements Serializable{
        @Serial
        private static final long serialVersionUID = 2797122008473312915L;
        /**
         * 物流合同名称
         */
        @Schema(description = "物流合同名称")
        private String logisticsContractName;
        /**
         * 物流合同编号
         */
        @Schema(description = "物流合同编号")
        private String logisticsContractNo;
    }
}
