using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//----------------------------------------------------------------
//Module Name: $safeprojectname$
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime 2016/6/17 16:42:21
//Author
//Description Create
//----------------------------------------------------------------
namespace Muchinfo.MTPClient.Data.Model.Account
{
public class PrePostDetail
{
///
/// 预埋单号
///
[PropertyDisc("PreOrderId")]
public long PreOrderId { get; set; }
///
/// 商品ID
///
[PropertyDisc("GoodsId")]
public long GoodsId { get; set; }
///
/// 下单类型
///
[PropertyDisc("BuildType")]
public OpenCloseMode BuildType { get; set; }
///
/// 取价方式
///
[PropertyDisc("PRICEMODE")]
public ePriceMode PRICEMODE { get; set; }
///
/// 取价方式显示中文
///
public string PRICEMODEDisplay
{
get
{
return PRICEMODE.Discription();
}
}
///
/// 触发价格类型
///
[PropertyDisc("TriggerType")]
public eTriggerType TriggerType { get; set; }
///
/// 触发价格
///
[PropertyDisc("TriggerPrice")]
public decimal TriggerPrice { get; set; }
///
/// 止盈价格
///
[PropertyDisc("SpPrice")]
public decimal SpPrice { get; set; }
///
/// 止损价格
///
[PropertyDisc("SlPrice")]
public decimal SlPrice { get; set; }
///
/// 买卖方向
///
[PropertyDisc("BuyOrSell")]
public Direction BuyOrSell { get; set; }
///
/// 允许成交偏差范围
///
[PropertyDisc("AllowTradeSub")]
public long AllowTradeSub { get; set; }
///
/// 有效类型
///
[PropertyDisc("ValidType")]
public ExpirationType ValidType { get; set; }
///
/// 有效时间
///
[PropertyDisc("ValidTime")]
public DateTime ValidTime { get; set; }
///
/// 操作类型
///
[PropertyDisc("OperateType")]
public eOrderOperateType OperateType { get; set; }
///
/// 操作员账号ID
///
[PropertyDisc("OperatorId")]
public long OperatorId { get; set; }
///
/// 预埋单状态
///
[PropertyDisc("OrderStatus")]
public PrepostStatus OrderStatus { get; set; }
///
/// 商品编号
///
[PropertyDisc("goodscode")]
public string goodscode { get; set; }
///
/// 商品名称
///
[PropertyDisc("goodsname")]
public string goodsname { get; set; }
///
/// 备注
///
[PropertyDisc("Remark")]
public string Remark { get; set; }
///
/// 委托价格
///
[PropertyDisc("orderprice")]
public decimal orderprice { get; set; }
///
/// 委托价格-转换控制
///
public string orderpriceDisplay
{
get
{
if (BuildType != OpenCloseMode.BUILDTYPE_CLOSE && PRICEMODE != ePriceMode.PRICEMODE_MARKET)
{
return orderprice.ToString();
}
else
{
return "-";
}
}
}
///
/// 竞价委托价格-转换控制
///
public string Bid_OrderpriceDisplay
{
get
{
if (PRICEMODE!=ePriceMode.PRICEMODE_MARKET)
{
return orderprice.ToString();
}
else
{
return "-";
}
}
}
///
/// 委托数量
///
[PropertyDisc("orderqty")]
public decimal orderqty { get; set; }
///
/// 委托时间
///
[PropertyDisc("ClientOrderTime")]
public DateTime ClientOrderTime { get; set; }
public string OrderStatusStr
{
get
{
return OrderStatus.Discription();
}
}
public string BuildTypeStr
{
get { return BuildType.Discription(); }
}
public string TriggerTypeStr
{
get { return TriggerType.Discription(); }
}
public string TriggerPriceDisplay
{
get
{
return TriggerTypeStr + " " + TriggerPrice.ToString();
}
}
public string BuyOrSellStr
{
get { return BuyOrSell.Discription(); }
}
public string ValidTypeStr
{
get { return ValidType.Discription(); }
}
public string OperateTypeStr
{
get { return OperateType.Discription(); }
}
///
/// 是否可撤单
///
public bool IsCanCancel
{
get
{
return OrderStatus==PrepostStatus.PREPOST_STATUS_MARKET;
}
}
}
}