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 BaseBalanceLog<M extends BaseBalanceLog<M>> extends Model<M> implements IBean {
	/**
	 * 资金记录的id
	 */
	public void setId(java.lang.Long id) {
		set("id", id);
	}
	
	/**
	 * 资金记录的id
	 */
	public java.lang.Long getId() {
		return getLong("id");
	}
	/**
	 * 资金变化的user,-1代表未找到的user
	 */
	public void setUserId(java.lang.Long userId) {
		set("user_id", userId);
	}
	
	/**
	 * 资金变化的user,-1代表未找到的user
	 */
	public java.lang.Long getUserId() {
		return getLong("user_id");
	}
	/**
	 * 资金变化数量，负数是扣减
	 */
	public void setAmount(java.lang.Integer amount) {
		set("amount", amount);
	}
	
	/**
	 * 资金变化数量，负数是扣减
	 */
	public java.lang.Integer getAmount() {
		return getInt("amount");
	}
	/**
	 * 资金变化记录描述
	 */
	public void setDescription(java.lang.String description) {
		set("description", description);
	}
	
	/**
	 * 资金变化记录描述
	 */
	public java.lang.String getDescription() {
		return getStr("description");
	}
	/**
	 * 资金变化记录创建时间
	 */
	public void setCreateTime(java.lang.Long createTime) {
		set("create_time", createTime);
	}
	
	/**
	 * 资金变化记录创建时间
	 */
	public java.lang.Long getCreateTime() {
		return getLong("create_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();
	}
}