package com.zbkj.common.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zbkj.common.constants.RegularConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ActivityAttendRequest对象", description="参加活动请求对象")
public class ActivityAttendRequest {

    @ApiModelProperty(value = "活动编号", required = true)
    @NotBlank(message = "活动编号不能为空")
    private String activityId;

    @ApiModelProperty(value = "联系人姓名", required = true)
    @NotBlank(message = "联系人姓名不能为空")
    private String userName;

    @ApiModelProperty(value = "联系人手机号", required = true)
    @Pattern(regexp = RegularConstants.PHONE_TWO, message = "手机号码格式错误")
    @NotBlank(message = "联系人手机号不能为空")
    private String cellPhone;

    @ApiModelProperty(value = "预约时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerDate;

    @ApiModelProperty(value = "人数", required = true)
    @NotBlank(message = "人数不能为空")
    private String attendNum;

    @ApiModelProperty(value = "备注")
    private String remark;

}
