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 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 = "PositionSheetResultDetail对象", description = "持仓单导出")
public class PositionSheetExportResult {

    @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 = BuyOrSellConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "方向")
    private Integer buyorsell;

    @ExcelProperty("订立数量")
    @ColumnWidth(20)
    @ApiModelProperty(value = "订立数量")
    private Integer openqty;

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

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

    @ExcelProperty("持仓价格")
    @ColumnWidth(20)
    @ApiModelProperty(value = "持仓价格")
    private BigDecimal holderprice;

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

    @ExcelProperty("浮动损益")
    @ColumnWidth(20)
    @ApiModelProperty(value = "浮动损益")
    private BigDecimal actuallYplS;

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

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

    @ExcelProperty("账户类型")
    @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;
}
