Subversion Repositories SmartDukaan

Rev

Rev 21710 | Rev 21895 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21714 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
21710 ashik.ali 2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.GeneratedValue;
9
import javax.persistence.GenerationType;
10
import javax.persistence.Id;
11
import javax.persistence.Table;
12
import javax.persistence.UniqueConstraint;
13
 
14
/**
15
 * This class basically contains address details
16
 * 
17
 * @author ashikali
18
 *
19
 */
20
@Entity
21
@Table(name="user.address", schema = "user", uniqueConstraints = {@UniqueConstraint(columnNames = {"name", "line_1", "line_2", "landmark", "city", "state", "pin", "country", "phone"})})
22
public class CustomerAddress implements Serializable{
23
 
24
	private static final long serialVersionUID = 1L;
25
 
26
	public CustomerAddress() {
27
	}
28
 
29
	@Id
30
	@Column(name="id", unique=true, updatable=false)
31
	@GeneratedValue(strategy = GenerationType.IDENTITY)
32
	private int id;
33
 
34
	@Column(name="name")
35
	private String name;
36
 
37
	@Column(name = "line_1")
38
	private String line1;
39
 
40
	@Column(name = "line_2")
41
	private String line2;
42
 
43
	@Column(name = "landmark")
44
	private String landmark;
45
 
46
	@Column(name = "city")
47
	private String city;
48
 
49
	@Column(name = "state")
50
	private String state;
51
 
52
	@Column(name = "pin", length = 10)
53
	private String pinCode;
54
 
55
	@Column(name = "country", length = 100)
56
	private String country;
57
 
58
	@Column(name = "phone", length = 20)
59
	private String phoneNumber;
60
 
61
	@Column(name = "customer_id")
62
	private int customerId;
63
 
64
	@Column(name="create_timestamp", updatable = false)
65
	private LocalDateTime createTimestamp = LocalDateTime.now();
66
 
67
	@Column(name="update_timestamp")
68
	private LocalDateTime updateTimestamp = LocalDateTime.now();
69
 
70
	public int getId() {
71
		return id;
72
	}
73
	public void setId(int id) {
74
		this.id = id;
75
	}
76
	public void setName(String name) {
77
        this.name = name;
78
    }
79
    public String getName() {
80
        return name;
81
    }
82
    public void setLine1(String line1) {
83
		this.line1 = line1;
84
	}
85
    public String getLine1() {
86
		return line1;
87
	}
88
    public void setLine2(String line2) {
89
		this.line2 = line2;
90
	}
91
    public String getLine2() {
92
		return line2;
93
	}
94
    public void setLandmark(String landmark) {
95
		this.landmark = landmark;
96
	}
97
    public String getLandmark() {
98
		return landmark;
99
	}
100
    public void setCity(String city) {
101
		this.city = city;
102
	}
103
    public String getCity() {
104
		return city;
105
	}
106
    public void setPinCode(String pinCode) {
107
		this.pinCode = pinCode;
108
	}
109
    public String getPinCode() {
110
		return pinCode;
111
	}
112
    public void setState(String state) {
113
		this.state = state;
114
	}
115
    public String getState() {
116
		return state;
117
	}
118
    public void setCountry(String country) {
119
		this.country = country;
120
	}
121
    public String getCountry() {
122
		return country;
123
	}
124
    public void setPhoneNumber(String phoneNumber) {
125
		this.phoneNumber = phoneNumber;
126
	}
127
    public String getPhoneNumber() {
128
		return phoneNumber;
129
	}
130
 
131
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
132
		this.createTimestamp = createTimestamp;
133
	}
134
    public LocalDateTime getCreateTimestamp() {
135
		return createTimestamp;
136
	}
137
 
138
    public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
139
		this.updateTimestamp = updateTimestamp;
140
	}
141
    public LocalDateTime getUpdateTimestamp() {
142
		return updateTimestamp;
143
	}
144
 
145
    public int getCustomerId() {
146
		return customerId;
147
	}
148
    public void setCustomerId(int customerId) {
149
		this.customerId = customerId;
150
	}
151
	@Override
152
	public String toString() {
153
		return "CustomerAddress [id=" + id + ", name=" + name + ", line1=" + line1 + ", line2=" + line2 + ", landmark="
154
				+ landmark + ", city=" + city + ", state=" + state + ", pinCode=" + pinCode + ", country=" + country
155
				+ ", phoneNumber=" + phoneNumber + ", customerId=" + customerId + ", createTimestamp=" + createTimestamp
156
				+ ", updateTimestamp=" + updateTimestamp + "]";
157
	}
158
 
159
 
160
 
161
}