package space.nstart.pcp.slots_service.entity

import jakarta.persistence.Entity
import jakarta.persistence.FetchType
import jakarta.persistence.GeneratedValue
import jakarta.persistence.GenerationType
import jakarta.persistence.Id
import jakarta.persistence.Column
import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.Table


@Entity
@Table(name = "booked_slot_request")
class BookedRequestEntity(
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    val bookedSlotRequestId : Long? = null,
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "booked_slot_id", nullable = false)
    val bookedSlot : BookedSlotEntity = BookedSlotEntity(),
    @Column(name = "request_id", nullable = false, length = 50)
    var requestId : String = "",
) {
}
