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.

119 lines
3.0 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package com.gcc.communityHall.entity;
  2. import java.time.LocalDate;
  3. import com.fasterxml.jackson.annotation.JsonIgnore;
  4. import jakarta.persistence.CascadeType;
  5. import jakarta.persistence.Column;
  6. import jakarta.persistence.Entity;
  7. import jakarta.persistence.FetchType;
  8. import jakarta.persistence.GeneratedValue;
  9. import jakarta.persistence.GenerationType;
  10. import jakarta.persistence.Id;
  11. import jakarta.persistence.ManyToOne;
  12. @Entity
  13. public class Damage {
  14. @Id
  15. @GeneratedValue(strategy = GenerationType.IDENTITY)
  16. private int damageId;
  17. private LocalDate cdate;
  18. @Column(name = "asset_name")
  19. private String assetName;
  20. private String comments;
  21. private String damageImageUrl;
  22. private int quantity;
  23. private double assetAmount;
  24. private String updatedBy;
  25. @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
  26. @JsonIgnore
  27. private HallDetails hallDetails;
  28. @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
  29. @JsonIgnore
  30. private BookingDetails bookingDetails;
  31. public Damage(int damageId, LocalDate cdate, String assetName, String comments, String damageImageUrl, int quantity,
  32. double assetAmount, String updatedBy, HallDetails hallDetails, BookingDetails bookingDetails) {
  33. super();
  34. this.damageId = damageId;
  35. this.cdate = cdate;
  36. this.assetName = assetName;
  37. this.comments = comments;
  38. this.damageImageUrl = damageImageUrl;
  39. this.quantity = quantity;
  40. this.assetAmount = assetAmount;
  41. this.updatedBy = updatedBy;
  42. this.hallDetails = hallDetails;
  43. this.bookingDetails = bookingDetails;
  44. }
  45. public Damage() {
  46. super();
  47. // TODO Auto-generated constructor stub
  48. }
  49. public int getDamageId() {
  50. return damageId;
  51. }
  52. public void setDamageId(int damageId) {
  53. this.damageId = damageId;
  54. }
  55. public LocalDate getCdate() {
  56. return cdate;
  57. }
  58. public void setCdate(LocalDate cdate) {
  59. this.cdate = cdate;
  60. }
  61. public String getAssetName() {
  62. return assetName;
  63. }
  64. public void setAssetName(String assetName) {
  65. this.assetName = assetName;
  66. }
  67. public String getComments() {
  68. return comments;
  69. }
  70. public void setComments(String comments) {
  71. this.comments = comments;
  72. }
  73. public String getDamageImageUrl() {
  74. return damageImageUrl;
  75. }
  76. public void setDamageImageUrl(String damageImageUrl) {
  77. this.damageImageUrl = damageImageUrl;
  78. }
  79. public int getQuantity() {
  80. return quantity;
  81. }
  82. public void setQuantity(int quantity) {
  83. this.quantity = quantity;
  84. }
  85. public double getAssetAmount() {
  86. return assetAmount;
  87. }
  88. public void setAssetAmount(double assetAmount) {
  89. this.assetAmount = assetAmount;
  90. }
  91. public String getUpdatedBy() {
  92. return updatedBy;
  93. }
  94. public void setUpdatedBy(String updatedBy) {
  95. this.updatedBy = updatedBy;
  96. }
  97. public HallDetails getHallDetails() {
  98. return hallDetails;
  99. }
  100. public void setHallDetails(HallDetails hallDetails) {
  101. this.hallDetails = hallDetails;
  102. }
  103. public BookingDetails getBookingDetails() {
  104. return bookingDetails;
  105. }
  106. public void setBookingDetails(BookingDetails bookingDetails) {
  107. this.bookingDetails = bookingDetails;
  108. }
  109. }