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.DomainModels;
using VOL.Entity.Enum;
namespace VOL.Model.Ai.Response
{
///
/// 活动列表
///
public class Ai_ActivitiesListDto
{
///
/// 赛事活动Id
///
public int ActivitiesId { get; set; }
///
///赛事名称
///
public string ActivitiesName { get; set; }
///
///测试类别Id
///
public int ItemCode { get; set; }
///
///类别名称
///
public string ItemName { get; set; }
///
///状态
///
public ActivitiesStatus ActivitiesStatus { get; set; }
///
/// 状态中文
///
public string ActivitiesStatusName
{
get
{
return ActivitiesStatus.Description();
}
}
///
///活动开始时间
///
public DateTime? StartDate { get; set; }
///
///活动结束时间
///
public DateTime? EndDate { get; set; }
///
/// 图片路径
///
public string ImagePath { get; set; }
///
/// 模式类型
///
public Ai_ModeEnum ModeType { get; set; }
///
/// 数据类型[1:训练数据/2:体测数据]
///
public SportsTestDataType DataType { get; set; }
}
///
/// 赛事活动排行
///
public class Ai_ActivitiesRankingDto
{
///
/// 排行
///
public int Ranking { get; set; }
///
/// 成绩
///
public string Score { get; set; }
///
/// 姓名
///
public string StudentName { get; set; }
///
/// 年级-班级
///
public string GradeAndClass { get; set; }
///
/// 性别
///
public SexType Sex { get; set; }
///
/// 学校名称
///
public string SchoolName { get; set; }
///
/// 头像
///
public string Photo { get; set; }
///
/// 数据类型
///
public SportsTestDataType SportsTestDataType { get; set; }
///
///测试项目
///
public int CategoryEnumType { get; set; }
///
/// 测试项目名称
///
public string ItemName
{
get
{
if (CategoryEnumType > 0)
{
if (SportsTestDataType == SportsTestDataType.TrainingData)
{
// 将 CategoryEnumType 转换为 TrainingItemType 枚举类型
var trainingItemEnum = (TrainingItemType)Enum.Parse(typeof(TrainingItemType), CategoryEnumType.ToString());
return trainingItemEnum.GetDisplayName();
}
else if (SportsTestDataType == SportsTestDataType.SportsTestData)
{
// 将 CategoryEnumType 转换为 SportsTestItemType 枚举类型
var sportsTestItemEnum = (SportsTestItemType)Enum.Parse(typeof(SportsTestItemType), CategoryEnumType.ToString());
return sportsTestItemEnum.GetDisplayName();
}
}
return string.Empty;
}
}
public string ItemUnit
{
get
{
if (CategoryEnumType > 0)
{
if (SportsTestDataType == SportsTestDataType.TrainingData)
{
// 将 CategoryEnumType 转换为 TrainingItemType 枚举类型
var trainingItemEnum = (TrainingItemType)Enum.Parse(typeof(TrainingItemType), CategoryEnumType.ToString());
return trainingItemEnum.GetDisplayDescription();
}
else if (SportsTestDataType == SportsTestDataType.SportsTestData)
{
// 将 CategoryEnumType 转换为 SportsTestItemType 枚举类型
var sportsTestItemEnum = (SportsTestItemType)Enum.Parse(typeof(SportsTestItemType), CategoryEnumType.ToString());
return sportsTestItemEnum.GetDisplayDescription();
}
}
return string.Empty;
}
}
}
///
/// 验证学生是否在报名列表中
///
public class IsActivityInListDto
{
///
/// 赛事活动Id
///
public int ActivitiesId { get; set; }
///
/// 学号
///
public string StudentNo { get; set; }
///
/// 是否存在[true:存在/flase:不存在]
///
public bool IsExist { get; set; } = false;
}
}