Skip to content

Commit

Permalink
Refined JPA Schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldywz committed Mar 6, 2022
1 parent 80bf26b commit 174788b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/tfip/strava/model/User.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
package tfip.strava.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;

@Entity
@Table(name = "users")
public class User {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "user_id", nullable = false)
private int id;

@Column(nullable = false)
private String name;

@Column(nullable = false)
private String email;

public int getId() {
Expand All @@ -37,5 +45,4 @@ public String getEmail() {
public void setEmail(String email) {
this.email = email;
}

}

0 comments on commit 174788b

Please sign in to comment.