首页>代码>SpringBoot整合JPA实现自动创建数据库表自动建表,JPA逆向生成数据库表>/springbootjpa/src/main/java/com/simon/springbootjpa/entity/User.java
package com.simon.springbootjpa.entity;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
/**
* @author Simon
*/
@Entity
@Data
@Table(name = "user")
public class User {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Id
@Column(name = "user_id")
private Long userId;
@Column(name = "sex")
private String sex;
private String userName;
private String passWord;
private String email;
private String nickName;
private String regTime;
@Column(length = 4000, columnDefinition = "VARCHAR(4000) comment '请求信息' DEFAULT ''")
private String request;
@Column(nullable = false, columnDefinition = "TIMESTAMP comment '创建时间' DEFAULT CURRENT_TIMESTAMP")
private Date createDate;
}
最近下载更多

最近浏览