Files
NTO-2025-Backend-TeamTask/src/main/java/com/example/nto/entity/Booking.java
Maksim b6d8d16a9a
Some checks failed
Android Test / validate-and-test (pull_request) Has been cancelled
meaningful commit
2025-12-02 21:07:04 +03:00

39 lines
984 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.example.nto.entity;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate; // Убедитесь, что у вас правильный импорт даты
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "booking")
public class Booking {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "date")
private LocalDate date;
@Column(name = "place_id", insertable = false, updatable = false)
private Long placeId;
@Column(name = "employee_id", insertable = false, updatable = false)
private Long employeeId;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "employee_id", nullable = false)
private Employee employee;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "place_id", nullable = false)
private Place place;
}