package com.ks.lucky.pojo.DO;
|
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotNull;
|
import java.io.Serializable;
|
import java.util.Date;
|
|
@Document(collection = "luckyActivityImage")
|
public class LuckyActivityImage implements Serializable {
|
public enum LuckyImageType {
|
banner("banner");
|
|
private LuckyImageType(String type) {
|
|
}
|
}
|
|
@Id
|
private String id;
|
|
@NotNull(message = "活动ID不能为空")
|
private Long activityId;
|
@NotEmpty(message = "链接不能为空")
|
private String url;
|
|
private Integer weight;
|
@NotNull(message = "图片类型不能为空")
|
private LuckyImageType type;
|
|
private Date createTime;
|
|
private Date updatetime;
|
|
public Long getActivityId() {
|
return activityId;
|
}
|
|
public void setActivityId(Long activityId) {
|
this.activityId = activityId;
|
}
|
|
public Integer getWeight() {
|
return weight;
|
}
|
|
public void setWeight(Integer weight) {
|
this.weight = weight;
|
}
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public String getUrl() {
|
return url;
|
}
|
|
public void setUrl(String url) {
|
this.url = url;
|
}
|
|
public LuckyImageType getType() {
|
return type;
|
}
|
|
public void setType(LuckyImageType type) {
|
this.type = type;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public Date getUpdatetime() {
|
return updatetime;
|
}
|
|
public void setUpdatetime(Date updatetime) {
|
this.updatetime = updatetime;
|
}
|
}
|