package com.yiqi.order.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yiqi.common.annotation.Excel;
import com.yiqi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 商品订单对象 order_goods
 *
 * @author ruoyi
 * @date 2023-12-06
 */
@ApiModel("零售商品订单")
@Data
public class OrderGoodsDTO extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(type = IdType.AUTO)

    private Long id;

    @ApiModelProperty("客户ID")

    private Long appUserId;

    @ApiModelProperty("客户地址id")

    private Long appUserAddressId;

    @ApiModelProperty("是否抵扣")
    private Boolean isDeduct;

    @ApiModelProperty("支付方式（0=微信，1=支付宝，2=现金,3=余额）")
    private String payType;

    @ApiModelProperty("零售商品明细")
    private List<OrderRetailGoodsSkusDTO> retailGoodsVOList;

    @ApiModelProperty("下单渠道（APP=APP，WXAPP=小程序）")
    private String orderSource;

    @ApiModelProperty("订单总价")
    private BigDecimal totalPrice;

    @ApiModelProperty("抵扣金额")
    private BigDecimal deductAmount;

    @ApiModelProperty("来源类型")
    private String sourceType;

    @ApiModelProperty("组织ID")

    private Long orgId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("发货时间")
    private Date sendTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("确认收货时间")
    private Date finishTime;

    @ApiModelProperty("商品类别")
    private String goodsType;

    @ApiModelProperty("预约时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date appointmentTime;

    @ApiModelProperty("用户付款码")
    private String authCode;

    @ApiModelProperty("付款平台(APP=APP、WEAPP=小程序)")
    private String platform;

    @ApiModelProperty("优惠券抵扣金额")
    private BigDecimal couponDeductAmount;

    @ApiModelProperty("现金抵扣金额")
    private BigDecimal cashDeductAmount;

    @ApiModelProperty("APP用户扣款前余额")
    private BigDecimal appUserBalanceAmount;

    /**
     * 组合支付必传
     */
    @ApiModelProperty("会员支付订单金额")
    private BigDecimal memberPayAmount;

    /**
     * 组合支付其他付款方式
     */
    @ApiModelProperty("组合支付其他付款方式 0=微信，1=支付宝")
    private String otherPayType;
}
