package ai.decompile.analysis.model.entity;

import jakarta.persistence.*;
import java.util.UUID;
import lombok.*;

@Entity
@Table(name = "static_data_label")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StaticDataLabel {
  @Id
  @GeneratedValue(strategy = GenerationType.UUID)
  private UUID id;

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "analysis_id", nullable = false)
  private StaticAnalysis analysis;

  @Column(nullable = false, length = 500)
  private String name;

  @Column(nullable = false, length = 20)
  private String address;

  @Column(nullable = false, length = 100)
  private String segment;

  @Column(nullable = false)
  @Builder.Default
  private int size = 0;

  @Column(name = "data_xrefs", nullable = false, columnDefinition = "TEXT DEFAULT ''")
  @Builder.Default
  private String dataXrefs = "";
}
