Created
March 13, 2022 12:09
-
-
Save pranaybathini/179964e11a8cd3fc9931630052fa73cb 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
import lombok.Data; | |
import lombok.ToString; | |
import javax.persistence.*; | |
@Data | |
@Entity | |
@ToString | |
@Table(name = "post") | |
public class Post { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
@Column(name = "post_id") | |
private Integer postId; | |
@Column(name = "post_name") | |
private String postName; | |
@Column(name = "post_description") | |
private String postDescription; | |
@Column(name = "created_on") | |
private Long createdOn; | |
@Column(name = "created_by") | |
private String createdBy; | |
@Column(name = "modified_on") | |
private Long modifiedOn; | |
@Column(name = "modified_by") | |
private String modifiedBy; | |
} |
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
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
import javax.persistence.*; | |
@Data | |
@Entity | |
@Table(name = "user_details") | |
@NoArgsConstructor | |
@AllArgsConstructor | |
public class UserDetails { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
@Column(name = "user_id") | |
private Integer userId; | |
@Column(name = "first_name") | |
private String firstName; | |
@Column(name = "middle_name") | |
private String middleName; | |
@Column(name = "last_name") | |
private String lastName; | |
@Column(name = "email") | |
private String email; | |
@Column(name = "password_hash") | |
private String passwordHash; | |
@Column(name = "created_on") | |
private Long createdOn; | |
@Column(name = "created_by") | |
private String createdBy; | |
@Column(name = "modified_on") | |
private Long modifiedOn; | |
@Column(name = "modified_by") | |
private String modifiedBy; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment