Skip to content

Instantly share code, notes, and snippets.

@visparashar
Created February 20, 2018 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visparashar/12d800811b67d7fe84990dad511c6573 to your computer and use it in GitHub Desktop.
Save visparashar/12d800811b67d7fe84990dad511c6573 to your computer and use it in GitHub Desktop.
package com.programinjava.learning.RestApiDemo.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
@Entity
@Table
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer id;
@Column
@NotNull
public String name;
@Column
public Long mobileNumber;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getMobileNumber() {
return mobileNumber;
}
public void setMobileNumber(Long mobileNumber) {
this.mobileNumber = mobileNumber;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment