package com.ssj.bean.sys.wallet.domain;

import org.springframework.format.annotation.DateTimeFormat;

import com.ssj.bean.common.framework.core.domain.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Mount Liu
 * @date 2018/11/19
 */
@Entity
@Table(name = "ssj_wallet_record")
public class WalletRecord extends BaseEntity {
	private static final long serialVersionUID = 1L;
	private Date createTime;
    private String userId;
    /**
     * 操作方式（1：充值，2：提现，3：退款，4：使用）
     */
    private Integer flowType;
    /**
     * 操作子方式-
     * folw_type为1（1：微信支付，2：支付宝）；folw_type为2（1：银行卡）；
     * folw_type为3（1：一对一，2：小课，3：其他）；folw_type为4（1：一对一，2：小课，3：会员续费，4：其他）；
     */
    private Integer flowChildType;
    /**
     * 变动金额 增+ 减-
     */
    private BigDecimal changeMoney;
    /**
     * 变动后的金额
     */
    private BigDecimal money;
    /**
     * 银行提现手续费
     */
    private BigDecimal serviceFee;
    /**
     * 备注
     */
    private String remark;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Column(updatable=false)
    public Date getCreateTime() {
        return createTime;
    }

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

    @Basic
    @Column(name = "user_id")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "flow_type")
    public Integer getFlowType() {
        return flowType;
    }

    public void setFlowType(Integer flowType) {
        this.flowType = flowType;
    }

    @Basic
    @Column(name = "flow_child_type")
    public Integer getFlowChildType() {
        return flowChildType;
    }

    public void setFlowChildType(Integer flowChildType) {
        this.flowChildType = flowChildType;
    }

    @Basic
    @Column(name = "change_money")
    public BigDecimal getChangeMoney() {
        return changeMoney;
    }

    public void setChangeMoney(BigDecimal changeMoney) {
        this.changeMoney = changeMoney;
    }

    @Basic
    @Column(name = "money")
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Basic
    @Column(name = "service_fee")
    public BigDecimal getServiceFee() {
        return serviceFee;
    }

    public void setServiceFee(BigDecimal serviceFee) {
        this.serviceFee = serviceFee;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

}
