|
@@ -2,12 +2,15 @@ package cn.com.qmth.examcloud.service.core.entity;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
+import javax.persistence.Column;
|
|
|
import javax.persistence.Entity;
|
|
|
import javax.persistence.GeneratedValue;
|
|
|
import javax.persistence.Id;
|
|
|
import javax.persistence.Table;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.common.support.tree.TreeNode;
|
|
|
+
|
|
|
/**
|
|
|
* 机构功能
|
|
|
*
|
|
@@ -16,13 +19,14 @@ import javax.validation.constraints.NotNull;
|
|
|
*/
|
|
|
@Entity
|
|
|
@Table(name = "ecs_core_function")
|
|
|
-public class OrgFunction implements Serializable {
|
|
|
+public class OrgFunction implements Serializable, TreeNode {
|
|
|
|
|
|
private static final long serialVersionUID = -3894524658332441373L;
|
|
|
|
|
|
@Id
|
|
|
@GeneratedValue
|
|
|
- private Long id;
|
|
|
+ @Column(name = "id")
|
|
|
+ private Long funcId;
|
|
|
|
|
|
/**
|
|
|
* 功能编码
|
|
@@ -34,7 +38,8 @@ public class OrgFunction implements Serializable {
|
|
|
* 父功能id
|
|
|
*/
|
|
|
@NotNull
|
|
|
- private Long parentId;
|
|
|
+ @Column(name = "parent_id")
|
|
|
+ private Long parentFuncId;
|
|
|
|
|
|
/**
|
|
|
* 功能名称
|
|
@@ -54,12 +59,12 @@ public class OrgFunction implements Serializable {
|
|
|
@NotNull
|
|
|
private int weigth;
|
|
|
|
|
|
- public Long getId() {
|
|
|
- return id;
|
|
|
+ public Long getFuncId() {
|
|
|
+ return funcId;
|
|
|
}
|
|
|
|
|
|
- public void setId(Long id) {
|
|
|
- this.id = id;
|
|
|
+ public void setFuncId(Long funcId) {
|
|
|
+ this.funcId = funcId;
|
|
|
}
|
|
|
|
|
|
public String getFuncCode() {
|
|
@@ -70,12 +75,12 @@ public class OrgFunction implements Serializable {
|
|
|
this.funcCode = funcCode;
|
|
|
}
|
|
|
|
|
|
- public Long getParentId() {
|
|
|
- return parentId;
|
|
|
+ public Long getParentFuncId() {
|
|
|
+ return parentFuncId;
|
|
|
}
|
|
|
|
|
|
- public void setParentId(Long parentId) {
|
|
|
- this.parentId = parentId;
|
|
|
+ public void setParentFuncId(Long parentFuncId) {
|
|
|
+ this.parentFuncId = parentFuncId;
|
|
|
}
|
|
|
|
|
|
public String getFuncName() {
|
|
@@ -102,4 +107,34 @@ public class OrgFunction implements Serializable {
|
|
|
this.weigth = weigth;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String getId() {
|
|
|
+ return String.valueOf(this.funcId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setId(String id) {
|
|
|
+ this.funcId = Long.parseLong(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getName() {
|
|
|
+ return this.funcName;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setName(String name) {
|
|
|
+ this.funcName = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getParentId() {
|
|
|
+ return String.valueOf(this.parentFuncId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setParentId(String parentId) {
|
|
|
+ this.parentFuncId = Long.parseLong(parentId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|