Subversion Repositories SmartDukaan

Rev

Rev 33717 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33715 ranu 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import javax.persistence.*;
4
import java.io.Serializable;
5
import java.time.LocalDateTime;
6
import java.util.Objects;
7
 
8
/**
9
 * @author amit
10
 */
11
@Entity
12
@Table(name = "fofo.upSaleOrder")
13
public class UpSaleOrder implements Serializable {
14
 
15
 
16
    private static final long serialVersionUID = 1L;
17
    @Id
18
    @Column(name = "id")
19
    @GeneratedValue(strategy = GenerationType.IDENTITY)
20
    private int id;
21
 
22
    @Column(name = "orderId")
23
    private int orderId;
24
 
25
    @Column(name = "create_timestamp")
26
    private LocalDateTime createdTimestamp = LocalDateTime.now();
27
 
28
    public int getId() {
29
        return id;
30
    }
31
 
32
    public void setId(int id) {
33
        this.id = id;
34
    }
35
 
36
    public int getOrderId() {
37
        return orderId;
38
    }
39
 
40
    public void setOrderId(int orderId) {
41
        this.orderId = orderId;
42
    }
43
 
44
    public LocalDateTime getCreatedTimestamp() {
45
        return createdTimestamp;
46
    }
47
 
48
    public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
49
        this.createdTimestamp = createdTimestamp;
50
    }
51
 
52
    @Override
53
    public String toString() {
54
        return "UpSaleOrder{" +
55
                "id=" + id +
56
                ", orderId=" + orderId +
57
                ", createdTimestamp=" + createdTimestamp +
58
                '}';
59
    }
60
 
61
    @Override
62
    public boolean equals(Object o) {
63
        if (this == o) return true;
64
        if (o == null || getClass() != o.getClass()) return false;
65
        UpSaleOrder that = (UpSaleOrder) o;
66
        return id == that.id && orderId == that.orderId && Objects.equals(createdTimestamp, that.createdTimestamp);
67
    }
68
 
69
    @Override
70
    public int hashCode() {
71
        return Objects.hash(id, orderId, createdTimestamp);
72
    }
73
}