Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
32252 amit.gupta 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import javax.persistence.*;
4
import java.time.LocalDateTime;
5
import java.util.Objects;
6
 
7
 
8
@Entity
9
@Table(name = "dtr.optin")
10
public class Optin {
11
    /**
12
     *
13
     */
14
    @Id
15
    @GeneratedValue(strategy = GenerationType.IDENTITY)
16
    private int id;
17
 
18
    @Column(length = 10)
19
    private String mobile;
20
 
21
    @Column
22
    private LocalDateTime created;
23
 
24
    @Override
25
    public String toString() {
26
        return "Optin{" +
27
                "id=" + id +
28
                ", mobile='" + mobile + '\'' +
29
                ", created=" + created +
30
                '}';
31
    }
32
 
33
    @Override
34
    public boolean equals(Object o) {
35
        if (this == o) return true;
36
        if (o == null || getClass() != o.getClass()) return false;
37
        Optin optin = (Optin) o;
38
        return id == optin.id && Objects.equals(mobile, optin.mobile) && Objects.equals(created, optin.created);
39
    }
40
 
41
    @Override
42
    public int hashCode() {
43
        return Objects.hash(id, mobile, created);
44
    }
45
 
46
    public int getId() {
47
        return id;
48
    }
49
 
50
    public void setId(int id) {
51
        this.id = id;
52
    }
53
 
54
    public String getMobile() {
55
        return mobile;
56
    }
57
 
58
    public void setMobile(String mobile) {
59
        this.mobile = mobile;
60
    }
61
 
62
    public LocalDateTime getCreated() {
63
        return created;
64
    }
65
 
66
    public void setCreated(LocalDateTime created) {
67
        this.created = created;
68
    }
69
}
70