using System.ComponentModel.DataAnnotations.Schema; using YieldChain.Security; using YLErp.DBModels.Enums; namespace YLErp.DBModels { [Table("trade_position")] public class TradePosition { public long id { get; set; } /// /// 加密主键 /// [NotMapped] public string EncryptId { get { return DataProtect.Encrypt(id.ToString()); } } /// /// 簿记 /// public int BookId { get; set; } /// /// 交易类型 /// public string TradeType { get; set; } /// /// 交易类型(大类) /// public TradeTypeFlag TradeType1 { get; set; } /// /// 标的ID /// public int UnderlyingId { get; set; } /// /// 标的代码 /// public string UnderlyingCode { get; set; } /// /// 持仓类型 /// public PositionTypeFlag PositionType { get; set; } /// /// 今日持仓数量 /// public double Position { get; set; } /// /// 持仓成本 /// public double PositionCost { get; set; } /// /// 过期日 /// public DateTime MaturityDate { get; set; } /// /// 交易产品代码 /// public string InstrumentCode { get; set; } /// /// 创建时间 /// public DateTime CreateTime { get; set; } /// /// 更新时间 /// public DateTime UpdateTime { get; set; } } /// /// 交易持仓DTO /// [NotMapped] public class TradePositionDto : TradePosition { } }