package com.server.api.models;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

@Entity
@Table(name = "coordinates")
public class Coordinates {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long coordinate_id;

  @ManyToOne
  @JoinColumn(name = "flaechendruck_id", nullable = false)
  @JsonIgnore
  private VorlageFlaechendruck vorlage;

  private Double x;
  private Double y;
  private Double rotation;

  // Getter und Setter
  public Long getId() {
    return coordinate_id;
  }

  public void setId(Long id) {
    this.coordinate_id = id;
  }

  public VorlageFlaechendruck getVorlage() {
    return vorlage;
  }

  public void setVorlage(VorlageFlaechendruck vorlage) {
    this.vorlage = vorlage;
  }

  public Double getX() {
    return x;
  }

  public void setX(Double x) {
    this.x = x;
  }

  public Double getY() {
    return y;
  }

  public void setY(Double y) {
    this.y = y;
  }

  public Double getRotation() {
    return rotation;
  }

  public void setRotation(Double rotation) {
    this.rotation = rotation;
  }
}
