package com.uas.kanban.model; import com.uas.kanban.annotation.CollectionProperty; import com.uas.kanban.annotation.FieldProperty; import com.uas.kanban.base.BaseEntity; import org.mongodb.morphia.annotations.*; /** * 看板 * * @author sunyj * @since 2017/10/18 15:35 */ @Entity @Indexes(@Index(fields = {@Field("name"), @Field("panelCode")}, options = @IndexOptions(unique = true))) @CollectionProperty(simpleName = "看板") public class Kanban extends BaseEntity { private static final long serialVersionUID = 1L; /** * 名称 */ @FieldProperty(nullable = false) private String name; /** * 标题 */ private String title; /** * 描述 */ private String description; /** * 内容 */ @FieldProperty(nullable = false) private String content; /** * 是否启用,默认不启用 */ @FieldProperty(nullable = false) private Boolean enabled = false; /** * 面板 code {@link Panel} */ @FieldProperty(nullable = false) private String panelCode; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public String getPanelCode() { return panelCode; } public void setPanelCode(String panelCode) { this.panelCode = panelCode; } @Override public String toString() { return "Kanban{" + "name='" + name + '\'' + ", title='" + title + '\'' + ", description='" + description + '\'' + ", content='" + content + '\'' + ", enabled=" + enabled + ", panelCode='" + panelCode + '\'' + "} " + super.toString(); } }