Created
June 29, 2024 16:33
-
-
Save john-nash-rs/eaac041e874d8c7566a46e15287669df 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 app.skillcaptain.learningProject; | |
import jakarta.persistence.Entity; | |
import jakarta.persistence.GeneratedValue; | |
import jakarta.persistence.GenerationType; | |
import jakarta.persistence.Id; | |
@Entity | |
public class Students { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Integer studentId; | |
private String lastName; | |
private String firstName; | |
private String address; | |
private String city; | |
public Integer getStudentId() { | |
return studentId; | |
} | |
public void setStudentId(Integer studentId) { | |
this.studentId = studentId; | |
} | |
public String getLastName() { | |
return lastName; | |
} | |
public void setLastName(String lastName) { | |
this.lastName = lastName; | |
} | |
public String getFirstName() { | |
return firstName; | |
} | |
public void setFirstName(String firstName) { | |
this.firstName = firstName; | |
} | |
public String getAddress() { | |
return address; | |
} | |
public void setAddress(String address) { | |
this.address = address; | |
} | |
public String getCity() { | |
return city; | |
} | |
public void setCity(String city) { | |
this.city = city; | |
} | |
@Override | |
public String toString() { | |
return "Students{" + | |
"studentId=" + studentId + | |
", lastName='" + lastName + '\'' + | |
", firstName='" + firstName + '\'' + | |
", address='" + address + '\'' + | |
", city='" + city + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment