package com.yuchen.saas.parking.api.dto.coupon;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nest.springwrap.core.mp.support.Query;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author 蔡文强
 * @Date 2023/5/25 15:56
 * @Description 查询优惠卡列表传参
 */
@Data
public class PmgBatCouponCardQueryDTO extends Query {

    @ApiModelProperty(name = "couponCardName", value = "优惠卡名称")
    private String couponCardName;

    @ApiModelProperty(name = "projectId", value = "项目ID")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @ApiModelProperty(name = "projectName", value = "项目名称")
    @NotBlank(message = "项目名称不能为空")
    private String projectName;

    @ApiModelProperty(name = "belongType", value = "归属对象类型(1:个人 2:企业)")
    @NotNull(message = "归属对象类型不能为空")
    @Min(value = 1, message = "belongType值要大于等于1")
    @Max(value = 2, message = "belongType值要小于等于2")
    private Integer belongType;


    @ApiModelProperty(name = "cardValidityType", value = "卡有效期类型(1:指定时间 2:无时间限制)")
    @NotNull(message = "卡有效期类型不能为空")
    @Min(value = 1, message = "cardValidityType值要大于等于1")
    @Max(value = 2, message = "cardValidityType值要小于等于3")
    private Integer cardValidityType;


    @ApiModelProperty(name = "couponValidityType", value = "券有效期类型(1:领取后,第xx天内有效->提示:领取后,若优惠卡失效,优惠券未使用的话也同步失效 2:无时间限制)")
    @NotNull(message = "券有效期类型不能为空")
    @Min(value = 1, message = "couponValidityType值要大于等于1")
    @Max(value = 2, message = "couponValidityType值要小于等于2")
    private Integer couponValidityType;

    @ApiModelProperty(name = "discountItems", value = "优惠适用费项(1:临停费用 2:月卡充值 3:错时充值 4:管理费),多选,逗号隔开")
    @NotBlank(message = "优惠适用费项不能为空")
    private String discountItems;

    @ApiModelProperty(name = "startTime", value = "开始时间")
    private String startTime;

    @ApiModelProperty(name = "endTime", value = "结束时间")
    private String endTime;
    @ApiModelProperty(name = "cardType", value = "优惠卡类型(1:停车优惠)")
    private Integer cardType;

    @ApiModelProperty(name = "fundType", value = "优惠资金类型(1:虚拟额度 2:充值资金)")
    private Integer fundType;

    @ApiModelProperty(name = "grantId", value = "发放对象ID")
    private Long grantId;

    @ApiModelProperty(name = "grantName", value = "发放对象名称")
    private String grantName;

    @ApiModelProperty(name = "belongId", value = "归属对象ID")
    private Long belongId;

    @ApiModelProperty(name = "belongName", value = "归属对象名称")
    private String belongName;

    @ApiModelProperty(name = "contactPhone", value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(name = "discountMode", value = "优惠方式(1:限免优惠 2:全免优惠)")
    private Integer discountMode;

    @ApiModelProperty(name = "cardStatus", value = "卡状态(1:未生效 2:已生效)")
    private Integer cardStatus;

    @ApiModelProperty(name = "cardStatusStr", value = "卡状态逗号隔开")
    private String cardStatusStr;

    @ApiModelProperty(name = "visitorBindStatus", value = "优惠卡是否绑定访客状态(0:未绑定 1:绑定)")
    private Integer visitorBindStatus;

    @ApiModelProperty(name = "parkingId", value = "车场id")
    private Long parkingId;

    @ApiModelProperty(name = "parkingIds", value = "车场id集合")
    private List<Long> parkingIds;
    @ApiModelProperty(name = "parkingIdsStr", value = "车场id集合字符串")
    @JsonIgnore
    private String parkingIdsStr;
}
