public class Enterprise extends AbstractAuditingEntity{
@Id @GeneratedValue private Long id;
//子公司 @OneToMany(mappedBy = "parentEnterprise")
private Set<Enterprise> childrenEnterprises = new HashSet<>();
//父公司 @ManyToOne @JoinColumn(name = "parent_id")
private Enterprise parentEnterprise;
//部门 @OneToMany(targetEntity = Dept.class)
private Set<Dept> depts = new HashSet<>();
}