package com.muchinfo.mtp3pojos.vo.query.position;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.muchinfo.mtp3pojos.exportconverter.BuyOrSellConverter;
import com.muchinfo.mtp3pojos.exportconverter.ExpireTypeConverter;
import com.muchinfo.mtp3pojos.exportconverter.OptionTypeConverter;
import com.muchinfo.mtp3pojos.exportconverter.TradeTypeConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "PositionSheetExportQQResult对象", description = "持仓单导出 -- 期权")
public class PositionSheetExportQQResult {
    @ExcelProperty("成交单号")
    @ColumnWidth(30)
    @ApiModelProperty(value = "成交单号")
    private String tradeid;

    @ExcelProperty("交易日")
    @ColumnWidth(20)
    @ApiModelProperty(value = "交易日")
    private String tradedate;

    @ExcelProperty("账户")
    @ColumnWidth(20)
    @ApiModelProperty(value = "账户")
    private String accountNameId;

    @ExcelProperty("商品代码/名称")
    @ColumnWidth(20)
    @ApiModelProperty(value = "商品代码/名称")
    private String goodsCodeName;

    @ExcelProperty(value = "期权类型", converter = OptionTypeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "期权类型 trademode = 18、26")
    private Integer optiontype;

    @ExcelProperty(value = "方向", converter = BuyOrSellConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "方向")
    private Integer buyorsell;

    @ExcelProperty("行权价")
    @ColumnWidth(20)
    @ApiModelProperty(value = "行权价")
    private BigDecimal openprice;

    @ExcelProperty("定货金")
    @ColumnWidth(20)
    @ApiModelProperty(value = "定货金 trademode = 18、26")
    private BigDecimal premium;

    @ExcelProperty("实时盈亏")
    @ColumnWidth(20)
    @ApiModelProperty(value = "实时盈亏 trademode = 18、26")
    private BigDecimal realTimeYpl;

    @ExcelProperty("实际盈亏")
    @ColumnWidth(20)
    @ApiModelProperty(value = "实际盈亏 trademode = 18、26 / 浮动损益 ishis = 1 ")
    private BigDecimal actuallYpl;

    @ExcelProperty("持仓数量")
    @ColumnWidth(20)
    @ApiModelProperty(value = "持仓数量")
    private Integer holderqty;

    @ExcelProperty("定货金总额")
    @ColumnWidth(20)
    @ApiModelProperty(value = "定货金总额 trademode = 18、26")
    private BigDecimal premiumAmount;

    @ExcelProperty("持仓金额")
    @ColumnWidth(20)
    @ApiModelProperty(value = "持仓金额")
    private BigDecimal holderamount;

    @ExcelProperty("T+N")
    @ColumnWidth(20)
    @ApiModelProperty(value = "T+N")
    private Integer holderdays;

    @ExcelProperty("行权日")
    @ColumnWidth(20)
    @ApiModelProperty(value = "行权日  trademode = 18、26")
    private Date expiredate;

    @ExcelProperty("交易时间")
    @ColumnWidth(20)
    @ApiModelProperty(value = "交易时间")
    private Date tradetime;

    @ExcelProperty(value = "账户类型", converter = TradeTypeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "账户类型")
    private Integer usertype;

    @ExcelProperty("所属会员")
    @ColumnWidth(20)
    @ApiModelProperty(value = "所属会员")
    private String memberusername;

    @ExcelProperty("所属营销中心")
    @ColumnWidth(20)
    @ApiModelProperty(value = "所属上级/所属营销中心 trademode = 18、26")
    private String parentusername;

    @ExcelProperty("市场")
    @ColumnWidth(20)
    @ApiModelProperty(value = "市场")
    private String marketname;

    @ExcelProperty(value = "行权日类型", converter = ExpireTypeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "行权日类型 trademode = 18、26")
    private Integer expiretype;
}
