Skip to content

Instantly share code, notes, and snippets.

@rajj6
Created February 6, 2021 15:52
Show Gist options
  • Save rajj6/6e26079ac1dcf4ca4e8ae08eac134c04 to your computer and use it in GitHub Desktop.
Save rajj6/6e26079ac1dcf4ca4e8ae08eac134c04 to your computer and use it in GitHub Desktop.
package com.raj.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "users")
public class User {
@Id
private long id;
private String name;
private String email;
private String password;
public User() {
}
public User(String name, String email, String password) {
this.name = name;
this.email = email;
this.password = password;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", name='" + name + '\'' +
", email='" + email + '\'' +
", password='" + password + '\'' +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment