聊聊PowerJob的UserService-UserInfoDO

时间:2024-01-25 21:38:38

tech/powerjob/server/persistence/remote/model/UserInfoDO.java

@Data
@Entity
@Table(indexes = {
        @Index(name = "uidx01_user_info", columnList = "username"),
        @Index(name = "uidx02_user_info", columnList = "email")
})
public class UserInfoDO {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "native")
    @GenericGenerator(name = "native", strategy = "native")
    private Long id;

    private String username;

    private String password;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 邮箱地址
     */
    private String email;
    /**
     * webHook
     */
    private String webHook;
    /**
     * 扩展字段
     */
    private String extra;

    private Date gmtCreate;

    private Date gmtModified;
}

UserInfoDO定义了username、email两个唯一键