content: package dev.agitrubard.contact.model.entity;
  
  import jakarta.persistence.CascadeType;
  import jakarta.persistence.Column;
  import jakarta.persistence.Entity;
  import jakarta.persistence.GeneratedValue;
  import jakarta.persistence.GenerationType;
  import jakarta.persistence.Id;
  import jakarta.persistence.OneToMany;
  import jakarta.persistence.Table;
  import lombok.EqualsAndHashCode;
  import lombok.Getter;
  import lombok.Setter;
  
  import java.util.ArrayList;
  import java.util.List;
  import java.util.UUID;
  
  @Entity
  @Getter
  @Setter
  @EqualsAndHashCode(callSuper = true)
  @Table(name = "ca_person")
  public class PersonEntity extends AbstractEntity {
  
      @Id
      @Column(name = "id")
      @GeneratedValue(strategy = GenerationType.UUID)
      private UUID id;
  
      @Column(name = "first_name")
      private String firstName;
  
      @Column(name = "last_name")
      private String lastName;
  
      @Column(name = "company")
      private String company;
  
  
      @OneToMany(mappedBy = "person", orphanRemoval = true, cascade = CascadeType.ALL)
      private List<PersonContactEntity> contacts = new ArrayList<>();
  
  }
  