All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cardanofoundation.explorer.consumercommon.entity.SchemaVersion Maven / Gradle / Ivy

package org.cardanofoundation.explorer.consumercommon.entity;

import java.util.Objects;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.hibernate.Hibernate;

@Entity
@Table(name = "schema_version")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class SchemaVersion extends BaseEntity {

  @Column(name = "stage_one", nullable = false)
  private Long stageOne;

  @Column(name = "stage_two", nullable = false)
  private Long stageTwo;

  @Column(name = "stage_three", nullable = false)
  private Long stageThree;

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) {
      return false;
    }
    SchemaVersion that = (SchemaVersion) o;
    return id != null && Objects.equals(id, that.id);
  }

  @Override
  public int hashCode() {
    return getClass().hashCode();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy