Blame | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity;import javax.persistence.*;import java.time.LocalDateTime;import java.util.Objects;@Entity@Table(name = "fofo.model_reward_points")public class ModelRewardPoints {@Id@Column@GeneratedValue(strategy = GenerationType.IDENTITY)private Integer id;@Column(name = "catalog_id", nullable = false, unique = true)private Integer catalogId;@Column(name = "region_id", nullable = false)private Integer regionId;@Column(name = "points", nullable = false, precision = 4, scale = 2)private Double points;@Column(name = "created_at", nullable = false, updatable = false)private LocalDateTime createdAt = LocalDateTime.now();public Integer getId() { return id; }public void setId(Integer id) { this.id = id; }public Integer getCatalogId() { return catalogId; }public void setCatalogId(Integer catalogId) { this.catalogId = catalogId; }public Integer getRegionId() {return regionId;}public void setRegionId(Integer regionId) {this.regionId = regionId;}public Double getPoints() { return points; }public void setPoints(Double points) { this.points = points; }public LocalDateTime getCreatedAt() { return createdAt; }public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }@Overridepublic boolean equals(Object o) {if (!(o instanceof ModelRewardPoints)) return false;ModelRewardPoints that = (ModelRewardPoints) o;return Objects.equals(id, that.id) && Objects.equals(catalogId, that.catalogId) && Objects.equals(regionId, that.regionId) && Objects.equals(points, that.points) && Objects.equals(createdAt, that.createdAt);}@Overridepublic int hashCode() {return Objects.hash(id, catalogId, regionId, points, createdAt);}@Overridepublic String toString() {return "ModelRewardPoints{" +"id=" + id +", catalogId=" + catalogId +", regionId=" + regionId +", points=" + points +", createdAt=" + createdAt +'}';}}