package com.psg.dlsysinfo.dl_sysinfo_server.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import jakarta.persistence.*;

@Entity
@Table(name = "drives")
public class Drive {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    @JoinColumn(name = "device_id", nullable = false)
    @JsonBackReference
    private Devices device;


    @Column(name = "name")
    private String name;

    @Column(name = "total_size_gb")
    private Double totalSizeGB;

    @Column(name = "free_space_gb")
    private Double freeSpaceGB;

    @Column(name = "drive_type")
    private String driveType;

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public Devices getDevice() {
        return device;
    }

    public void setDevice(Devices device) {
        this.device = device;
    }

    public String getName() {
        return name;
    }

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

    public Double getTotalSizeGB() {
        return totalSizeGB;
    }

    public void setTotalSizeGB(Double totalSizeGB) {
        this.totalSizeGB = totalSizeGB;
    }

    public Double getFreeSpaceGB() {
        return freeSpaceGB;
    }

    public void setFreeSpaceGB(Double freeSpaceGB) {
        this.freeSpaceGB = freeSpaceGB;
    }

    public String getDriveType() {
        return driveType;
    }

    public void setDriveType(String driveType) {
        this.driveType = driveType;
    }
}
