[57e58a3] | 1 | package com.example.skychasemk.model;
|
---|
| 2 |
|
---|
| 3 | import jakarta.persistence.*;
|
---|
| 4 | import lombok.Getter;
|
---|
| 5 | import lombok.Setter;
|
---|
| 6 |
|
---|
| 7 | import java.math.BigDecimal;
|
---|
| 8 | import java.time.LocalDate;
|
---|
| 9 |
|
---|
| 10 | @Entity
|
---|
[3d60932] | 11 | @Table(name="booking")
|
---|
[57e58a3] | 12 | public class Booking {
|
---|
| 13 |
|
---|
| 14 | @Id
|
---|
| 15 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
[3d60932] | 16 | @Column(name = "bookingid")
|
---|
[57e58a3] | 17 |
|
---|
[de83113] | 18 | private Integer bookingId;
|
---|
[3d60932] | 19 | @Column(name = "userid")
|
---|
[57e58a3] | 20 |
|
---|
[de83113] | 21 | private Integer userId;
|
---|
[57e58a3] | 22 |
|
---|
| 23 | @Column(name = "booking_date")
|
---|
| 24 |
|
---|
| 25 | private LocalDate booking_date;
|
---|
[de83113] | 26 |
|
---|
[57e58a3] | 27 | @Column(name = "payment_status")
|
---|
| 28 |
|
---|
| 29 | @Enumerated(EnumType.STRING)
|
---|
| 30 | private payment_status status;
|
---|
| 31 | @Column(name = "total_cost")
|
---|
| 32 |
|
---|
| 33 | private BigDecimal total_cost;
|
---|
| 34 | @Column(name = "seat_number")
|
---|
| 35 |
|
---|
| 36 | private Integer seat_number;
|
---|
| 37 |
|
---|
[3d60932] | 38 | @Column(name = "flightid")
|
---|
| 39 | private Integer flightId;
|
---|
[57e58a3] | 40 |
|
---|
[3d60932] | 41 | public Integer getFlightId() {
|
---|
[57e58a3] | 42 | return flightId;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
[3d60932] | 45 | public void setFlightId(Integer flightId) {
|
---|
[57e58a3] | 46 | this.flightId = flightId;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | public enum payment_status {
|
---|
| 50 | PENDING,
|
---|
| 51 | COMPLETED,
|
---|
| 52 | CANCELLED
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | public LocalDate getBookingDate() {
|
---|
| 56 | return booking_date;
|
---|
| 57 | }
|
---|
| 58 |
|
---|
[de83113] | 59 | public Integer getBookingId() {
|
---|
| 60 | return bookingId;
|
---|
[57e58a3] | 61 | }
|
---|
| 62 |
|
---|
[de83113] | 63 | public void setBookingId(Integer bookingID) {
|
---|
| 64 | this.bookingId = bookingID;
|
---|
[57e58a3] | 65 | }
|
---|
| 66 |
|
---|
[de83113] | 67 | public Integer getUserId() {
|
---|
| 68 | return userId;
|
---|
[57e58a3] | 69 | }
|
---|
| 70 |
|
---|
[de83113] | 71 | public void setUserId(Integer userId) {
|
---|
| 72 | this.userId = userId;
|
---|
[57e58a3] | 73 | }
|
---|
| 74 |
|
---|
| 75 | public LocalDate getBooking_date() {
|
---|
| 76 | return booking_date;
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | public void setBooking_date(LocalDate booking_date) {
|
---|
| 80 | this.booking_date = booking_date;
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | public payment_status getStatus() {
|
---|
| 84 | return status;
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 | public void setStatus(payment_status status) {
|
---|
| 88 | this.status = status;
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 | public BigDecimal getTotal_cost() {
|
---|
| 92 | return total_cost;
|
---|
| 93 | }
|
---|
| 94 |
|
---|
| 95 | public void setTotal_cost(BigDecimal total_cost) {
|
---|
| 96 | this.total_cost = total_cost;
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | public Integer getSeat_number() {
|
---|
| 100 | return seat_number;
|
---|
| 101 | }
|
---|
| 102 |
|
---|
| 103 | public void setSeat_number(Integer seat_number) {
|
---|
| 104 | this.seat_number = seat_number;
|
---|
| 105 | }
|
---|
| 106 |
|
---|
| 107 | public void setBookingDate(LocalDate bookingDate) {
|
---|
| 108 | this.booking_date = bookingDate;
|
---|
| 109 | }
|
---|
| 110 |
|
---|
| 111 | public Integer getSeatNumber() {
|
---|
| 112 | return seat_number;
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | public void setSeatNumber(Integer seat_number) {
|
---|
| 116 | this.seat_number = seat_number;
|
---|
| 117 | }
|
---|
| 118 | }
|
---|