Packet.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package com.deliveryproject.easydelivery.Models;
  2. import javax.persistence.*;
  3. @Entity
  4. @Table(name = "packets")
  5. public class Packet {
  6. @Id
  7. @GeneratedValue(strategy = GenerationType.IDENTITY)
  8. private Long id;
  9. @Column(name = "description")
  10. private String description;
  11. @Column(name = "name")
  12. private String name;
  13. public Packet() {}
  14. public Packet(String description, String name) {
  15. this.description = description;
  16. this.name = name;
  17. }
  18. public Long getId() {
  19. return id;
  20. }
  21. public void setId(Long id) {
  22. this.id = id;
  23. }
  24. public String getDescription() {
  25. return description;
  26. }
  27. public void setDescription(String description) {
  28. this.description = description;
  29. }
  30. public String getName() {
  31. return name;
  32. }
  33. @Override
  34. public String toString() {
  35. return "Packet{" +
  36. "id=" + id +
  37. ", description='" + description + '\'' +
  38. ", name='" + name + '\'' +
  39. '}';
  40. }
  41. public void setName(String name) {
  42. this.name = name;
  43. }
  44. }