package cn.reghao.tnb.sb.db.hibernate;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import jakarta.persistence.*;
import java.io.Serializable;

/**
 * @author reghao
 * @date 2023-04-13 16:00:57
 */
@NoArgsConstructor
@Setter
@Getter
@Entity
@Table(name="z_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "id", insertable = false, updatable = false)
    private Integer id;

    @Column(name = "username")
    private String username;
    @Column(name = "gender")
    private Integer gender;

    public User(String username, int gender) {
        this.id = 1;
        this.username = "reghao";
        this.gender = 1;
    }
}
