Skip to content

Version 乐观锁注解

说明

作用:标记字段为乐观锁字段

如何用?

java
@Data
@Table 
public class SysUser {

    @TableId
    private Integer id;

    private String userName;

    private String password;

    @ForeignKey(SysRole.class)
    private Integer roleId;
    
    @Version
    private Integer version;

    private LocalDateTime createTime;
}