package ru.soune.nocopy.entity.docviewer;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

@Table(name = "dock_view")
@RequiredArgsConstructor
@AllArgsConstructor
@Entity
@Setter @Getter
public class DockView {

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

    @Column(name = "viewer_id")
    private Long viewerId;

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

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

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

    @Column(name = "created_at",updatable = false)
    private LocalDateTime createdAt = LocalDateTime.now();
}
