refactor(project): 迁移项目命名并移除WPF客户端

This commit is contained in:
Scottxjw
2026-08-13 13:29:56 +08:00
parent 5189c665c3
commit 645f46abcd
70 changed files with 84 additions and 1913 deletions

View File

@@ -0,0 +1,67 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// Ploss记录实体 - 存储Ploss FOD格式解析数据
/// 支持两行格式:
/// 第一行: pow_loss = X, delta_p = Y
/// 第二行: FOD-> (16个字段)
/// </summary>
public class PlossRecord
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ScenarioId { get; set; }
// ===== 第一行字段nullable兼容旧数据 =====
/// <summary>功率损耗值(来自第一行)</summary>
public int? PowLoss { get; set; }
/// <summary>功率差值(来自第一行)</summary>
public int? DeltaP { get; set; }
// ===== 第二行字段16个通用字段均支持负数 =====
/// <summary>Field1: RX_TYPE - 接收端类型</summary>
public int Field1 { get; set; }
public int Field2 { get; set; }
public int Field3 { get; set; }
/// <summary>Field4: RX power - 接收端功率</summary>
public int Field4 { get; set; }
/// <summary>Field5: TX power - 发射端功率</summary>
public int Field5 { get; set; }
public int Field6 { get; set; }
/// <summary>核心判定值Field7 (原Ploss) - 负数表示安全</summary>
public int Field7 { get; set; }
/// <summary>安全红线Field8 (原Threshold) - 当前功率段阈值</summary>
public int Field8 { get; set; }
/// <summary>Field9: ploss - 功率损耗计算值</summary>
public int Field9 { get; set; }
/// <summary>Field10: threshold - 阈值</summary>
public int Field10 { get; set; }
/// <summary>Field11: 触发次数 - 当 Field7 > Field8损耗大于阈值时计数超过5次后触发FOD保护</summary>
public int Field11 { get; set; }
/// <summary>Field12: PFOD result 标志 - 触发时置位</summary>
public int Field12 { get; set; }
public int Field13 { get; set; }
public int Field14 { get; set; }
public int Field15 { get; set; }
public int Field16 { get; set; }
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public TestScenario Scenario { get; set; } = null!;
/// <summary>派生属性:安全余量(不落库) = Field8 - Field7</summary>
public int Margin => Field8 - Field7;
}

View File

@@ -0,0 +1,22 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// Qfod记录实体 - 存储Qfod格式解析数据
/// </summary>
public class QfodRecord
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ScenarioId { get; set; }
public byte ChargerIndex { get; set; }
public byte CoilIndex { get; set; }
public int DeltaQ { get; set; }
public float CurrentQ { get; set; }
public float RawQ { get; set; }
public byte FodType { get; set; }
public byte FieldF { get; set; }
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public TestScenario Scenario { get; set; } = null!;
}

View File

@@ -0,0 +1,15 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// RX类型维度表
/// </summary>
public class RxType
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = null!;
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public ICollection<TestScenario> TestScenarios { get; set; } = [];
}

View File

@@ -0,0 +1,30 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// 测试场景实体 - 通过外键关联各维度表
/// </summary>
public class TestScenario
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid TxPanelId { get; set; }
public Guid TxHardwareId { get; set; }
public Guid TxSoftwareId { get; set; }
public Guid RxTypeId { get; set; }
public string? TestPurpose { get; set; }
public DateOnly TestDate { get; set; }
public int TestSequence { get; set; } = 1;
public int QfodCount { get; set; } = 0;
public int PlossCount { get; set; } = 0;
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties - 维度表
public TxPanel TxPanel { get; set; } = null!;
public TxHardware TxHardware { get; set; } = null!;
public TxSoftware TxSoftware { get; set; } = null!;
public RxType RxType { get; set; } = null!;
// Navigation Properties - 数据记录
public ICollection<QfodRecord> QfodRecords { get; set; } = [];
public ICollection<PlossRecord> PlossRecords { get; set; } = [];
}

View File

@@ -0,0 +1,15 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// TX硬件版本维度表
/// </summary>
public class TxHardware
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Version { get; set; } = null!;
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public ICollection<TestScenario> TestScenarios { get; set; } = [];
}

View File

@@ -0,0 +1,15 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// TX面板类型维度表
/// </summary>
public class TxPanel
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = null!;
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public ICollection<TestScenario> TestScenarios { get; set; } = [];
}

View File

@@ -0,0 +1,15 @@
namespace Gpulse.WCT.DataAnalyzer.Core.Models;
/// <summary>
/// TX软件版本维度表
/// </summary>
public class TxSoftware
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Version { get; set; } = null!;
public bool IsDeleted { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public ICollection<TestScenario> TestScenarios { get; set; } = [];
}