content: package com.example.biz;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  import javax.validation.constraints.NotNull;
  import javax.validation.constraints.Size;
  import java.util.Objects;
  
  @Entity
  public class Company {
  
      @Id
      @GeneratedValue
      private Long id;
  
      @NotNull
      @Size(min = 1)
      private String name;
  
      @NotNull
      @Size(min = 1)
      private String twitterUsername;
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (o == null || getClass() != o.getClass()) return false;
          Company company = (Company) o;
          return Objects.equals(id, company.id);
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(id);
      }
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getTwitterUsername() {
          return twitterUsername;
      }
  
      public void setTwitterUsername(String twitterUsername) {
          this.twitterUsername = twitterUsername;
      }
  
  }
  