package org.xmx0632.deliciousfruit.entity;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* ReceiverInfo.
*/
@Entity
@Table(name = "tbl_receiver_info")
public class ReceiverInfo extends IdEntity {
public static int DEFAULT_TRUE = 1;
public static int DEFAULT_FALSE = 0;
private String receiver;
private String mobile;
private String telephone;
private String address;
private String province;
private String city;
private String district;
private String county;
private String area;
private String zipCode;
private String remark;
private int isDefault;
private UserAccount userAccount;
public ReceiverInfo() {
}
public ReceiverInfo(String receiver, String mobile, String telephone,
String address, String province, String city, String district) {
this.receiver = receiver;
this.mobile = mobile;
this.telephone = telephone;
this.address = address;
this.province = province;
this.city = city;
this.district = district;
}
public int getIsDefault() {
return isDefault;
}
public void setIsDefault(int isDefault) {
this.isDefault = isDefault;
}
@OneToOne(cascade = CascadeType.REMOVE)
@JoinColumn(name = "user_id")
public UserAccount getUserAccount() {
return userAccount;
}
public void setUserAccount(UserAccount userAccount) {
this.userAccount = userAccount;
}
@NotNull
public String getReceiver() {
return this.receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
public String getMobile() {
return this.mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getTelephone() {
return this.telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
@NotNull
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
@NotNull
public String getProvince() {
return this.province;
}
public void setProvince(String province) {
this.province = province;
}
@NotNull
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
@NotNull
public String getDistrict() {
return this.district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getCounty() {
return this.county;
}
public void setCounty(String county) {
this.county = county;
}
public String getArea() {
return this.area;
}
public void setArea(String area) {
this.area = area;
}
public String getZipCode() {
return this.zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}