package ru.kirillius.pf.sdn.entity;

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

import java.net.Inet4Address;
import java.time.Instant;

@Entity
@Table(name = "domain_cache_entry")
@Getter
@Setter
@NoArgsConstructor
@Builder
@AllArgsConstructor
public class DomainCacheEntry {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false)
    private String domain;

    @Column(nullable = false)
    private Instant lastUpdate;

    @Column(nullable = false)
    private Instant lastSeen;

    @Column(nullable = false)
    private Inet4Address address;
}
