package com.psg.dlsysinfo.dl_sysinfo_server.entity;

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

import java.time.LocalDateTime;

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

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

    @Column(name = "device_id", nullable = false)
    private Long deviceId;

    @Column(name = "cve_id", nullable = false)
    private String cveId;

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

    @Column(name = "score")
    private Double score;

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

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

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

    @Column(name = "last_modified")
    private LocalDateTime lastModified;

    @Column(name = "last_updated")
    private LocalDateTime lastUpdated;

    @Column(name = "lenient_match")
    private boolean lenientMatch;

}
