package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户现金账户
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
@TableName("sys_user_cash_account")
public class SysUserCashAccount extends Model<SysUserCashAccount> {

    private static final long serialVersionUID = 1L;

    /**
     * 账户号码(用户编号)
     */
    @TableId("user_id_")
    private Integer userId;
    /**
     * 币种
     */
    @TableField("currency_")
    private String currency;
    /**
     * 账户可用余额
     */
    @TableField("balance_")
    private BigDecimal balance;
    /**
     * 冻结金额
     */
    @TableField("frozen_amount_")
    private BigDecimal frozenAmount;
    /**
     * 保证金余额
     */
    @TableField("margin_balance_")
    private BigDecimal marginBalance;
    /**
     * 账户状态(0,冻结,1,正常;-1,注销;)
     */
    @TableField("status_")
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_time_")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;


    public Integer getUserId() {
        return userId;
    }

    public SysUserCashAccount setUserId(Integer userId) {
        this.userId = userId;
        return this;
    }

    public String getCurrency() {
        return currency;
    }

    public SysUserCashAccount setCurrency(String currency) {
        this.currency = currency;
        return this;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public SysUserCashAccount setBalance(BigDecimal balance) {
        this.balance = balance;
        return this;
    }

    public BigDecimal getFrozenAmount() {
        return frozenAmount;
    }

    public SysUserCashAccount setFrozenAmount(BigDecimal frozenAmount) {
        this.frozenAmount = frozenAmount;
        return this;
    }

    public BigDecimal getMarginBalance() {
        return marginBalance;
    }

    public SysUserCashAccount setMarginBalance(BigDecimal marginBalance) {
        this.marginBalance = marginBalance;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public SysUserCashAccount setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public SysUserCashAccount setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public SysUserCashAccount setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

    @Override
    public String toString() {
        return "SysUserCashAccount{" +
        ", userId=" + userId +
        ", currency=" + currency +
        ", balance=" + balance +
        ", frozenAmount=" + frozenAmount +
        ", marginBalance=" + marginBalance +
        ", status=" + status +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
