2026-06-30 14:53:24 +08:00

129 lines
3.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace YD_YiLu.Api.SmartSportsEntitys
{
/// <summary>
/// 训练成绩表
/// </summary>
[Table("YL_Train")]
[Index(nameof(TrainSerial), IsUnique = true)] // 训练序列号唯一
[Index(nameof(DeviceSerial))]
[Index(nameof(UserSerial))]
[Index(nameof(CourseId))]
public class YL_Train
{
/// <summary>
/// 主键ID
/// </summary>
[Key]
public long Id { get; set; }
/// <summary>
/// 设备序列号(设备唯一标识)
/// </summary>
[Required]
[MaxLength(64)]
public string DeviceSerial { get; set; }
/// <summary>
/// 设备类型
/// </summary>
public int DeviceType { get; set; }
/// <summary>
/// 人员编号
/// </summary>
[Required]
[MaxLength(64)]
public string UserSerial { get; set; }
/// <summary>
/// 单次训练唯一序列号(唯一字段)
/// </summary>
[Required]
[MaxLength(64)]
public string TrainSerial { get; set; }
/// <summary>
/// 视频序列号(多人共用,可重复)
/// </summary>
[Required]
[MaxLength(64)]
public string VideoSerial { get; set; }
/// <summary>
/// 是否测验任务 0=否 1=是
/// </summary>
public int TrainExam { get; set; }
/// <summary>
/// 测验任务ID(自由练习可为空)
/// </summary>
public int? QuizId { get; set; }
/// <summary>
/// 有效个数
/// </summary>
public double StandardCounts { get; set; }
/// <summary>
/// 不合格动作数
/// </summary>
public int UnStandardCounts { get; set; }
/// <summary>
/// 有效时长(秒)
/// 计时类课目使用,如悬垂
/// </summary>
public double? TimeKeeping { get; set; }
/// <summary>
/// 训练持续时间(秒)
/// </summary>
public int Duration { get; set; }
/// <summary>
/// 距离(米)
/// 跳远类课目使用
/// </summary>
public double? Distance { get; set; }
/// <summary>
/// 课目ID
/// </summary>
public int CourseId { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime EndTime { get; set; }
/// <summary>
/// 成绩值(统一换算后的成绩,用于排序)
/// </summary>
public double? Score { get; set; }
/// <summary>
/// 是否有效成绩 0=否 1=是
/// </summary>
public int IsValid { get; set; }
/// <summary>
/// 数据上报时间
/// </summary>
public DateTime UploadTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}