package com.gxwebsoft.shop.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

/**
 * 订单记录表查询参数
 *
 * @author WebSoft
 * @since 2022-11-16 11:25:58
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "OrderParam对象", description = "订单记录表查询参数")
public class OrderParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单ID")
    @QueryField(type = QueryType.EQ)
    private Integer orderId;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "商品总金额(不含优惠折扣)")
    @QueryField(type = QueryType.EQ)
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "订单金额(含优惠折扣)")
    @QueryField(type = QueryType.EQ)
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "优惠券ID")
    @QueryField(type = QueryType.EQ)
    private Integer couponId;

    @ApiModelProperty(value = "优惠券抵扣金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal couponMoney;

    @ApiModelProperty(value = "积分抵扣金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal pointsMoney;

    @ApiModelProperty(value = "积分抵扣数量")
    @QueryField(type = QueryType.EQ)
    private Integer pointsNum;

    @ApiModelProperty(value = "实际付款金额(包含运费)")
    @QueryField(type = QueryType.EQ)
    private BigDecimal payPrice;

    @ApiModelProperty(value = "后台修改的订单金额(差价)")
    @QueryField(type = QueryType.EQ)
    private BigDecimal updatePrice;

    @ApiModelProperty(value = "买家留言")
    private String buyerRemark;

    @ApiModelProperty(value = "支付方式(废弃)")
    @QueryField(type = QueryType.EQ)
    private Integer payType;

    @ApiModelProperty(value = "支付方式（余额/微信/支付宝）")
    private String payMethod;

    @ApiModelProperty(value = "付款状态(10未付款 20已付款)")
    @QueryField(type = QueryType.EQ)
    private Integer payStatus;

    @ApiModelProperty(value = "付款时间")
    @QueryField(type = QueryType.EQ)
    private Date payTime;

    @ApiModelProperty("购买月份数量")
    @QueryField(type = QueryType.EQ)
    private Integer month;

    @ApiModelProperty(value = "星期几")
    @QueryField(type = QueryType.EQ)
    private Integer week;

    @ApiModelProperty(value = "第三方交易记录ID")
    @QueryField(type = QueryType.EQ)
    private Integer tradeId;

    @ApiModelProperty(value = "配送方式(10快递配送 20门店自提)")
    @QueryField(type = QueryType.EQ)
    private Integer deliveryType;

    @ApiModelProperty(value = "自提门店ID")
    @QueryField(type = QueryType.EQ)
    private Integer extractShopId;

    @ApiModelProperty(value = "核销店员ID")
    @QueryField(type = QueryType.EQ)
    private Integer extractClerkId;

    @ApiModelProperty(value = "运费金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal expressPrice;

    @ApiModelProperty(value = "物流公司ID (废弃)")
    @QueryField(type = QueryType.EQ)
    private Integer expressId;

    @ApiModelProperty(value = "物流单号 (废弃)")
    private String expressNo;

    @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)")
    @QueryField(type = QueryType.EQ)
    private Integer deliveryStatus;

    @ApiModelProperty(value = "发货时间")
    @QueryField(type = QueryType.EQ)
    private String deliveryTime;

    @ApiModelProperty(value = "收货状态(10未收货 20已收货)")
    @QueryField(type = QueryType.EQ)
    private Integer receiptStatus;

    @ApiModelProperty(value = "收货时间")
    @QueryField(type = QueryType.EQ)
    private Date receiptTime;

    @ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)")
    @QueryField(type = QueryType.EQ)
    private Integer orderStatus;

    @ApiModelProperty(value = "赠送的积分数量")
    @QueryField(type = QueryType.EQ)
    private Integer pointsBonus;

    @ApiModelProperty(value = "商家备注")
    private String merchantRemark;

    @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)")
    @QueryField(type = QueryType.EQ)
    private Integer isSettled;

    @ApiModelProperty(value = "续租订单原单号")
    private Integer rentOrderId;

    @ApiModelProperty(value = "微信支付交易号(废弃)")
    private String transactionId;

    @ApiModelProperty(value = "是否已评价(0否 1是)")
    @QueryField(type = QueryType.EQ)
    private Integer isComment;

    @ApiModelProperty(value = "订单来源(10普通订单 20砍价订单 30秒杀订单)")
    @QueryField(type = QueryType.EQ)
    private Integer orderSource;

    @ApiModelProperty(value = "来源记录ID")
    @QueryField(type = QueryType.EQ)
    private Integer orderSourceId;

    @ApiModelProperty(value = "来源记录的参数 (json格式)")
    private String orderSourceData;

    @ApiModelProperty(value = "来源客户端 (APP、H5、小程序等)")
    private String platform;

    @ApiModelProperty(value = "是否续费订单")
    private Integer isRenew;

    @ApiModelProperty(value = "是否临时报餐")
    private Integer isTemporary;

    @ApiModelProperty(value = "用户ID")
    @QueryField(type = QueryType.EQ)
    private Integer userId;

    @ApiModelProperty(value = "所属门店ID")
    @QueryField(type = QueryType.EQ)
    private Integer shopId;

    @ApiModelProperty(value = "商品ID")
    private Integer goodsId;

    @ApiModelProperty(value = "设备ID")
    private Integer equipmentId;

    @ApiModelProperty(value = "商户编号")
    @QueryField(type = QueryType.EQ)
    private String merchantCode;

    @ApiModelProperty(value = "商户名称")
    @QueryField(type = QueryType.LIKE)
    private String merchantName;

    @ApiModelProperty(value = "排序(数字越小越靠前)")
    @QueryField(type = QueryType.EQ)
    private Integer sortNumber;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "状态, 0正常, 1冻结")
    @QueryField(type = QueryType.EQ)
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @QueryField(type = QueryType.EQ)
    private Integer deleted;

    @ApiModelProperty(value = "租户ID")
    @QueryField(type = QueryType.EQ)
    private Integer tenantId;

    @ApiModelProperty("搜索关键字")
    @TableField(exist = false)
    private String keywords;

    @ApiModelProperty(value = "签名")
    @TableField(exist = false)
    private String sign;

    @ApiModelProperty(value = "是否查询订单商品")
    @TableField(exist = false)
    private Boolean showGoodsList;

    @ApiModelProperty(value = "用户id集合")
    @TableField(exist = false)
    private Set<Integer> userIds;

}
