Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
21545 ashik.ali 1
package com.spice.profitmandi.dao.entity;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Basic;
7
import javax.persistence.Column;
8
import javax.persistence.Entity;
9
import javax.persistence.EnumType;
10
import javax.persistence.Enumerated;
11
import javax.persistence.GeneratedValue;
12
import javax.persistence.GenerationType;
13
import javax.persistence.Id;
14
import javax.persistence.Table;
15
import javax.persistence.Version;
16
 
17
import com.spice.profitmandi.dao.enumuration.Gender;
18
import com.spice.profitmandi.dao.enumuration.SocialType;
19
 
20
/**
21
 * This class basically contains social user details
22
 * 
23
 * @author ashikali
24
 *
25
 */
26
@Entity
27
@Table(name="social_user", schema = "dtr")
28
 
29
public class SocialUser implements Serializable{
30
 
31
	private static final long serialVersionUID = 1L;
32
 
33
	public SocialUser() {
34
	}
35
 
36
	@Id
37
	@Column(name="id", unique=true, updatable=false)
38
	@GeneratedValue(strategy = GenerationType.IDENTITY)
39
	private int id;
40
 
41
	@Column(name = "name")
42
	private String name;
43
 
44
	@Column(name = "email_id", unique = true)
45
	private String emailId;
46
 
47
	@Column(name = "gender")
48
	@Enumerated(EnumType.STRING)
49
	private Gender gender;
50
 
51
	@Column(name="type")
52
    @Enumerated(EnumType.STRING)
53
    private SocialType type;
54
 
55
	@Column(name="create_timestamp", updatable = false)
56
	private LocalDateTime createTimestamp = LocalDateTime.now();
57
 
58
	@Column(name="update_timestamp")
59
	private LocalDateTime updateTimestamp = LocalDateTime.now();
60
 
61
	public int getId() {
62
		return id;
63
	}
64
	public void setId(int id) {
65
		this.id = id;
66
	}
67
 
68
	public String getName() {
69
		return name;
70
	}
71
	public void setName(String name) {
72
		this.name = name;
73
	}
74
	public String getEmailId() {
75
		return emailId;
76
	}
77
	public void setEmailId(String emailId) {
78
		this.emailId = emailId;
79
	}
80
 
81
	public SocialType getType() {
82
		return type;
83
	}
84
	public void setType(SocialType type) {
85
		this.type = type;
86
	}
87
 
88
	public void setGender(Gender gender) {
89
		this.gender = gender;
90
	}
91
	public Gender getGender() {
92
		return gender;
93
	}
94
 
95
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
96
		this.createTimestamp = createTimestamp;
97
	}
98
    public LocalDateTime getCreateTimestamp() {
99
		return createTimestamp;
100
	}
101
    public LocalDateTime getUpdateTimestamp() {
102
		return updateTimestamp;
103
	}
104
    public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
105
		this.updateTimestamp = updateTimestamp;
106
	}
107
	@Override
108
	public String toString() {
109
		return "SocialUser [id=" + id + ", name=" + name + ", emailId=" + emailId + ", type=" + type
21693 ashik.ali 110
				+ ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";
21545 ashik.ali 111
	}
112
 
113
 
114
 
115
}