| 35104 |
vikas |
1 |
package com.spice.profitmandi.dao.entity;
|
|
|
2 |
|
|
|
3 |
import javax.persistence.*;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
import java.util.Objects;
|
|
|
6 |
|
|
|
7 |
@Entity
|
|
|
8 |
@Table(name = "fofo.model_reward_points")
|
|
|
9 |
public class ModelRewardPoints {
|
|
|
10 |
|
|
|
11 |
@Id
|
|
|
12 |
@Column
|
|
|
13 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
14 |
private Integer id;
|
|
|
15 |
|
|
|
16 |
@Column(name = "catalog_id", nullable = false, unique = true)
|
|
|
17 |
private Integer catalogId;
|
|
|
18 |
|
|
|
19 |
@Column(name = "region_id", nullable = false)
|
|
|
20 |
private Integer regionId;
|
|
|
21 |
|
|
|
22 |
@Column(name = "points", nullable = false, precision = 4, scale = 2)
|
|
|
23 |
private Double points;
|
|
|
24 |
|
|
|
25 |
@Column(name = "created_at", nullable = false, updatable = false)
|
|
|
26 |
private LocalDateTime createdAt = LocalDateTime.now();
|
|
|
27 |
|
|
|
28 |
public Integer getId() { return id; }
|
|
|
29 |
public void setId(Integer id) { this.id = id; }
|
|
|
30 |
|
|
|
31 |
public Integer getCatalogId() { return catalogId; }
|
|
|
32 |
public void setCatalogId(Integer catalogId) { this.catalogId = catalogId; }
|
|
|
33 |
|
|
|
34 |
public Integer getRegionId() {
|
|
|
35 |
return regionId;
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
public void setRegionId(Integer regionId) {
|
|
|
39 |
this.regionId = regionId;
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
public Double getPoints() { return points; }
|
|
|
43 |
public void setPoints(Double points) { this.points = points; }
|
|
|
44 |
|
|
|
45 |
public LocalDateTime getCreatedAt() { return createdAt; }
|
|
|
46 |
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
|
|
47 |
|
|
|
48 |
@Override
|
|
|
49 |
public boolean equals(Object o) {
|
|
|
50 |
if (!(o instanceof ModelRewardPoints)) return false;
|
|
|
51 |
ModelRewardPoints that = (ModelRewardPoints) o;
|
|
|
52 |
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);
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
@Override
|
|
|
56 |
public int hashCode() {
|
|
|
57 |
return Objects.hash(id, catalogId, regionId, points, createdAt);
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
@Override
|
|
|
61 |
public String toString() {
|
|
|
62 |
return "ModelRewardPoints{" +
|
|
|
63 |
"id=" + id +
|
|
|
64 |
", catalogId=" + catalogId +
|
|
|
65 |
", regionId=" + regionId +
|
|
|
66 |
", points=" + points +
|
|
|
67 |
", createdAt=" + createdAt +
|
|
|
68 |
'}';
|
|
|
69 |
}
|
|
|
70 |
}
|