| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package com.uas.kanban.model;
- import com.uas.kanban.annotation.FieldProperty;
- import com.uas.kanban.base.BaseEntity;
- import org.mongodb.morphia.annotations.Entity;
- import org.mongodb.morphia.annotations.Index;
- import org.mongodb.morphia.annotations.Indexes;
- /**
- * 中间表,用户面板(存储用户可查看的面板)
- *
- * @author sunyj
- * @since 2017/10/20 11:12
- */
- @Entity
- @Indexes(@Index(value = "userCode, panelCode", unique = true))
- public class UserPanel extends BaseEntity {
- private static final long serialVersionUID = 1L;
- /**
- * 用户 code {@link User}
- */
- @FieldProperty(nullable = false)
- private String userCode;
- /**
- * 面板 code {@link Panel}
- */
- @FieldProperty(nullable = false)
- private String panelCode;
- public UserPanel() {
- }
- public UserPanel(String userCode, String panelCode) {
- this.userCode = userCode;
- this.panelCode = panelCode;
- }
- public String getUserCode() {
- return userCode;
- }
- public void setUserCode(String userCode) {
- this.userCode = userCode;
- }
- public String getPanelCode() {
- return panelCode;
- }
- public void setPanelCode(String panelCode) {
- this.panelCode = panelCode;
- }
- @Override
- public String toString() {
- return "UserPanel{" +
- "userCode='" + userCode + '\'' +
- ", panelCode='" + panelCode + '\'' +
- "} " + super.toString();
- }
- }
|