package @app.group.id@.@app.name@.domain;

import jakarta.persistence.*;
import java.io.Serializable;

@Entity(name = "t_building")
public class Building implements Serializable {
    @Id
    @SequenceGenerator(name="building_generator", sequenceName="seq_building")
    @GeneratedValue(generator = "building_generator")
    private Long buildingId;

    @Column(nullable = false)
    private String name;

    @OneToOne()
    @JoinColumn(name = "address_id")
    private Address address;


    public Long getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Long buildingId) {
        this.buildingId = buildingId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }
}
