1+ package com .test .demo .model ;
2+
3+ import javax .persistence .Column ;
4+ import javax .persistence .Entity ;
5+ import javax .persistence .GeneratedValue ;
6+ import javax .persistence .GenerationType ;
7+ import javax .persistence .Id ;
8+ import javax .persistence .Table ;
9+
10+ @ Entity
11+ @ Table (name ="TBL_EMPLOYEES" )
12+ public class EmployeeEntity {
13+
14+ @ Id
15+ @ GeneratedValue (strategy = GenerationType .IDENTITY )
16+ private Long id ;
17+
18+ @ Column (name ="first_name" )
19+ private String firstName ;
20+
21+ @ Column (name ="last_name" )
22+ private String lastName ;
23+
24+ @ Column (name ="email" , nullable =false , length =200 )
25+ private String email ;
26+
27+ public Long getId () {
28+ return id ;
29+ }
30+
31+ public void setId (Long id ) {
32+ this .id = id ;
33+ }
34+
35+ public String getFirstName () {
36+ return firstName ;
37+ }
38+
39+ public void setFirstName (String firstName ) {
40+ this .firstName = firstName ;
41+ }
42+
43+ public String getLastName () {
44+ return lastName ;
45+ }
46+
47+ public void setLastName (String lastName ) {
48+ this .lastName = lastName ;
49+ }
50+
51+ public String getEmail () {
52+ return email ;
53+ }
54+
55+ public void setEmail (String email ) {
56+ this .email = email ;
57+ }
58+
59+ @ Override
60+ public String toString () {
61+ return "EmployeeEntity [id=" + id + ", firstName=" + firstName +
62+ ", lastName=" + lastName + ", email=" + email + "]" ;
63+ }
64+ }
0 commit comments