package com.hys.app.model.erp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hys.app.controller.erp.use.task.MerchantPayInfo;
import com.hys.app.model.erp.dos.OrderCustomerFee;
import com.hys.app.model.erp.dos.OrderDO;
import com.hys.app.model.erp.dto.OrderItemDTO;
import com.hys.app.model.erp.enums.OrderTypeEnum;
import com.hys.app.model.erp.enums.SaleOrderStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单详情
 *
 * @author 张崧
 * 2024-01-24 15:58:31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(value = "订单详情")
public class OrderVO extends OrderDO {


    @ApiModelProperty(hidden = true)
    private Long id;

    @ApiModelProperty(name = "type", value = "订单类型")
    private OrderTypeEnum type;


    @ApiModelProperty(name = "order_time", value = "下单时间")
    private Long orderTime;


    @ApiModelProperty(name = "pay_type", value = "支付方式")
    private String payType;

    @ApiModelProperty(name = "marketing_id", value = "销售人员")
    private Long marketingId;

    @ApiModelProperty(name = "member_id", value = "销售人员")
    private Long memberId;

    @ApiModelProperty(name = "payment_time", value = "支付时间")
    private Long paymentTime;

    @ApiModelProperty(name = "attachment", value = "附件")
    private String attachment;

    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;

    @ApiModelProperty(name = "item_list", value = "订单项列表")
    @Valid
    private List<OrderItemDTO> itemList;


    @ApiModelProperty(name = "pay_price", value = "应付金额")
    private Double payPrice;


    @ApiModelProperty(name = "real_price", value = "打折后的金额不能为空")
    private Double realPrice;

    @ApiModelProperty(name = "province_city_area_address", value = "支付方式")
    private String provinceCityAreaAddress;

    @ApiModelProperty(name = "address", value = "支付方式")
    private String address;

    @ApiModelProperty(name = "province_city_area", value = "支付方式")
    private String provinceCityArea;

    @ApiModelProperty(name = "status", value = "订单状态")
    private SaleOrderStatusEnum status;

    @ApiModelProperty(name = "end_time", value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(name = "start_time", value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(name = "kdn_order_code", value = "快递鸟单号")
    private String kdnOrderCode;

    @ApiModelProperty(name = "subtract_stock", value = "是否允许负库存")
    private Boolean subtractStock;

    @ApiModelProperty(name = "subtract_stock", value = "入库扫描订单的类型")
    private String  scanOrderType;
    @ApiModelProperty(name = "subtract_stock", value = "核销费用列表")
    List<OrderCustomerFee> orderCustomerFees;

    @ApiModelProperty(name = "subtract_stock", value = "商家对公打款信息")
    private  MerchantPayInfo merchantPayInfo;

   private BigDecimal totalAmount;
}

