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
{
///
/// P+X交割商品信息
///
public class RelationPAndXGoodsInfoModel
{
#region SQL字段
//
#endregion
///
/// 交易商品Id
///
[PropertyDisc("GoodsId")]
public long GoodsId { get; set; }
///
/// 交割关系id
///
[PropertyDisc("RelationId")]
public long RelationId { 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("AgreeUnit")]
//public decimal AgreeUnit { get; set; }
///
/// 发起方式'1买方限定,2卖方限定,3双方自由';
///
[PropertyDisc("Sponsor")]
public eSponsorType Sponsor { get; set; }
///
/// 商品单位
///
[PropertyDisc("GoodsUnitId")]
public long GoodsUnitId { get; set; }
///
/// 商品单位名称
///
[PropertyDisc("goodsUnitName")]
public string goodsUnitName { get; set; }
///
/// 差价升贴水
///
[PropertyDisc("DeliveryPriceMove")]
public decimal DeliveryPriceMove { get; set; }
///
/// 交割商品名称
///
[PropertyDisc("deliverygoodsname")]
public string deliverygoodsname { get; set; }
///
/// 交割商品代码
///
[PropertyDisc("deliverygoodscode")]
public string deliverygoodscode { get; set; }
///
/// 关联交易商品-商品名称
///
[PropertyDisc("RelationGoodsname")]
public string RelationGoodsname { get; set; }
///
/// 关联交易商品-商品代码
///
[PropertyDisc("RelationGoodscode")]
public string RelationGoodscode { get; set; }
public string RelationGoodsNameCodeDisplay
{
get
{
if (RelationGoodsname != null && RelationGoodsname != "" && RelationGoodsname.Length > 8)
{
return RelationGoodsname.Substring(0, 8) + "..." + " " + RelationGoodscode;
}
else
{
return RelationGoodsname + " " + RelationGoodscode;
}
}
}
private string _WarehouseList = "-";
///
/// 交割商品属性-仓库
///
[PropertyDisc("WarehouseList")]
public string WarehouseList
{
get { return _WarehouseList; }
set { _WarehouseList = value; }
}
private string _BrandList ="-";
///
/// 交割商品属性-品牌
///
[PropertyDisc("BrandList")]
public string BrandList
{
get { return _BrandList; }
set { _BrandList = value; }
}
private string _RankList = "-";
///
/// 交割商品属性-等级
///
[PropertyDisc("RankList")]
public string RankList
{
get { return _RankList; }
set { _RankList = value; }
}
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; }
}
///
/// 商品配比
///
[PropertyDisc("goodsscale")]
public decimal GoodsScale { get; set; }
}
}