com.quhaodian.user.data.entity.UserRoleCatalog Maven / Gradle / Ivy
package com.quhaodian.user.data.entity;
import com.quhaodian.data.entity.CatalogEntity;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "user_role_catalog")
public class UserRoleCatalog extends CatalogEntity {
/**
* 父id
*/
@JoinColumn(name = "pid")
@ManyToOne(fetch = FetchType.LAZY)
private UserRoleCatalog parent;
@Override
public Integer getParentId() {
if (parent != null) {
return parent.getId();
}
return null;
}
public UserRoleCatalog getParent() {
return parent;
}
public void setParent(UserRoleCatalog parent) {
this.parent = parent;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy