package com.psg.dlsysinfo.dl_sysinfo_server.entity;

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

import java.time.LocalDateTime;

@Entity
@Table(name = "cached_installed_software")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CachedInstalledSoftware {

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

    @Column(name = "device_id")    // 👈 matches database
    private Long deviceId;

    private String hostname;

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


    @Column(name = "software_name")   // 👈 matches database
    private String softwareName;

    @Column(name = "app_version")    // 👈 matches database
    private String appVersion;

    private String publisher;

    @Column(name = "total_cves")
    private Integer totalCves;

    @Column(name = "cve_list", columnDefinition = "TEXT")
    private String cveList;


    @Column(name = "last_updated")   // 👈 matches database
    private LocalDateTime lastUpdated;
}
