package com.alterdekim.game.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="house_inventory")
public class HouseInventory {
    @jakarta.persistence.Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long Id;

    @OneToOne
    @JoinColumn(referencedColumnName = "id")
    private User user;

    @Column(nullable = false)
    private Long goodId;

    @Column(nullable = false)
    private Long homeId;

    @Column(nullable = false)
    private Double x;

    @Column(nullable = false)
    private Double y;

    @Column(nullable = false)
    private Integer frame;

    public HouseInventory(User user, Long goodId, Long homeId, Double x, Double y, Integer frame) {
        this.user = user;
        this.goodId = goodId;
        this.homeId = homeId;
        this.x = x;
        this.y = y;
        this.frame = frame;
    }
}
