package de.effigenix.infrastructure.inventory.persistence.entity;

import jakarta.persistence.*;

import java.math.BigDecimal;

@Entity
@Table(name = "storage_locations")
public class StorageLocationEntity {

    @Id
    @Column(name = "id", nullable = false, length = 36)
    private String id;

    @Column(name = "name", nullable = false, unique = true, length = 100)
    private String name;

    @Column(name = "storage_type", nullable = false, length = 30)
    private String storageType;

    @Column(name = "min_temperature", precision = 5, scale = 1)
    private BigDecimal minTemperature;

    @Column(name = "max_temperature", precision = 5, scale = 1)
    private BigDecimal maxTemperature;

    @Column(name = "active", nullable = false)
    private boolean active;

    public StorageLocationEntity() {}

    // ==================== Getters & Setters ====================

    public String getId() { return id; }
    public void setId(String id) { this.id = id; }

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

    public String getStorageType() { return storageType; }
    public void setStorageType(String storageType) { this.storageType = storageType; }

    public BigDecimal getMinTemperature() { return minTemperature; }
    public void setMinTemperature(BigDecimal minTemperature) { this.minTemperature = minTemperature; }

    public BigDecimal getMaxTemperature() { return maxTemperature; }
    public void setMaxTemperature(BigDecimal maxTemperature) { this.maxTemperature = maxTemperature; }

    public boolean isActive() { return active; }
    public void setActive(boolean active) { this.active = active; }
}
