using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace OnlineUserPool.Model { public class MsgModel : ReceiveModel { public int RouteId { get; set; } public int MemberId { get; set; } public double[] Point { get; set; } public bool IsCompleted { get; set; } public bool exit = false; public double Speed { get; set; } public double HeartRate { get; set; } public double Power { get; set; } public double Cadence { get; set; } public int TotalTicks { get; set; } ///// ///// 需要展示的属性 ///// //public string Prop { get; set; } public double PreDistance { get; set; } public double EndDistance { get; set; } //public bool IsVirtual { get; set; } //public double Power { get; set; } //public double Weight { get; set; } /// /// 功率体重比 /// public double WeightKg { get; set; } public int Competitionid { get; set; } public bool Saved { get; set; } //public bool ShowVirtual { get; set; } public int FrameRate { get; set; } public int RoomId { get; set; } public DateTime? StartTime { get; set; } public string Request { get; set; } public string Model { get; set; } public string ToString(int v) { if (v == 2) { return $"{ RouteId },{ MemberId },{ string.Join(":", Point) },{ Convert.ToInt32(IsCompleted) },{ Speed },{ PreDistance },{ EndDistance },{ WeightKg },{ Competitionid },{ Convert.ToInt32(Saved)},{ Power} ,{ HeartRate},{ Cadence},{ TotalTicks},{ FrameRate},{RoomId},{StartTime}"; } return $"{ RouteId },{ MemberId },{ string.Join(":", Point) },{ Convert.ToInt32(IsCompleted) },{ Speed },{ PreDistance },{ EndDistance },{ WeightKg },{ Competitionid },{ Convert.ToInt32(Saved)}"; } } }