package com.seer.teach.mall.api.resp;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "订单DTO")
@Data
public class OrderDTO {

    @Schema(description = "订单ID")
    private Integer id;

    @Schema(description = "订单编号（唯一）")
    private String orderSn;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "订单状态（0-待付款，1-已付款，2-已发货，3-已完成，4-已取消,5-待评价）")
    private Integer orderStatus;

    @Schema(description = "物流状态（0-未发货，1-已发货，2-已签收）")
    private Integer shippingStatus;

    @Schema(description = "评价状态，1：已评价，0：为评价")
    private Integer commentStatus;

    @Schema(description = "订单总价")
    private BigDecimal orderPrice;

    @Schema(description = "商品总价")
    private BigDecimal goodsPrice;

    /**
     * 订单总学豆
     */
    @Schema(description = "订单总学豆")
    private BigDecimal orderTotalCoin;

    @Schema(description = "订单创建时间")
    private LocalDateTime addTime;

    @Schema(description = "物流单号")
    private String shippingNo;

    @Schema(description = "支付方式名称")
    private String payName;

    @Schema(description = "支付订单ID")
    private Integer payOrderId;

    @Schema(description = "售后状态")
    private Integer afterSaleStatus;

    @Schema(description = "收货人姓名")
    private String consignee;

    @Schema(description = "省份")
    @TableField("province")
    private String province;

    @Schema(description = "城市")
    @TableField("city")
    private String city;

    @Schema(description = "区/县")
    @TableField("district")
    private String district;

    @Schema(description = "详细地址")
    private String address;

    @Schema(description = "联系电话")
    private String mobile;

    @Schema(description = "订单备注")
    private String postscript;

    @Schema(description = "支付方式ID")
    private String payId;

    @Schema(description = "支付成功时间")
    private LocalDateTime payTime;

    @Schema(description = "发货时间")
    private LocalDateTime deliveryTime;

    @Schema(description = "用户确认收货时间")
    private LocalDateTime confirmTime;

    @Schema(description = "实际支付金额（已扣除优惠）")
    private BigDecimal actualPrice;

    @Schema(description = "物流公司编码")
    private String logisticsCode;

    @Schema(description = "重量，单位kg，范围0.01-30 默认0.02）")
    private String weight;

    @Schema(description = "子订单列表")
    private List<OrderChildDTO> orderChildren;
}