|
1 | 1 | package com.xpeho.spring_boot_java_random_user.data.models.db; |
2 | 2 |
|
3 | 3 | import org.springframework.data.annotation.Id; |
| 4 | +import org.springframework.data.relational.core.mapping.Column; |
4 | 5 | import org.springframework.data.relational.core.mapping.Table; |
5 | 6 |
|
6 | 7 | @Table("users") |
7 | 8 | public class User { |
8 | 9 | @Id |
9 | 10 | private Long id; |
10 | | - private String firstName; |
11 | | - private String lastName; |
| 11 | + private String gender; |
| 12 | + @Column("firstname") |
| 13 | + private String firstname; |
| 14 | + @Column("lastname") |
| 15 | + private String lastname; |
| 16 | + private String civility; |
12 | 17 | private String email; |
13 | | - private String pictureUrl; |
| 18 | + private String phone; |
| 19 | + private String picture; |
| 20 | + private String nationality; |
14 | 21 |
|
15 | 22 | public User() {} |
16 | 23 |
|
17 | | - public User(Long id, String firstName, String lastName, String email, String pictureUrl) { |
18 | | - this.id = id; |
19 | | - this.firstName = firstName; |
20 | | - this.lastName = lastName; |
21 | | - this.email = email; |
22 | | - this.pictureUrl = pictureUrl; |
23 | | - } |
24 | | - |
25 | 24 | public Long getId() { return id; } |
26 | 25 | public void setId(Long id) { this.id = id; } |
27 | | - public String getFirstName() { return firstName; } |
28 | | - public void setFirstName(String firstName) { this.firstName = firstName; } |
29 | | - public String getLastName() { return lastName; } |
30 | | - public void setLastName(String lastName) { this.lastName = lastName; } |
| 26 | + public String getGender() { return gender; } |
| 27 | + public void setGender(String gender) { this.gender = gender; } |
| 28 | + public String getFirstname() { return firstname; } |
| 29 | + public void setFirstname(String firstname) { this.firstname = firstname; } |
| 30 | + public String getLastname() { return lastname; } |
| 31 | + public void setLastname(String lastname) { this.lastname = lastname; } |
| 32 | + public String getCivility() { return civility; } |
| 33 | + public void setCivility(String civility) { this.civility = civility; } |
31 | 34 | public String getEmail() { return email; } |
32 | 35 | public void setEmail(String email) { this.email = email; } |
33 | | - public String getPictureUrl() { return pictureUrl; } |
34 | | - public void setPictureUrl(String pictureUrl) { this.pictureUrl = pictureUrl; } |
| 36 | + public String getPhone() { return phone; } |
| 37 | + public void setPhone(String phone) { this.phone = phone; } |
| 38 | + public String getPicture() { return picture; } |
| 39 | + public void setPicture(String picture) { this.picture = picture; } |
| 40 | + public String getNationality() { return nationality; } |
| 41 | + public void setNationality(String nationality) { this.nationality = nationality; } |
35 | 42 | } |
0 commit comments