powerfun-new-net/Model/MsgModel.cs

64 lines
2.0 KiB
C#
Raw Normal View History

using Newtonsoft.Json;
using System;
2020-09-17 10:23:26 +08:00
using System.Collections.Generic;
using System.Text;
namespace OnlineUserPool.Model
{
2021-07-07 09:49:36 +08:00
public class MsgModel : ReceiveModel
2020-09-17 10:23:26 +08:00
{
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; }
2021-08-12 12:26:43 +08:00
public double HeartRate { get; set; }
public double Power { get; set; }
public double Cadence { get; set; }
public int TotalTicks { get; set; }
2020-10-27 10:20:47 +08:00
///// <summary>
///// 需要展示的属性
///// </summary>
//public string Prop { get; set; }
public double PreDistance { get; set; }
2020-09-17 10:23:26 +08:00
public double EndDistance { get; set; }
//public bool IsVirtual { get; set; }
2020-10-27 10:20:47 +08:00
//public double Power { get; set; }
//public double Weight { get; set; }
/// <summary>
/// 功率体重比
/// </summary>
public double WeightKg { get; set; }
public int Competitionid { get; set; }
2020-12-16 13:47:20 +08:00
public bool Saved { get; set; }
2021-07-07 09:49:36 +08:00
//public bool ShowVirtual { get; set; }
2022-05-10 19:23:32 +08:00
public int FrameRate { get; set; }
public int RoomId { get; set; }
2022-05-10 19:23:32 +08:00
public DateTime? StartTime { get; set; }
public string Request { get; set; }
public string Model { get; set; }
public string ToString(int v)
{
2021-08-12 12:26:43 +08:00
if (v == 2)
{
2022-05-10 19:23:32 +08:00
return $"{ RouteId },{ MemberId },{ string.Join(":", Point) },{ Convert.ToInt32(IsCompleted) },{ Speed },{ PreDistance },{ EndDistance },{ WeightKg },{ Competitionid },{ Convert.ToInt32(Saved)},{ Power} ,{ HeartRate},{ Cadence},{ TotalTicks},{ FrameRate},{RoomId},{StartTime}";
2021-08-12 12:26:43 +08:00
}
return $"{ RouteId },{ MemberId },{ string.Join(":", Point) },{ Convert.ToInt32(IsCompleted) },{ Speed },{ PreDistance },{ EndDistance },{ WeightKg },{ Competitionid },{ Convert.ToInt32(Saved)}";
}
2020-09-17 10:23:26 +08:00
}
}