Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1. package com.dreamteam.restservice.RestApp.models;
  2. import org.apache.tomcat.jni.Local;
  3. import org.bson.types.ObjectId;
  4. import org.springframework.data.annotation.CreatedDate;
  5. import org.springframework.data.annotation.Id;
  6. import org.springframework.data.mongodb.core.mapping.Document;
  7.  
  8. import java.text.SimpleDateFormat;
  9. import java.time.LocalDate; // import the LocalDate class
  10. import java.util.ArrayList;
  11. import java.util.List;
  12.  
  13. @Document(collection="tanda")
  14. public class Tanda {
  15.  
  16. @Id
  17. public ObjectId _id;
  18.  
  19. private boolean isActive;
  20. private String paymentFrecuency;
  21. private Double paymentAmount;
  22. private String paymentDate;
  23. private Double moneyToReceive;
  24. private String paymentMethod;
  25. private int numberOfParticipants;
  26. private String startDate;
  27. private String endDate;
  28. private int lineNumber;
  29. private Double moneyAccumulated;
  30.  
  31. private User organizer;
  32.  
  33. List<TandaActiveParticipants> tandaActiveParticipants = new ArrayList<>();
  34. List<User> pendingOrderParticipants = new ArrayList<>();
  35. List<User> invitedParticipants = new ArrayList<>();
  36. List<Conversation> conversations = new ArrayList<>();
  37.  
  38. LocalDate createdAt;
  39.  
  40. public Tanda(ObjectId _id, Boolean isActive, User organizer,
  41. String paymentFrecuency, Double paymentAmount,
  42. String paymentDate, Double moneyToReceive,
  43. String paymentMethod, int numberOfParticipants,
  44. String startDate, String endDate, int lineNumber,
  45. Double moneyAccumulated, Local createdAt) {
  46.  
  47. this._id = _id;
  48. this.isActive = isActive;
  49. this.organizer = organizer;
  50. this.paymentFrecuency = paymentFrecuency;
  51. this.paymentAmount = paymentAmount;
  52. this.paymentDate = paymentDate;
  53. this.moneyToReceive = moneyToReceive;
  54. this.paymentMethod = paymentMethod; // ['visa', 'mastercard', 'oxxo', 'cash', 'paypal']
  55. this.numberOfParticipants = numberOfParticipants;
  56. this.startDate = startDate;
  57. this.endDate = endDate;
  58. this.lineNumber = lineNumber;
  59. this.moneyAccumulated = moneyAccumulated;
  60. this.createdAt = LocalDate.now();
  61. }
  62.  
  63.  
  64.  
  65.  
  66. public ObjectId get_id() {
  67. return _id;
  68. }
  69.  
  70. public void set_id(ObjectId _id) {
  71. this._id = _id;
  72. }
  73.  
  74. public boolean isActive() {
  75. return isActive;
  76. }
  77.  
  78. public void setActive(boolean active) {
  79. isActive = active;
  80. }
  81.  
  82. public String getPaymentFrecuency() {
  83. return paymentFrecuency;
  84. }
  85.  
  86. public void setPaymentFrecuency(String paymentFrecuency) {
  87. this.paymentFrecuency = paymentFrecuency;
  88. }
  89.  
  90. public Double getPaymentAmount() {
  91. return paymentAmount;
  92. }
  93.  
  94. public void setPaymentAmount(Double paymentAmount) {
  95. this.paymentAmount = paymentAmount;
  96. }
  97.  
  98. public String getPaymentDate() {
  99. return paymentDate;
  100. }
  101.  
  102. public void setPaymentDate(String paymentDate) {
  103. this.paymentDate = paymentDate;
  104. }
  105.  
  106. public Double getMoneyToReceive() {
  107. return moneyToReceive;
  108. }
  109.  
  110. public void setMoneyToReceive(Double moneyToReceive) {
  111. this.moneyToReceive = moneyToReceive;
  112. }
  113.  
  114. public String getPaymentMethod() {
  115. return paymentMethod;
  116. }
  117.  
  118. public void setPaymentMethod(String paymentMethod) {
  119. this.paymentMethod = paymentMethod;
  120. }
  121.  
  122. public int getNumberOfParticipants() {
  123. return numberOfParticipants;
  124. }
  125.  
  126. public void setNumberOfParticipants(int numberOfParticipants) {
  127. this.numberOfParticipants = numberOfParticipants;
  128. }
  129.  
  130. public String getStartDate() {
  131. return startDate;
  132. }
  133.  
  134. public void setStartDate(String startDate) {
  135. this.startDate = startDate;
  136. }
  137.  
  138. public String getEndDate() {
  139. return endDate;
  140. }
  141.  
  142. public void setEndDate(String endDate) {
  143. this.endDate = endDate;
  144. }
  145.  
  146. public int getLineNumber() {
  147. return lineNumber;
  148. }
  149.  
  150. public void setLineNumber(int lineNumber) {
  151. this.lineNumber = lineNumber;
  152. }
  153.  
  154. public Double getMoneyAccumulated() {
  155. return moneyAccumulated;
  156. }
  157.  
  158. public void setMoneyAccumulated(Double moneyAccumulated) {
  159. this.moneyAccumulated = moneyAccumulated;
  160. }
  161.  
  162. public User getOrganizer() {
  163. return organizer;
  164. }
  165.  
  166. public void setOrganizer(User organizer) {
  167. this.organizer = organizer;
  168. }
  169.  
  170. public List<TandaActiveParticipants> getTandaActiveParticipants() {
  171. return tandaActiveParticipants;
  172. }
  173.  
  174. public void setTandaActiveParticipants(List<TandaActiveParticipants> tandaActiveParticipants) {
  175. this.tandaActiveParticipants = tandaActiveParticipants;
  176. }
  177.  
  178. public List<User> getPendingOrderParticipants() {
  179. return pendingOrderParticipants;
  180. }
  181.  
  182. public void setPendingOrderParticipants(List<User> pendingOrderParticipants) {
  183. this.pendingOrderParticipants = pendingOrderParticipants;
  184. }
  185.  
  186. public List<User> getInvitedParticipants() {
  187. return invitedParticipants;
  188. }
  189.  
  190. public void setInvitedParticipants(List<User> invitedParticipants) {
  191. this.invitedParticipants = invitedParticipants;
  192. }
  193.  
  194. public List<Conversation> getConversations() {
  195. return conversations;
  196. }
  197.  
  198. public void setConversations(List<Conversation> conversations) {
  199. this.conversations = conversations;
  200. }
  201.  
  202. public LocalDate getCreatedAt() {
  203. return createdAt;
  204. }
  205.  
  206. public void setCreatedAt(LocalDate createdAt) {
  207. this.createdAt = createdAt;
  208. }
  209.  
  210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement