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

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.util.Date;

/**
 * @Author 蔡文强
 * @Date 2023/5/25 15:56
 * @Description 创建优惠卡传参
 */
@Data
public class PmgBatCouponCardDTO {

    @ApiModelProperty(name = "id", value = "优惠卡ID")
    private Long id;

    @ApiModelProperty(name = "grantId", value = "发放对象ID")
    @NotNull(message = "发放对象不能为空")
    private Long grantId;

    @ApiModelProperty(name = "grantName", value = "发放对象名称")
    @NotBlank(message = "发放对象不能为空")
    private String grantName;


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

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


    @ApiModelProperty(name = "couponCardName", value = "优惠卡名称")
    @NotBlank(message = "优惠卡名称不能为空")
    private String couponCardName;

    @ApiModelProperty(name = "couponCardNo", value = "优惠卡编号")
    private String couponCardNo;

    @ApiModelProperty(name = "cardType", value = "优惠卡类型(1:停车优惠)")
    @NotNull(message = "优惠卡类型不能为空")
    @Min(value = 1, message = "cardType值要大于等于1")
    @Max(value = 1, message = "cardType值要小于等于1")
    private Integer cardType;

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

    @ApiModelProperty(name = "parkingIds", value = "适用范围(停车场ID,多个逗号隔开)")
    @NotBlank(message = "适用范围不能为空")
    private String parkingIds;

    @ApiModelProperty(name = "parkingNames", value = "适用范围(停车场名称,多个逗号隔开)")
    @NotBlank(message = "适用范围不能为空")
    private String parkingNames;


    @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 = "belongId", value = "归属对象ID")
    private Long belongId;

    @ApiModelProperty(name = "belongName", value = "归属对象名称（组织名称或者归属对象手机号）")
    @NotBlank(message = "归属对象名称不能为空")
    private String belongName;

    @ApiModelProperty(name = "contactName", value = "联系人")
    private String contactName;

    @ApiModelProperty(name = "contactPhone", value = "联系电话")
    @Pattern(regexp = "^1[3,4,5,6,7,8,9][0-9]{9}$", message = "联系电话格式错误")
    private String contactPhone;

    @ApiModelProperty(name = "fundType", value = "优惠资金类型(1:虚拟额度 2:充值资金)")
    @NotNull(message = "优惠资金类型不能为空")
    @Min(value = 1, message = "fundType值要大于等于1")
    @Max(value = 2, message = "fundType值要小于等于2")
    private Integer fundType;

    @ApiModelProperty(name = "cardAmount", value = "卡总额度(单位分)")
    @NotNull(message = "卡总额度不能为空")
    @Min(value = 1, message = "卡总额度要大于0")
    private Integer cardAmount;

    @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 = "startDate", value = "开始日期")
    private Date startDate;

    @ApiModelProperty(name = "endDate", value = "结束日期")
    private Date endDate;

    @ApiModelProperty(name = "remark", value = "备注信息")
    private String remark;

    @ApiModelProperty(name = "discountMode", value = "优惠方式(1:限免优惠 2:全免优惠)")
    @NotNull(message = "优惠方式不能为空")
    @Min(value = 1, message = "discountMode值要大于等于1")
    @Max(value = 2, message = "discountMode值要小于等于2")
    private Integer discountMode;

    @ApiModelProperty(name = "couponAmount", value = "优惠券金额(单位分)")
    private Integer couponAmount;

    @ApiModelProperty(name = "suitCondition", value = "适用条件(1:满xx元可使用 2:无门槛使用(若优惠金额大于产品金额，则该产品价格为免费))")
    @NotNull(message = "适用条件不能为空")
    @Min(value = 1, message = "suitCondition值要大于等于1")
    @Max(value = 2, message = "suitCondition值要小于等于2")
    private Integer suitCondition;

    @ApiModelProperty(name = "conditionAmount", value = "满xx元可使用(单位分)")
    private Integer conditionAmount;


    @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 = "days", value = "领取后，第xx天内有效")
    private Integer days;

    @ApiModelProperty(name = "instruction", value = "券适用说明")
    @NotBlank(message = "券适用说明不能为空")
    private String instruction;

    @ApiModelProperty(name = "codeType", value = "优惠卡二维码类型(1:动态二维码 2:静态二维码)")
    private Integer codeType;
}
