package com.cardpaymentsystem.cardplatform.models; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; import java.math.BigDecimal; import java.sql.Date; import java.util.Objects; @Entity @Table(name = "business", schema = "cardplatform", catalog = "") public class BusinessEntity { @JsonIgnore private int businessId; private String businessName; private String imageLink; private String businessEmail; private int nbCustomers; private Date dateCreated; @JsonIgnore private boolean enabled; @JsonIgnore private String password; @JsonIgnore private String roles; private String businessTitle; private String link; private String description; @JsonIgnore private String oldEmailBackup; private BigDecimal shopLat; private BigDecimal shopLong; @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name = "business_id") public int getBusinessId() { return businessId; } public void setBusinessId(int businessId) { this.businessId = businessId; } @Basic @Column(name = "business_name") public String getBusinessName() { return businessName; } public void setBusinessName(String businessName) { this.businessName = businessName; } @Basic @Column(name = "shop_lat") public BigDecimal getShopLat() { return shopLat; } public void setShopLat(BigDecimal shopLat) { this.shopLat = shopLat; } @Basic @Column(name = "shop_long") public BigDecimal getShopLong() { return shopLong; } public void setShopLong(BigDecimal shopLong) { this.shopLong = shopLong; } @Basic @Column(name = "image_link") public String getImageLink() { return imageLink; } public void setImageLink(String imageLink) { this.imageLink = imageLink; } @Basic @Column(name = "old_email_backup") public String getOldEmailBackup() { return oldEmailBackup; } public void setOldEmailBackup(String oldEmailBackup) { this.oldEmailBackup = oldEmailBackup; } @Basic @Column(name = "business_email") public String getBusinessEmail() { return businessEmail; } public void setBusinessEmail(String businessEmail) { this.businessEmail = businessEmail; } @Basic @Column(name = "nb_customers") public int getNbCustomers() { return nbCustomers; } public void setNbCustomers(int nbCustomers) { this.nbCustomers = nbCustomers; } @Basic @Column(name = "date_created") public Date getDateCreated() { return dateCreated; } public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; } @Basic @Column(name = "enabled") public boolean getEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BusinessEntity that = (BusinessEntity) o; return businessId == that.businessId && nbCustomers == that.nbCustomers && enabled == that.enabled && Objects.equals(businessName, that.businessName) && Objects.equals(businessEmail, that.businessEmail) && Objects.equals(dateCreated, that.dateCreated); } @Override public int hashCode() { return Objects.hash(businessId, businessName, businessEmail, nbCustomers, dateCreated, enabled); } @Basic @Column(name = "password") public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Basic @Column(name = "roles") public String getRoles() { return roles; } public void setRoles(String roles) { this.roles = roles; } @Basic @Column(name = "business_title") public String getBusinessTitle() { return businessTitle; } public void setBusinessTitle(String businessTitle) { this.businessTitle = businessTitle; } @Basic @Column(name = "link") public String getLink() { return link; } public void setLink(String link) { this.link = link; } @Basic @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }