首页>代码>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;
}
最近下载更多
0592lyj  LV9 2024年1月5日
Seaskye  LV14 2023年11月4日
fellowfun  LV12 2023年3月16日
最代码官方  LV168 2022年11月6日
最近浏览更多
xuxuer 2024年9月26日
暂无贡献等级
小黄同学  LV8 2024年5月21日
youwuzuichen  LV11 2024年4月17日
denliv_hui  LV13 2024年4月2日
0592lyj  LV9 2024年1月5日
哪里的完整版  LV8 2023年12月15日
内心向阳  LV4 2023年11月7日
Seaskye  LV14 2023年11月4日
栈道小生  LV10 2023年7月24日
lipanlong  LV10 2023年7月6日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友