package com.yiqi.app.domain.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import javax.validation.constraints.*;

@Data
@ApiModel("手动发券")
public class AppCouponItemSendDTO {
    @ApiModelProperty("组织ID")
    @NotNull(message = "组织ID不能为空")
    private Long orgId;

    @ApiModelProperty("来源类型")
    @NotEmpty(message = "来源类型不能为空")
    private String sourceType;

    @ApiModelProperty("优惠券类型")
    @NotNull(message = "优惠券类型不能为空")
    private Long couponTypeId;

    @ApiModelProperty("活动id")
    private Long activityId;

    @ApiModelProperty("客户手机号")
    @NotEmpty(message = "客户手机号不能为空")
    @Pattern(regexp = "^1(3|4|5|7|8|9)\\d{9}$",message = "手机号格式不正确")
    private String appUserPhoneNumber;

    @Min(value = 0)
    @Max(value = 100)
    @ApiModelProperty("发放数量")
    @NotNull(message = "发放数量不能为空")
    private Integer sendNum;
}
