You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

356 lines
8.7 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
  1. package com.gcc.communityHall.entity;
  2. import java.time.LocalDate;
  3. import java.util.List;
  4. import com.fasterxml.jackson.annotation.JsonIgnore;
  5. import jakarta.persistence.*;
  6. @Entity
  7. public class BookingDetails {
  8. @Id
  9. @GeneratedValue(strategy = GenerationType.IDENTITY)
  10. private int bookingId;
  11. public enum BookingStatus {
  12. PENDING, APPROVED, REJECTED, CANCELED, PAYMENT_FAILURE, GCC_BLOCKED, REFUNDED ,COMPLETED, GCC_UNBLOCKED , WAITING_FOR_NOC , WAITING_FOR_NOC_APPROVAL
  13. }
  14. public enum RefundStatus {
  15. APPROVED, WAITING, INITIATED, REJECTED, COMPLETED, NA , FAILURE , CLOSED
  16. }
  17. public enum BookingType {
  18. ONLINE,OFFLINE
  19. }
  20. @Column(name="booking_type")
  21. @Enumerated(EnumType.STRING)
  22. private BookingType bookingtype;
  23. @Column(name="no_of_days")
  24. private double noOfDays;
  25. @Column(name="start_date")
  26. private String startDate;
  27. @Column(name="end_date")
  28. private String endDate;
  29. @Column(name="starting_slot")
  30. private int startingSlot;
  31. @Column(name="ending_slot")
  32. private int endingSlot;
  33. @Column(name="booking_date")
  34. private LocalDate bookingDate;
  35. @Column(name="booking_status")
  36. @Enumerated(EnumType.STRING)
  37. private BookingStatus bookingStatus = BookingStatus.PENDING;
  38. @Column(name="deposit_amount")
  39. private double depositAmount;
  40. @Column(name="hall_amount")
  41. private double hallAmount;
  42. @Column(name="amount_received")
  43. private double amountReceived;
  44. private double gst;
  45. @Column(name="approved_by")
  46. private String approvedBy;
  47. @Column(name="refund_status")
  48. @Enumerated(EnumType.STRING)
  49. private RefundStatus refundStatus;
  50. @Column(name="updated_date")
  51. private String updatedDate;
  52. private String reason;
  53. private int scheduleCount;
  54. @Column(name = "relationship")
  55. private String relationship;
  56. private String comments;
  57. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
  58. @JoinColumn(name = "counterdetails_counter_id")
  59. private CounterDetails counterDetails;
  60. @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
  61. private Users users;
  62. @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
  63. private HallDetails hallDetails;
  64. @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER,mappedBy = "bookingDetails")
  65. private List<BookingHistory> bookingHistories;
  66. @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  67. List<BookingDocuments> bookingDocumentsList;
  68. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER,mappedBy = "bookingDetails")
  69. private Settlement settlement;
  70. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  71. private EbDetails ebDetails;
  72. @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  73. private List<Damage> damageList;
  74. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  75. private Payments payments;
  76. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  77. private ExtraPayments extrapayments;
  78. @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "bookingDetails")
  79. private RefundTransaction refundTransaction;
  80. private String counterId;
  81. public int getBookingId() {
  82. return bookingId;
  83. }
  84. public void setBookingId(int bookingId) {
  85. this.bookingId = bookingId;
  86. }
  87. public double getNoOfDays() {
  88. return noOfDays;
  89. }
  90. public void setNoOfDays(double days) {
  91. this.noOfDays = days;
  92. }
  93. public String getStartDate() {
  94. return startDate;
  95. }
  96. public void setStartDate(String startDate) {
  97. this.startDate = startDate;
  98. }
  99. public String getEndDate() {
  100. return endDate;
  101. }
  102. public void setEndDate(String endDate) {
  103. this.endDate = endDate;
  104. }
  105. public int getStartingSlot() {
  106. return startingSlot;
  107. }
  108. public void setStartingSlot(int startingSlot) {
  109. this.startingSlot = startingSlot;
  110. }
  111. public int getEndingSlot() {
  112. return endingSlot;
  113. }
  114. public void setEndingSlot(int endingSlot) {
  115. this.endingSlot = endingSlot;
  116. }
  117. public LocalDate getBookingDate() {
  118. return bookingDate;
  119. }
  120. public void setBookingDate(LocalDate bookingDate) {
  121. this.bookingDate = bookingDate;
  122. }
  123. public BookingStatus getBookingStatus() {
  124. return bookingStatus;
  125. }
  126. public void setBookingStatus(BookingStatus bookingStatus) {
  127. this.bookingStatus = bookingStatus;
  128. }
  129. public double getDepositAmount() {
  130. return depositAmount;
  131. }
  132. public void setDepositAmount(double depositAmount) {
  133. this.depositAmount = depositAmount;
  134. }
  135. public double getHallAmount() {
  136. return hallAmount;
  137. }
  138. public void setHallAmount(double hallAmount) {
  139. this.hallAmount = hallAmount;
  140. }
  141. public double getAmountReceived() {
  142. return amountReceived;
  143. }
  144. public void setAmountReceived(double amountReceived) {
  145. this.amountReceived = amountReceived;
  146. }
  147. public double getGst() {
  148. return gst;
  149. }
  150. public void setGst(double gst) {
  151. this.gst = gst;
  152. }
  153. public String getApprovedBy() {
  154. return approvedBy;
  155. }
  156. public void setApprovedBy(String approvedBy) {
  157. this.approvedBy = approvedBy;
  158. }
  159. public RefundStatus getRefundStatus() {
  160. return refundStatus;
  161. }
  162. public void setRefundStatus(RefundStatus refundStatus) {
  163. this.refundStatus = refundStatus;
  164. }
  165. public String getUpdatedDate() {
  166. return updatedDate;
  167. }
  168. public void setUpdatedDate(String updatedDate) {
  169. this.updatedDate = updatedDate;
  170. }
  171. public String getReason() {
  172. return reason;
  173. }
  174. public void setReason(String reason) {
  175. this.reason = reason;
  176. }
  177. public Users getUsers() {
  178. return users;
  179. }
  180. public void setUsers(Users users) {
  181. this.users = users;
  182. }
  183. public HallDetails getHallDetails() {
  184. return hallDetails;
  185. }
  186. public void setHallDetails(HallDetails hallDetails) {
  187. this.hallDetails = hallDetails;
  188. }
  189. public List<BookingDocuments> getBookingDocumentsList() {
  190. return bookingDocumentsList;
  191. }
  192. public void setBookingDocumentsList(List<BookingDocuments> bookingDocumentsList) {
  193. this.bookingDocumentsList = bookingDocumentsList;
  194. }
  195. public Settlement getSettlement() {
  196. return settlement;
  197. }
  198. public void setSettlement(Settlement settlement) {
  199. this.settlement = settlement;
  200. }
  201. public EbDetails getEbDetails() {
  202. return ebDetails;
  203. }
  204. public void setEbDetails(EbDetails ebDetails) {
  205. this.ebDetails = ebDetails;
  206. }
  207. public List<Damage> getDamageList() {
  208. return damageList;
  209. }
  210. public void setDamageList(List<Damage> damageList) {
  211. this.damageList = damageList;
  212. }
  213. public Payments getPayments() {
  214. return payments;
  215. }
  216. public void setPayments(Payments payments) {
  217. this.payments = payments;
  218. }
  219. public RefundTransaction getRefundTransaction() {
  220. return refundTransaction;
  221. }
  222. public void setRefundTransaction(RefundTransaction refundTransaction) {
  223. this.refundTransaction = refundTransaction;
  224. }
  225. public CounterDetails getCounterDetails() {
  226. return counterDetails;
  227. }
  228. public void setCounterDetails(CounterDetails counterDetails) {
  229. this.counterDetails = counterDetails;
  230. }
  231. public BookingType getBookingtype() {
  232. return bookingtype;
  233. }
  234. public void setBookingtype(BookingType bookingtype) {
  235. this.bookingtype = bookingtype;
  236. }
  237. public List<BookingHistory> getBookingHistories() {
  238. return bookingHistories;
  239. }
  240. public void setBookingHistories(List<BookingHistory> bookingHistories) {
  241. this.bookingHistories = bookingHistories;
  242. }
  243. public int getScheduleCount() {
  244. return scheduleCount;
  245. }
  246. public void setScheduleCount(int scheduleCount) {
  247. this.scheduleCount = scheduleCount;
  248. }
  249. public String getRelationship() {
  250. return relationship;
  251. }
  252. public void setRelationship(String relationship) {
  253. this.relationship = relationship;
  254. }
  255. public String getComments() {
  256. return comments;
  257. }
  258. public void setComments(String comments) {
  259. this.comments = comments;
  260. }
  261. public ExtraPayments getExtrapayments() {
  262. return extrapayments;
  263. }
  264. public void setExtrapayments(ExtraPayments extrapayments) {
  265. this.extrapayments = extrapayments;
  266. }
  267. public String getCounterId() {
  268. return counterId;
  269. }
  270. public void setCounterId(String counterId) {
  271. this.counterId = counterId;
  272. }
  273. }