FebsAuthUser.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package cc.mrbird.febs.common.entity;
  2. import lombok.Data;
  3. import lombok.EqualsAndHashCode;
  4. import org.springframework.security.core.GrantedAuthority;
  5. import org.springframework.security.core.userdetails.User;
  6. import java.util.Collection;
  7. import java.util.Date;
  8. /**
  9. * @author MrBird
  10. */
  11. @Data
  12. @EqualsAndHashCode(callSuper = true)
  13. public class FebsAuthUser extends User {
  14. private static final long serialVersionUID = -6411066541689297219L;
  15. private Long userId;
  16. private String avatar;
  17. private String email;
  18. private String mobile;
  19. private String sex;
  20. private Long deptId;
  21. private String deptName;
  22. private String roleId;
  23. private String roleName;
  24. private Date lastLoginTime;
  25. private String description;
  26. private String status;
  27. public FebsAuthUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
  28. super(username, password, authorities);
  29. }
  30. public FebsAuthUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
  31. super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
  32. }
  33. }