You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/***********************************************************
* @Description : 用户表
* @author : 梁山广(Laing Shan Guang)
* @date : 2019/5/14 07:49
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.entity ;
import com.fasterxml.jackson.annotation.JsonFormat ;
import lombok.Data ;
import org.hibernate.annotations.DynamicUpdate ;
import javax.persistence.Entity ;
import javax.persistence.Id ;
import java.util.Date ;
/**
* 用户表,记录用户信息
*/
@Data
@Entity
@DynamicUpdate
public class User {
/**
* 用户id, 主键
*/
@Id
private String userId ;
/**
* 用户名,唯一
*/
private String userUsername ;
/**
* 昵称
*/
private String userNickname ;
/**
* 密码
*/
private String userPassword ;
/**
* 角色id
*/
private Integer userRoleId ;
/**
* 头像
*/
private String userAvatar ;
/**
* 描述
*/
private String userDescription ;
/**
* 邮箱
*/
private String userEmail ;
/**
* 电话
*/
private String userPhone ;
/**
* 创建时间, 设计表时设置了自动插入当前时间, 无需在Java代码中设置了
*/
@JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8" )
private Date createTime ;
/**
* 更新时间, 设计表时设置了自动插入当前时间, 无需在Java代码中设置了。
* 同时@DynamicUpdate注解可以时间当数据库数据变化时自动更新, 无需人工维护
*/
@JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8" )
private Date updateTime ;
}