69 lines
2.3 KiB
Java
69 lines
2.3 KiB
Java
package com.caspos.domain;
|
|
|
|
import jakarta.persistence.*;
|
|
import java.util.UUID;
|
|
|
|
@Entity
|
|
@Table(name = "restaurant_tables")
|
|
public class RestaurantTable {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.UUID)
|
|
private UUID id;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "dining_area_id", nullable = false)
|
|
private DiningArea diningArea;
|
|
|
|
@Column(name = "table_number", nullable = false, length = 20)
|
|
private String tableNumber;
|
|
|
|
@Column(name = "min_capacity", nullable = false)
|
|
private int minCapacity = 1;
|
|
|
|
@Column(name = "max_capacity", nullable = false)
|
|
private int maxCapacity;
|
|
|
|
@Column(name = "is_combinable")
|
|
private boolean combinable = true;
|
|
|
|
@Column(name = "pos_x")
|
|
private Double posX;
|
|
|
|
@Column(name = "pos_y")
|
|
private Double posY;
|
|
|
|
@Column(name = "width")
|
|
private Double width;
|
|
|
|
@Column(name = "height")
|
|
private Double height;
|
|
|
|
@Column(name = "shape", length = 20)
|
|
private String shape;
|
|
|
|
public UUID getId() { return id; }
|
|
public DiningArea getDiningArea() { return diningArea; }
|
|
public String getTableNumber() { return tableNumber; }
|
|
public int getMinCapacity() { return minCapacity; }
|
|
public int getMaxCapacity() { return maxCapacity; }
|
|
public boolean isCombinable() { return combinable; }
|
|
public Double getPosX() { return posX; }
|
|
public Double getPosY() { return posY; }
|
|
public Double getWidth() { return width; }
|
|
public Double getHeight() { return height; }
|
|
public String getShape() { return shape; }
|
|
|
|
public void setId(UUID id) { this.id = id; }
|
|
public void setDiningArea(DiningArea diningArea) { this.diningArea = diningArea; }
|
|
public void setTableNumber(String tableNumber) { this.tableNumber = tableNumber; }
|
|
public void setMinCapacity(int minCapacity) { this.minCapacity = minCapacity; }
|
|
public void setMaxCapacity(int maxCapacity) { this.maxCapacity = maxCapacity; }
|
|
public void setCombinable(boolean combinable) { this.combinable = combinable; }
|
|
public void setPosX(Double posX) { this.posX = posX; }
|
|
public void setPosY(Double posY) { this.posY = posY; }
|
|
public void setWidth(Double width) { this.width = width; }
|
|
public void setHeight(Double height) { this.height = height; }
|
|
public void setShape(String shape) { this.shape = shape; }
|
|
}
|