将 YL_Train.StandardCounts 和 AiSportsStationDto.StandardCounts 从 double 恢复为 int,与原始实体定义及迁移快照保持一致。 列表查询保留显式数值转换,以适配测试库 float 和生产库 int 的列类型差异;不修改数据库表结构或数据。 验证:dotnet build VOL.WebApi/VOL.WebApi.csproj --no-restore -c Release 成功;git diff --cached --check 通过。
135 lines
3.4 KiB
C#
135 lines
3.4 KiB
C#
using Microsoft.EntityFrameworkCore;
|
||
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;
|
||
using VOL.Entity.SystemModels;
|
||
|
||
namespace VOL.Entity.DomainModels.YiLu
|
||
{
|
||
/// <summary>
|
||
/// 训练成绩表
|
||
/// </summary>
|
||
[Table("YL_Train")]
|
||
[Index(nameof(TrainSerial), IsUnique = true)] // 训练序列号唯一
|
||
[Index(nameof(DeviceSerial))]
|
||
[Index(nameof(UserSerial))]
|
||
[Index(nameof(CourseId))]
|
||
public class YL_Train : BaseEntity
|
||
{
|
||
/// <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 int 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; }
|
||
}
|
||
}
|