using SqlSugar;
using System;
namespace Model.Entity
{
///
/// 测试报告记录:每次 ExecuteSteps / ExecuteErrorSteps 中每个步骤的执行结果。
/// 同一次运行的所有步骤共享同一个 TestRoundId。
///
public class TestReportEntity : BaseEntity
{
/// 同一次运行的统一标识(StepRunning.TestRoundID)
[SugarColumn(ColumnName = "TestRoundId", ColumnDescription = "运行轮次标识")]
public Guid TestRoundId { get; set; }
/// 作用域/台架名称
[SugarColumn(ColumnName = "Scope", ColumnDescription = "台架名称")]
public string Scope { get; set; } = string.Empty;
/// 测试项名称(当前ACP文件路径)
[SugarColumn(ColumnName = "FileName", ColumnDescription = "测试项名称")]
public string FileName { get; set; } = string.Empty;
/// 步骤序号
[SugarColumn(ColumnName = "StepIndex")]
public int StepIndex { get; set; }
/// 步骤名称
[SugarColumn(ColumnName = "StepName", Length = 200)]
public string StepName { get; set; } = string.Empty;
/// 步骤类型(普通步骤/循环开始/循环结束)
[SugarColumn(ColumnName = "StepType", Length = 50)]
public string StepType { get; set; } = string.Empty;
/// 执行的方法名称
[SugarColumn(ColumnName = "MethodName", Length = 200, IsNullable = true)]
public string? MethodName { get; set; }
/// 方法的完整类型名(实际方法所属类)
[SugarColumn(ColumnName = "MethodFullName", Length = 500, IsNullable = true)]
public string? MethodFullName { get; set; }
/// 执行结果(成功/失败/未执行/跳过)
[SugarColumn(ColumnName = "Result", Length = 20)]
public string Result { get; set; } = string.Empty;
/// 执行耗时(毫秒)
[SugarColumn(ColumnName = "RunTimeMs", IsNullable = true)]
public int? RunTimeMs { get; set; }
/// 输出值(如果有)
[SugarColumn(ColumnName = "OutputValue", Length = 500, IsNullable = true)]
public string? OutputValue { get; set; }
/// 子程序嵌套深度(0=主程序)
[SugarColumn(ColumnName = "Depth")]
public int Depth { get; set; }
/// 是否异常流程步骤
[SugarColumn(ColumnName = "IsErrorStep")]
public bool IsErrorStep { get; set; }
/// 循环剩余次数(仅循环步骤有值)
[SugarColumn(ColumnName = "LoopRemaining", IsNullable = true)]
public int? LoopRemaining { get; set; }
}
}