Created
June 5, 2017 05:13
-
-
Save sachinsmc/3cdb5c91ec707ecc4b19cb58e386892f 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.smc.model; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
@Entity | |
@Table(name = "user_table") | |
public class UserModel { | |
@Id | |
@GeneratedValue | |
@Column(name = "id") | |
@JsonProperty("userId") | |
int userId; | |
@Column(name = "name") | |
@JsonProperty("userName") | |
String userName; | |
@Column(name = "message") | |
@JsonProperty("userMessage") | |
String userMessage; | |
public UserModel() { | |
} | |
public int getUserId() { | |
return userId; | |
} | |
public void setUserId(int userId) { | |
this.userId = userId; | |
} | |
public String getUserName() { | |
return userName; | |
} | |
public void setUserName(String userName) { | |
this.userName = userName; | |
} | |
public String getUserMessage() { | |
return userMessage; | |
} | |
public void setUserMessage(String userMessage) { | |
this.userMessage = userMessage; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment