package ai.decompile.analysis.model.entity;

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

@Entity
@Table(name = "static_string")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StaticString {
  @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 = 20)
  private String address;

  @Column(nullable = false, columnDefinition = "TEXT")
  private String value;

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

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