Created
February 20, 2018 08:48
-
-
Save visparashar/12d800811b67d7fe84990dad511c6573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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