package com.zbkj.common.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ActivityRequest对象", description="文章管理表")
public class ActivityRequest implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "分类id", required = true)
    @NotBlank(message = "请选择分类")
    private String cid;

    @ApiModelProperty(value = "活动标题", required = true)
    @NotBlank(message = "请填写活动标题")
    @Length(max = 200, message = "活动标题最多200个字符")
    private String title;

    @ApiModelProperty(value = "活动图片", required = true)
    @NotBlank(message = "请上传活动图片")
    @Length(max = 255, message = "活动图片名称最多255个字符")
    private String imageInput;

    @ApiModelProperty(value = "活动分享标题")
    @Length(max = 200, message = "活动分享标题最多200个字符")
    private String shareTitle;

    @ApiModelProperty(value = "活动分享简介")
    @Length(max = 200, message = "活动分享简介最多200个字符")
    private String shareSynopsis;

    @ApiModelProperty(value = "活动地址", required = true)
    @NotBlank(message = "请填写活动地址")
    @Length(max = 200, message = "活动地址最多200个字符")
    private String activityAddr;

    @ApiModelProperty(value = "活动人数", required = true)
    @NotBlank(message = "请填写活动人数")
    private String activityNum;

    @ApiModelProperty(value = "活动费用")
    @NotBlank(message = "请填写活动费用")
    private String activityPrice;

    @ApiModelProperty(value = "标签")
    private String tags;

    @ApiModelProperty(value = "排序")
    private String sort;

    @ApiModelProperty(value = "是否隐藏 0不隐藏，1隐藏")
    private String hide;

    @ApiModelProperty(value = "活动时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activityTime;

    @ApiModelProperty(value = "是否热门(小程序)", example = "false")
    @NotNull(message = "是否热门(小程序)不能为空")
    private Boolean isHot;

    @ApiModelProperty(value = "是否轮播图(小程序)" , example = "true")
    @NotNull(message = "是否轮播(小程序)不能为空")
    private Boolean isBanner;

    @ApiModelProperty(value = "活动内容", required = true)
    @NotBlank(message = "请填写活动内容")
    private String content;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
