package org.example.demo.praktikum2;

import java.io.Serializable;
import java.util.List;

import jakarta.persistence.*;
import lombok.*;

@Entity
@ToString
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Firma implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @SuppressWarnings("unused")
    private String name;

    @Singular("adresse")
    @OneToMany(mappedBy="firma")
    private List<Person> person;
}
