package com.softwarebr.nunu.json.admin.oper;

import com.alibaba.fastjson.annotation.JSONField;
import com.brframework.commoncms.annatotion.column.DateTimeColumn;
import com.brframework.commoncms.annatotion.column.ImageColumn;
import com.brframework.commoncms.annatotion.column.SelectColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @date 2020-02-18 10:58:32
 * @author lilin
 */

@Data
@ApiModel
public class AdvertisementParam {


	@ApiModelProperty(value = "广告位置", required = true, example = "")
	@SelectColumn(options = {"1,首页","2,创新项目路演厅"})
	@NotNull(message = "请选择广告位置")
	private Integer position;

	@ApiModelProperty(value = "广告名称", required = true, example = "")
	@NotEmpty(message = "广告名称不能为空")
	private String name;

	@ApiModelProperty(value = "广告图片", required = true, example = "")
	@ImageColumn(number = 1)
	@NotEmpty(message = "请上传广告图片")
	private String advertUri;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "开始时间", required = true, example = "")
	@DateTimeColumn
	@NotNull(message = "请选择开始时间")
	private LocalDateTime startDate;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "结束时间", required = true, example = "")
	@DateTimeColumn
	@NotNull(message = "请选择结束时间")
	private LocalDateTime endDate;

	@ApiModelProperty(value = "排序值", required = true, example = "")
	@NotNull(message = "排序值不能为空")
	private Integer sortValue;

	@ApiModelProperty(value = "链接类型", required = true, example = "")
	@SelectColumn(options = {"1,内链","2,外链"})
	@NotNull
	private Integer linkType;

	@ApiModelProperty(value = "跳转类型", required = true, example = "")
	@SelectColumn(options = {"1,政策","2,创新资源交易区","3,服务平台","4,创新项目路演厅","5,培训学院"})
	@NotNull
	private Integer type;

	@ApiModelProperty(value = "跳转地址", required = true, example = "")
	@Column(length = Integer.MAX_VALUE)
	@NotEmpty
	private String linkUri;

}