|
@@ -5,6 +5,7 @@ import javax.persistence.EnumType;
|
|
|
import javax.persistence.Enumerated;
|
|
|
import javax.persistence.GeneratedValue;
|
|
|
import javax.persistence.Id;
|
|
|
+import javax.persistence.Index;
|
|
|
import javax.persistence.Table;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
@@ -15,7 +16,8 @@ import cn.com.qmth.examcloud.core.basic.dao.enums.Gender;
|
|
|
* Created by songyue on 17/1/13.
|
|
|
*/
|
|
|
@Entity
|
|
|
-@Table(name = "ecs_core_user")
|
|
|
+@Table(name = "ecs_core_user", indexes = {
|
|
|
+ @Index(name = "IDX_B_USER_001001", columnList = "rootOrgId,loginName", unique = true)})
|
|
|
public class UserEntity extends JpaEntity {
|
|
|
|
|
|
private static final long serialVersionUID = 9190180279768027647L;
|
|
@@ -24,6 +26,7 @@ public class UserEntity extends JpaEntity {
|
|
|
@GeneratedValue
|
|
|
private Long id;
|
|
|
|
|
|
+ @NotNull
|
|
|
private Long rootOrgId;
|
|
|
|
|
|
private Long orgId;
|