package com.softwarebr.nunu.entity.oper;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 运营-广告
 * @date 2020-02-18 10:58:32
 * @author lilin
 */

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="oper_advertisement")
@Builder
public class Advertisement {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@ApiModelProperty(value = "id", required = true, example = "1")
	private Long id;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间", required = true, example = "2018-03-12 21:32:33")
	private LocalDateTime createDate;

	@ApiModelProperty(value = "广告名称", required = true, example = "")
	private String name;

	@ApiModelProperty(value = "广告图片", required = true, example = "")
	@Column(length = Integer.MAX_VALUE)
	private String advertUri;

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

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

	@ApiModelProperty(value = "排序值", required = true, example = "")
	private Integer sortValue;

	@ApiModelProperty(value = "链接类型1.内链 2.外链", required = true, example = "")
	private Integer linkType;

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

	@ApiModelProperty(value = "跳转地址", required = true, example = "")
	private String linkUri;

	@ApiModelProperty(value = "上下架状态 0.下架 1.上架", required = true, example = "")
	private Integer status;

	@ApiModelProperty(value = "广告位置1.首页 2.创新项目路演厅", required = true, example = "")
	private Integer position;
}