NikitaGru

Untitled

Nov 25th, 2020
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. package com.example.scopum.model;
  2.  
  3.  
  4. import javax.persistence.Id;
  5.  
  6. import javax.persistence.*;
  7.  
  8. @Entity
  9. @Table(name = "users", schema = "public")
  10. public class User {
  11.  
  12. @Id
  13. private Long chatId;
  14. @Column(name = "state")
  15. private Integer stateId;
  16. @Column(name = "age")
  17. private int age; // Возраст пользователя
  18. @Column(name = "weight")
  19. private double weight; // Вес пользователя
  20. @Column(name = "growth")
  21. private int growth; // Рост пользователя
  22. @Column(name = "gender")
  23. private String gender; // Пол пользователя
  24. @Column(name = "employment")
  25. private double employment; // Уровень занятости пользователя(1-5)
  26. @Column(name = "calpfc")
  27. private double[] calPFC;
  28.  
  29. public double[] getCalPFC() {
  30. return calPFC;
  31. }
  32.  
  33. public void setCalPFC(double[] calPFC) {
  34. this.calPFC = calPFC;
  35. }
  36.  
  37. public Long getChatId() {
  38. return chatId;
  39. }
  40.  
  41.  
  42. public Integer getStateId() {
  43. return stateId;
  44. }
  45.  
  46. public void setStateId(Integer stateId) {
  47. this.stateId = stateId;
  48. }
  49.  
  50.  
  51. public User() {
  52.  
  53. }
  54.  
  55.  
  56. public User(Long chatId, Integer state) {
  57. this.chatId = chatId;
  58. this.stateId = state;
  59. }
  60.  
  61. public int getAge() {
  62. return age;
  63. }
  64.  
  65. public void setAge(int age) {
  66. this.age = age;
  67. }
  68.  
  69. public double getWeight() {
  70. return weight;
  71. }
  72.  
  73. public void setWeight(double weight) {
  74. this.weight = weight;
  75. }
  76.  
  77. public int getGrowth() {
  78. return growth;
  79. }
  80.  
  81. public void setGrowth(int growth) {
  82. this.growth = growth;
  83. }
  84.  
  85. public String getGender() {
  86. return gender.toString();
  87. }
  88.  
  89. public void setGender(String gender) {
  90. this.gender = gender;
  91. }
  92.  
  93. public double getEmployment() {
  94. return employment;
  95. }
  96.  
  97. public void setEmployment(double employment) {
  98. this.employment = employment;
  99. }
  100. }
  101.  
Advertisement
Add Comment
Please, Sign In to add comment