using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Muchinfo.MTPClient.Data.Model.Delivery
{
///
/// 交易商品交割关系表
///
public class GoodsDeliveryRelationModel
{
#region SQL字段
//
#endregion
///
/// 交易商品Id
///
[PropertyDisc("GoodsId")]
public long GoodsId { get; set; }
///
/// 关联模式
///
[PropertyDisc("RelationMode")]
public eDeliveryContractLink RelationMode { get; set; }
///
/// 关联交易商品Id
///
[PropertyDisc("RelationGoodsId")]
public long RelationGoodsId { get; set; }
///
/// 交割商品Id
///
[PropertyDisc("DeliveryGoodsId")]
public long DeliveryGoodsId { get; set; }
///
/// 兑换系数
///
[PropertyDisc("Conversion")]
public decimal Conversion { get; set; }
///
/// 交割价算法
///
[PropertyDisc("DeliveryPriceCalcMethod")]
public eReckonPriceCalcMethodType DeliveryPriceCalcMethod { get; set; }
///
/// 算法参数
///
[PropertyDisc("CalcParamaterValue")]
public decimal CalcParamaterValue { get; set; }
///
/// 差价升贴水
///
[PropertyDisc("DeliveryPriceMove")]
public decimal DeliveryPriceMove { get; set; }
///
/// 商品配比【申报商品-关联商品】
///
[PropertyDisc("goodsscale")]
public decimal goodsscale { get; set; }
///
/// 关联交易商品兑换系数
///
[PropertyDisc("RELATIONCONVERSION")]
public decimal RELATIONCONVERSION { get; set; }
#region 交割商品表DeliveryGoods
///
/// 商品状态:0待激活、1正常、 2已注销
///
[PropertyDisc("DeliveryGoodsStatus")]
public eGoodsStatus DeliveryGoodsStatus { get; set; }
///
/// 交割商品合约单位-数据库表中,此字段删除
///
//[PropertyDisc("AgreeUnit")]
//public decimal AgreeUnit { get; set; }
///
/// 商品单位
///
[PropertyDisc("GoodsUnitId")]
public long GoodsUnitId { get; set; }
///
/// 交割商品名称
///
[PropertyDisc("deliverygoodsname")]
public string deliverygoodsname { get; set; }
///
/// 交割商品代码
///
[PropertyDisc("deliverygoodscode")]
public string deliverygoodscode { get; set; }
///
/// 交割商品名称代码
///
public string DeliveryGoodsNameCode
{
get
{
return deliverygoodsname + " " + deliverygoodscode;
}
}
///
/// 价格小数位
///
[PropertyDisc("DecimalPlace")]
public decimal DecimalPlace { get; set; }
///
/// 发起方式'1买方限定,2卖方限定,3双方自由';
///
[PropertyDisc("Sponsor")]
public eSponsorType Sponsor { get; set; }
///
/// 基准价
///
[PropertyDisc("BasePrice")]
public decimal BasePrice { get; set; }
#endregion
#region 交割规则表DeliveryRule
/////
///// 规则id
/////
//[PropertyDisc("Ruleid")]
//public long Ruleid { get; set; }
/////
///// 参数值
/////
//[PropertyDisc("ParameterValue")]
//public decimal ParameterValue { get; set; }
///
/// 最小交割数量
///
[PropertyDisc("minDeliveryQty")]
public decimal minDeliveryQty { get; set; }
///
/// 最大交割数量
///
[PropertyDisc("maxDeliveryQty")]
public decimal maxDeliveryQty { get; set; }
private DateTime _minDateDeliveryDate =DateTime.MinValue;
///
/// 交割开始日期
///
[PropertyDisc("minDateDeliveryDate")]
public DateTime MinDateDeliveryDate
{
get { return _minDateDeliveryDate; }
set { _minDateDeliveryDate = value; }
}
private DateTime _maxDateDeliveryDate = DateTime.MinValue;
///
/// 交割结束日期
///
[PropertyDisc("maxDateDeliveryDate")]
public DateTime MaxDateDeliveryDate
{
get { return _maxDateDeliveryDate; }
set { _maxDateDeliveryDate = value; }
}
#endregion
#region 买交割手续费
// fe.feecalcMethod buyDeliveryMode, 手续费类型
//fe.parameterValue as buyDeliveryFee, 手续费参数值
//askfe.feecalcmethod AskDeliveryMode, 卖手续费类型
//askfe.parameterValue as askDeliveryFee 卖手续费参数值
///
/// 手续费类型
///
[PropertyDisc("buyDeliveryMode")]
public long buyDeliveryMode { get; set; }
///
/// 手续费参数值
///
[PropertyDisc("buyDeliveryFee")]
public decimal buyDeliveryFee { get; set; }
#endregion
#region 商品属性表
///
/// 交易商品-合约单位
///
[PropertyDisc("currentAgreeunit")]
public decimal currentAgreeunit { get; set; }
///
/// 交易商品-商品单位
///
[PropertyDisc("currentGoodsunit")]
public decimal currentGoodsunit { get; set; }
///
/// 交易商品-资金模式-1:保证金、2:全款划扣
///
[PropertyDisc("currentMoneymode")]
public eMoneyMode currentMoneymode { get; set; }
///
/// 交易商品-价格小数位
///
[PropertyDisc("currentDecimalplace")]
public int currentDecimalplace { get; set; }
///
/// 交易商品-商品名称
///
[PropertyDisc("currentGoodsname")]
public string currentGoodsname { get; set; }
///
/// 交易商品-商品代码
///
[PropertyDisc("currentGoodscode")]
public string currentGoodscode { get; set; }
///
/// 交易商品-交易市场
///
[PropertyDisc("currentTradeMode")]
public eTradeMode currentTradeMode { get; set; }
///
/// 关联交易商品-商品名称
///
[PropertyDisc("RelationGoodsname")]
public string RelationGoodsname { get; set; }
///
/// 关联交易商品-商品代码
///
[PropertyDisc("RelationGoodscode")]
public string RelationGoodscode { get; set; }
///
/// 关联交易商品-商品名称代码
///
public string RelationGoodsNameCode
{
get
{
return RelationGoodsname + " " + RelationGoodscode;
}
}
///
/// 关联交易商品-合约单位
///
[PropertyDisc("RelationAgreeunit")]
public decimal RelationAgreeunit { get; set; }
///
/// 关联交易商品-商品单位
///
[PropertyDisc("RelationGoodsunit")]
public decimal RelationGoodsunit { get; set; }
///
/// 关联交易商品-资金模式-1:保证金、2:全款划扣
///
[PropertyDisc("RelationMoneymode")]
public eMoneyMode RelationMoneymode { get; set; }
///
/// 关联交易商品-价格小数位
///
[PropertyDisc("RelationDecimalplace")]
public int RelationDecimalplace { get; set; }
///
/// 关联交易商品-交易市场
///
[PropertyDisc("RelationtTradeMode")]
public eTradeMode RelationtTradeMode { get; set; }
#endregion
#region 卖交收
///
/// 卖手续费类型
///
[PropertyDisc("AskDeliveryMode")]
public long AskDeliveryMode { get; set; }
///
/// 手续费参数值
///
[PropertyDisc("askDeliveryFee")]
public decimal AskDeliveryFee { get; set; }
#endregion
///
/// 税款参数
///
[PropertyDisc("faxValue")]
public decimal FaxValue { get; set; }
///
/// 交割价算法-字符转换:'指定价,持仓价,结算价,协议价,昨结算价';
///
public string DeliveryPriceCalcMethodDisplay
{
get
{
return DeliveryPriceCalcMethod.Discription();
}
}
}
}