using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace YLErp.DBModels { [Table("client_position")] public class ClientPosition { /// /// 主键ID /// [Key] public long id { get; set; } /// /// 客户机构编码 /// public long? client_id { get; set; } /// /// 客户机构名称 /// public string client_name { get; set; } /// /// 客户用户编号 /// public long? client_user_id { get; set; } /// /// 客户用户名称 /// public string client_user_name { get; set; } /// /// 交易方向(0:多头,1:空头) /// public int side { get; set; } /// /// 债券代码 /// public string security_id { get; set; } /// /// 债券名称 /// public string symbol { get; set; } /// /// 当前收益率 /// public decimal? yield_now { get; set; } /// /// 当前净价 /// public decimal? price_now { get; set; } /// /// 当前全价 /// public decimal? full_price_now { get; set; } /// /// 成交收益率(平均) /// public decimal? deal_yield_avg { get; set; } /// /// 成交净价(平均) /// public decimal? deal_price_avg { get; set; } /// /// 成交全价(平均) /// public decimal? deal_full_price_avg { get; set; } /// /// 持仓数量(万) /// public decimal? position_qty { get; set; } /// /// 交易费用 /// public decimal? commission { get; set; } /// /// 互换市值 /// public decimal? swap_market_value { get; set; } /// /// 持仓盈亏 /// public decimal? position_profit_loss { get; set; } /// /// 当日盈亏=今日pv-lastPv /// public decimal? today_profit_loss { get; set; } /// /// 创建时间 /// public DateTime? create_time { get; set; } /// /// 创建人 /// public long? create_user { get; set; } /// /// 更新时间 /// public DateTime? update_time { get; set; } /// /// 持仓名义本金 /// public decimal? position_notional_principal { get; set; } /// /// 更新人 /// public long? update_user { get; set; } /// /// 收支方向 1:收取:2支付 /// public int direction { get; set; } [NotMapped] public bool Current { get; set; } } }