package com.gxwebsoft.cms.param;

import java.math.BigDecimal;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 网站订单查询参数
 *
 * @author 科技小王子
 * @since 2026-01-27 13:03:24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "CmsOrderParam对象", description = "网站订单查询参数")
public class CmsOrderParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @QueryField(type = QueryType.EQ)
    private Integer id;

    @Schema(description = "订单类型，0售前咨询 1售后服务 2意见反馈")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @Schema(description = "订单标题")
    private String title;

    @Schema(description = "公司/团队名称")
    private String company;

    @Schema(description = "订单内容")
    private String content;

    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "快递/自提")
    @QueryField(type = QueryType.EQ)
    private Integer deliveryType;

    @Schema(description = "下单渠道，0网站 1微信小程序 2其他")
    @QueryField(type = QueryType.EQ)
    private Integer channel;

    @Schema(description = "微信支付交易号号")
    private String transactionId;

    @Schema(description = "微信退款订单号")
    private String refundOrder;

    @Schema(description = "商户ID")
    @QueryField(type = QueryType.EQ)
    private Long merchantId;

    @Schema(description = "商户名称")
    private String merchantName;

    @Schema(description = "商户编号")
    private String merchantCode;

    @Schema(description = "使用的优惠券id")
    @QueryField(type = QueryType.EQ)
    private Integer couponId;

    @Schema(description = "使用的会员卡id")
    private String cardId;

    @Schema(description = "关联管理员id")
    @QueryField(type = QueryType.EQ)
    private Integer adminId;

    @Schema(description = "核销管理员id")
    @QueryField(type = QueryType.EQ)
    private Integer confirmId;

    @Schema(description = "IC卡号")
    private String icCard;

    @Schema(description = "真实姓名")
    private String realName;

    @Schema(description = "关联收货地址")
    @QueryField(type = QueryType.EQ)
    private Integer addressId;

    @Schema(description = "收货地址")
    private String address;

    private String addressLat;

    private String addressLng;

    @Schema(description = "自提店铺id")
    @QueryField(type = QueryType.EQ)
    private Integer selfTakeMerchantId;

    @Schema(description = "自提店铺")
    private String selfTakeMerchantName;

    @Schema(description = "配送开始时间")
    private String sendStartTime;

    @Schema(description = "配送结束时间")
    private String sendEndTime;

    @Schema(description = "发货店铺id")
    @QueryField(type = QueryType.EQ)
    private Integer expressMerchantId;

    @Schema(description = "发货店铺")
    private String expressMerchantName;

    @Schema(description = "订单总额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal totalPrice;

    @Schema(description = "减少的金额，使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal reducePrice;

    @Schema(description = "实际付款")
    @QueryField(type = QueryType.EQ)
    private BigDecimal payPrice;

    @Schema(description = "用于统计")
    @QueryField(type = QueryType.EQ)
    private BigDecimal price;

    @Schema(description = "价钱，用于积分赠送")
    @QueryField(type = QueryType.EQ)
    private BigDecimal money;

    @Schema(description = "取消时间")
    private String cancelTime;

    @Schema(description = "取消原因")
    private String cancelReason;

    @Schema(description = "退款金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal refundMoney;

    @Schema(description = "教练价格")
    @QueryField(type = QueryType.EQ)
    private BigDecimal coachPrice;

    @Schema(description = "购买数量")
    @QueryField(type = QueryType.EQ)
    private Integer totalNum;

    @Schema(description = "教练id")
    @QueryField(type = QueryType.EQ)
    private Integer coachId;

    @Schema(description = "商品ID")
    @QueryField(type = QueryType.EQ)
    private Integer formId;

    @Schema(description = "支付的用户id")
    @QueryField(type = QueryType.EQ)
    private Integer payUserId;

    @Schema(description = "0余额支付，1微信支付，2支付宝支付，3银联支付，4现金支付，5POS机支付，6免费，7积分支付")
    @QueryField(type = QueryType.EQ)
    private Integer payType;

    @Schema(description = "微信支付子类型：JSAPI小程序支付，NATIVE扫码支付")
    private String wechatPayType;

    @Schema(description = "0余额支付，1微信支付，2支付宝支付，3银联支付，4现金支付，5POS机支付，6免费，7积分支付")
    @QueryField(type = QueryType.EQ)
    private Integer friendPayType;

    @Schema(description = "0未付款，1已付款")
    @QueryField(type = QueryType.EQ)
    private Integer payStatus;

    @Schema(description = "0未使用，1已完成，2已取消，3取消中，4退款申请中，5退款被拒绝，6退款成功，7客户端申请退款")
    @QueryField(type = QueryType.EQ)
    private Integer orderStatus;

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

    @Schema(description = "无需发货备注")
    private String deliveryNote;

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

    @Schema(description = "评价状态(0未评价 1已评价)")
    @QueryField(type = QueryType.EQ)
    private Integer evaluateStatus;

    @Schema(description = "评价时间")
    private String evaluateTime;

    @Schema(description = "优惠类型：0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡，5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡")
    @QueryField(type = QueryType.EQ)
    private Integer couponType;

    @Schema(description = "优惠说明")
    private String couponDesc;

    @Schema(description = "二维码地址，保存订单号，支付成功后才生成")
    private String qrcode;

    @Schema(description = "vip月卡年卡、ic月卡年卡回退次数")
    @QueryField(type = QueryType.EQ)
    private Integer returnNum;

    @Schema(description = "vip充值回退金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal returnMoney;

    @Schema(description = "预约详情开始时间数组")
    private String startTime;

    @Schema(description = "是否已开具发票：0未开发票，1已开发票，2不能开具发票")
    @QueryField(type = QueryType.EQ)
    private Integer isInvoice;

    @Schema(description = "发票流水号")
    private String invoiceNo;

    @Schema(description = "商家留言")
    private String merchantRemarks;

    @Schema(description = "支付时间")
    private String payTime;

    @Schema(description = "退款时间")
    private String refundTime;

    @Schema(description = "申请退款时间")
    private String refundApplyTime;

    @Schema(description = "过期时间")
    private String expirationTime;

    @Schema(description = "自提码")
    private String selfTakeCode;

    @Schema(description = "是否已收到赠品")
    @QueryField(type = QueryType.EQ)
    private Boolean hasTakeGift;

    @Schema(description = "对账情况：0=未对账；1=已对账；3=已对账，金额对不上；4=未查询到该订单")
    @QueryField(type = QueryType.EQ)
    private Integer checkBill;

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

    @Schema(description = "系统版本号 0当前版本 value=其他版本")
    @QueryField(type = QueryType.EQ)
    private Integer version;

    @Schema(description = "用户id")
    @QueryField(type = QueryType.EQ)
    private Integer userId;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "排序号")
    @QueryField(type = QueryType.EQ)
    private Integer sortNumber;

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

}
