package common.model.base;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.IBean;

/**
 * Generated by JFinal, do not modify this file.
 */
@SuppressWarnings("serial")
public abstract class BaseAddress<M extends BaseAddress<M>> extends Model<M> implements IBean {
	/**
	 * 地址id
	 */
	public void setId(java.lang.Integer id) {
		set("id", id);
	}
	
	/**
	 * 地址id
	 */
	public java.lang.Integer getId() {
		return getInt("id");
	}
	/**
	 * 所属user
	 */
	public void setUserId(java.lang.Integer userId) {
		set("user_id", userId);
	}
	
	/**
	 * 所属user
	 */
	public java.lang.Integer getUserId() {
		return getInt("user_id");
	}
	/**
	 * 收货人姓名
	 */
	public void setRecipientName(java.lang.String recipientName) {
		set("recipient_name", recipientName);
	}
	
	/**
	 * 收货人姓名
	 */
	public java.lang.String getRecipientName() {
		return getStr("recipient_name");
	}
	/**
	 * 收货人手机号
	 */
	public void setPhoneNumber(java.lang.String phoneNumber) {
		set("phone_number", phoneNumber);
	}
	
	/**
	 * 收货人手机号
	 */
	public java.lang.String getPhoneNumber() {
		return getStr("phone_number");
	}
	/**
	 * 详细地址
	 */
	public void setDetailedAddress(java.lang.String detailedAddress) {
		set("detailed_address", detailedAddress);
	}
	
	/**
	 * 详细地址
	 */
	public java.lang.String getDetailedAddress() {
		return getStr("detailed_address");
	}
	/**
	 * 是否为默认地址 0:否 1:是
	 */
	public void setIsDefault(java.lang.Integer isDefault) {
		set("is_default", isDefault);
	}
	
	/**
	 * 是否为默认地址 0:否 1:是
	 */
	public java.lang.Integer getIsDefault() {
		return getInt("is_default");
	}
	public void setCreateTime(java.lang.Long createTime) {
		set("create_time", createTime);
	}
	
	public java.lang.Long getCreateTime() {
		return getLong("create_time");
	}
	public void setUpdateTime(java.lang.Long updateTime) {
		set("update_time", updateTime);
	}
	
	public java.lang.Long getUpdateTime() {
		return getLong("update_time");
	}
	public void setIsDeleted(java.lang.Integer isDeleted) {
		set("is_deleted", isDeleted);
	}
	
	public java.lang.Integer getIsDeleted() {
		return getInt("is_deleted");
	}
	
	public boolean save() {
		set("create_time", System.currentTimeMillis());
		
		return super.save();
	}
	
	public boolean update() {
		set("update_time", System.currentTimeMillis());
		
		return super.update();
	}

	public boolean delete() {
		set("is_deleted", 1);

		return super.update();
	}
}