package cn.muchinfo.rma.global.data

import cn.muchinfo.rma.global.GlobalDataCollection

class AccountShowData {
    var exchange_rate //汇率
            : String? = null
    var net_worth //净值
            : String? = null
    var available_funds //可用资金
            : String? = null
    var close_profit_and_loss = "0" //平仓浮动盈亏  3.75
    var keep_profit_and_loss = "0" //持仓浮动盈亏
    var close_watch_profit_and_loss = "0" //平仓盯市盈亏  7.5

    /**
     * 期货的浮动盈亏需要*汇率
     * @return
     */
    var keep_watch_profit_and_loss = "0" //持仓盯市盈亏
    var margin_occupancy = "0" //保证金占用
    var commission = "0" //手续费
    var freezing_margin = "0" //冻结保证金
    var freezing_commission = "0" //冻结手续费
    var freezing = "0" //冻结资金
    var in_money //入金
            : String? = null
    private var out_money //出金
            : String? = null
    var take_precedence //优先资金
            : String? = null
    var back_precedence //劣后资金
            : String? = null
    var risk_degree // 风险度
            : String? = null

    fun getOut_money(): String {
        if (out_money == null || out_money == "" || "null" == out_money) {
            out_money = "0"
        }
        return out_money!!
    }

    val out_money1: Double
        get() {
            if (out_money == null || out_money == "" || "null" == out_money) {
                out_money = "0"
            }
            return Math.abs(out_money!!.toDouble())
        }

    fun setOut_money(out_money: String?) {
        this.out_money = out_money
    }


}