package com.xcong.excoin.modules.contract.entity;
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.xcong.excoin.common.entity.BaseEntity;
|
import com.xcong.excoin.common.utils.BigDecimalSerialize;
|
import lombok.Data;
|
|
import java.math.BigDecimal;
|
|
/**
|
* 合约持仓订单表
|
*
|
* @author wzy
|
* @date 2020-05-27
|
**/
|
@Data
|
@TableName("contract_hold_order")
|
public class ContractHoldOrderEntity extends BaseEntity {
|
|
/**
|
* 是否可平仓 1-是
|
*/
|
public static final int ORDER_CAN_CLOSING_Y = 1;
|
/**
|
* 是否可平仓 0-否
|
*/
|
public static final int ORDER_CAN_CLOSING_N = 0;
|
|
/**
|
* 开多
|
*/
|
public static final int OPENING_TYPE_MORE = 1;
|
|
/**
|
* 开空
|
*/
|
public static final int OPENING_TYPE_LESS = 2;
|
|
/**
|
* 交易类型 市价
|
*/
|
public static final int TRADE_TYPE_MARK = 1;
|
|
/**
|
* 交易类型 限价
|
*/
|
public static final int TRADE_TYPE_LIMIT = 2;
|
|
/**
|
* 会员Id
|
*/
|
private Long memberId;
|
|
/**
|
* 订单编号
|
*/
|
private String orderNo;
|
|
/**
|
* 仓位类型 1-逐仓 2-全仓
|
*/
|
private int positionType;
|
|
/**
|
* 交易类型 1-市价 2-限价
|
*/
|
private int tradeType;
|
|
/**
|
* 币种
|
*/
|
private String symbol;
|
|
/**
|
* 手数
|
*/
|
private int symbolCnt;
|
|
/**
|
* 可平张数(仅全仓模式)
|
*/
|
private int symbolCntSale;
|
|
/**
|
* 币种规格
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal symbolSku;
|
|
/**
|
* 开仓价
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal openingPrice;
|
|
/**
|
* 开仓类型 1-开多 2-开空
|
*/
|
private int openingType;
|
|
/**
|
* 开仓手续费
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal openingFeeAmount;
|
|
/**
|
* 保证金
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal bondAmount;
|
|
/**
|
* 杠杆倍率
|
*/
|
private int leverRatio;
|
|
/**
|
* 市场价
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal markPrice;
|
|
/**
|
* 止损价
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal stopLossPrice;
|
|
/**
|
* 止盈价
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal stopProfitPrice;
|
|
/**
|
* 预付款金额
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal prePaymentAmount;
|
|
/**
|
* 预估强平价
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal forceClosingPrice;
|
|
private int operateNo;
|
|
/**
|
* 是否可平仓 0-否 1-是
|
*/
|
private int isCanClosing;
|
|
/**
|
* 批次号 队列平仓时使用,避免重复
|
*/
|
public String batchNo;
|
|
/**
|
* 持仓费
|
*/
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal holdAmount;
|
|
private String inviteId;
|
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal loseOrProfit;
|
|
@JsonSerialize(using = BigDecimalSerialize.class)
|
private BigDecimal returnRatio;
|
|
private int isProfit;
|
|
@TableField(exist = false)
|
private String timeType;
|
@TableField(exist = false)
|
private String openType;
|
}
|