package com.gxwebsoft.shop.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 2025-08-11 23:51:23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "ShopCouponParam对象", description = "优惠券查询参数")
public class ShopCouponParam extends BaseParam {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "优惠券名称")
    private String name;

    @Schema(description = "优惠券描述")
    private String description;

    @Schema(description = "优惠券类型(10满减券 20折扣券 30免费劵)")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @Schema(description = "满减券-减免金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal reducePrice;

    @Schema(description = "折扣券-折扣率(0-100)")
    @QueryField(type = QueryType.EQ)
    private Integer discount;

    @Schema(description = "最低消费金额")
    @QueryField(type = QueryType.EQ)
    private BigDecimal minPrice;

    @Schema(description = "到期类型(10领取后生效 20固定时间)")
    @QueryField(type = QueryType.EQ)
    private Integer expireType;

    @Schema(description = "领取后生效-有效天数")
    @QueryField(type = QueryType.EQ)
    private Integer expireDay;

    @Schema(description = "有效期开始时间")
    private String startTime;

    @Schema(description = "有效期结束时间")
    private String endTime;

    @Schema(description = "适用范围(10全部商品 20指定商品 30指定分类)")
    @QueryField(type = QueryType.EQ)
    private Integer applyRange;

    @Schema(description = "适用范围配置(json格式)")
    private String applyRangeConfig;

    @Schema(description = "是否过期(0未过期 1已过期)")
    @QueryField(type = QueryType.EQ)
    private Integer isExpire;

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

    @Schema(description = "状态, 0正常, 1禁用")
    @QueryField(type = QueryType.EQ)
    private Integer status;

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

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

    @Schema(description = "发放总数量(-1表示无限制)")
    @QueryField(type = QueryType.EQ)
    private Integer totalCount;

    @Schema(description = "已发放数量")
    @QueryField(type = QueryType.EQ)
    private Integer issuedCount;

    @Schema(description = "每人限领数量(-1表示无限制)")
    @QueryField(type = QueryType.EQ)
    private Integer limitPerUser;

    @Schema(description = "是否启用(0禁用 1启用)")
    @QueryField(type = QueryType.EQ)
    private Boolean enabled;

}
