This commit is contained in:
tanglong 2026-03-04 13:55:34 +08:00
parent 0bf95fb54e
commit 1191eb7721
4 changed files with 235 additions and 202 deletions

View File

@ -26,7 +26,7 @@ namespace YD_YiShi.Api.Context
public DbSet<XW_ProjectMode> XW_ProjectMode { get; set; }
public DbSet<XW_TestingProject> XW_TestingProject { get; set; }
public DbSet<YS_Device> XW_Device { get; set; }
public DbSet<YL_Device> XW_Device { get; set; }
public DbSet<XW_SportsTestData> XW_SportsTestData { get; set; }
public DbSet<XW_TrainStudents> XW_TrainStudents { get; set; }
public DbSet<XW_TrainSetting> XW_TrainSetting { get; set; }

View File

@ -0,0 +1,105 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using YD_YiShi.Api.Entitys;
namespace VOL.Entity.DomainModels.XinWei
{
/// <summary>
/// 运动小站设备表
/// </summary>
[Table("YL_Device")]
public class YL_Device
{
/// <summary>
/// 主键ID
/// </summary>
[Key]
public long Id { get; set; }
/// <summary>
/// 运动小站ID
/// </summary>
public long SportStationId { get; set; }
/// <summary>
/// 运动小站名称
/// </summary>
[MaxLength(100)]
public string Name { get; set; }
/// <summary>
/// 客户名称(租户名称)
/// </summary>
[MaxLength(100)]
public string TenantName { get; set; }
/// <summary>
/// 设备唯一序列号(唯一约束)
/// </summary>
[Required]
[MaxLength(64)]
public string SerialNumber { get; set; }
/// <summary>
/// Android Id(预留字段)
/// </summary>
[MaxLength(64)]
public string AndroidId { get; set; }
/// <summary>
/// IMEI(预留字段)
/// </summary>
[MaxLength(64)]
public string IMEI { get; set; }
/// <summary>
/// IMSI(预留字段)
/// </summary>
[MaxLength(64)]
public string IMSI { get; set; }
/// <summary>
/// 是否已标定 0=否 1=是
/// </summary>
public int IsCalibration { get; set; }
/// <summary>
/// 是否开启数据同步 0=否 1=是
/// </summary>
public int IsSynchronization { get; set; }
/// <summary>
/// 是否激活 0=未激活 1=已激活
/// </summary>
public int IsActive { get; set; }
/// <summary>
/// 是否在线 0=离线 1=在线
/// </summary>
public int IsOnline { get; set; }
/// <summary>
/// 最后一次在线时间
/// </summary>
public DateTime? LastOnlineTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdateTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[MaxLength(500)]
public string Remark { get; set; }
}
}

View File

@ -0,0 +1,129 @@
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 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; }
}
}

View File

@ -1,201 +0,0 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using YD_YiShi.Api.Entitys;
namespace VOL.Entity.DomainModels.XinWei
{
/// <summary>
/// 设备表
/// </summary>
[Table("YS_Device")]
public class YS_Device
{
/// <summary>
/// 编号
/// </summary>
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Description = "主键Id")]
[Comment("编号")]
public int Id { get; set; }
/// <summary>
/// 类型 (1 平板, 2 跳绳, ...)
/// </summary>
[Display(Name = "Type")]
[Comment("类型")]
[Column(TypeName = "double")]
public double? Type { get; set; }
/// <summary>
/// 设备型号
/// </summary>
[Display(Name = "DeviceType")]
[Comment("设备型号")]
public string? DeviceType { get; set; }
/// <summary>
/// 设备序列号
/// </summary>
[Display(Name = "DeviceSerial")]
[Comment("设备序列号")]
public string? DeviceSerial { get; set; }
/// <summary>
/// 设备 MAC 地址
/// </summary>
[Display(Name = "DeviceMac")]
[Comment("设备 MAC 地址")]
public string? DeviceMac { get; set; }
/// <summary>
/// 设备 IMEI 地址
/// </summary>
[Display(Name = "DeviceImei")]
[Comment("设备 IMEI 地址")]
public string? DeviceImei { get; set; }
/// <summary>
/// AI 摄像机 IP 地址 (多个 IP 用 , 隔开)
/// </summary>
[Display(Name = "CameraIp")]
[Comment("AI 摄像机 IP 地址")]
public string? CameraIp { get; set; }
/// <summary>
/// 抢跑 IP (短跑)
/// </summary>
[Display(Name = "GunJumpingIp")]
[Comment("抢跑 IP")]
public string? GunJumpingIp { get; set; }
/// <summary>
/// 是否是 EAI100 摄像头
/// </summary>
[Display(Name = "Eai100Flag")]
[Comment("是否是 EAI100 摄像头")]
public bool? Eai100Flag { get; set; }
/// <summary>
/// 组织 ID
/// </summary>
[Display(Name = "OrgId")]
[Comment("组织 ID")]
public int? OrgId { get; set; }
/// <summary>
/// 组织名称
/// </summary>
[Display(Name = "OrgName")]
[Comment("组织名称")]
public string? OrgName { get; set; }
/// <summary>
/// 用户 ID
/// </summary>
[Display(Name = "UserId")]
[Comment("用户 ID")]
public int? UserId { get; set; }
/// <summary>
/// 用户名称
/// </summary>
[Display(Name = "UserName")]
[Comment("用户名称")]
public string? UserName { get; set; }
/// <summary>
/// 软件版本
/// </summary>
[Display(Name = "SoftWareVer")]
[Comment("软件版本")]
public string? SoftWareVer { get; set; }
/// <summary>
/// 硬件版本
/// </summary>
[Display(Name = "HardwareVer")]
[Comment("硬件版本")]
public string? HardwareVer { get; set; }
/// <summary>
/// 应用时间
/// </summary>
[Display(Name = "DeployTime")]
[Comment("应用时间")]
public string? DeployTime { get; set; }
/// <summary>
/// 最后登录时间
/// </summary>
[Display(Name = "LastLoginTime")]
[Comment("最后登录时间")]
public string? LastLoginTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "Remark")]
[Comment("备注")]
public string? Remark { get; set; }
/// <summary>
/// 授权状态 (0 无效, 1 有效)
/// </summary>
[Display(Name = "State")]
[Comment("授权状态")]
public int? State { get; set; }
/// <summary>
/// 状态 (0 无效, 1 有效)
/// </summary>
[Display(Name = "Status")]
[Comment("状态")]
public int? Status { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "CreateTime")]
[Comment("创建时间")]
public string? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Display(Name = "CreateBy")]
[Comment("创建人")]
public string? CreateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[Display(Name = "UpdateTime")]
[Comment("修改时间")]
public string? UpdateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
[Display(Name = "UpdateBy")]
[Comment("修改人")]
public string? UpdateBy { get; set; }
/// <summary>
/// 学校人脸的相似度 (80-99 之间的整数)
/// </summary>
[Display(Name = "SimilarNumber")]
[Comment("学校人脸的相似度")]
public int? SimilarNumber { get; set; }
/// <summary>
/// 摄像头序列号、版本信息
/// </summary>
[Display(Name = "摄像头序列号、版本信息")]
[Comment("摄像头序列号、版本信息")]
public string CameraInfo { get; set; }
}
}