Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/WalkingTec.Mvvm.Core/Analysis/AnalysisQueryRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class AnalysisQueryRequest
public string? SearcherFormData { get; set; }

/// <summary>選取的維度欄位名稱(最多 3 個)。</summary>
public List<string> Dimensions { get; set; } = new List<string>();
public List<string> Dimensions { get; set; } = [];

/// <summary>選取的度量及聚合函式。</summary>
public List<MeasureRequest> Measures { get; set; } = new List<MeasureRequest>();
public List<MeasureRequest> Measures { get; set; } = [];

/// <summary>額外過濾條件(白名單驗證後進 Expression Tree)。</summary>
public List<FilterCondition> Filters { get; set; } = new List<FilterCondition>();
public List<FilterCondition> Filters { get; set; } = [];

/// <summary>維度對應的日期階層(僅日期維度需要,key=fieldName, value=hierarchy)</summary>
public Dictionary<string, DateHierarchy>? DimensionHierarchies { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/WalkingTec.Mvvm.Core/Analysis/AnalysisQueryResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace WalkingTec.Mvvm.Core.Analysis
public class AnalysisQueryResponse
{
/// <summary>欄位名稱清單(有序,對應 Rows 中的 key)。</summary>
public List<string> Columns { get; set; } = new List<string>();
public List<string> Columns { get; set; } = [];

/// <summary>資料列(每列為 欄位名→值 的字典)。</summary>
public List<Dictionary<string, object?>> Rows { get; set; } = new List<Dictionary<string, object?>>();
public List<Dictionary<string, object?>> Rows { get; set; } = [];

/// <summary>GroupBy 後總筆數。</summary>
public int TotalCount { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ServerSideGroupByStrategy : IGroupByStrategy
CancellationToken cancellationToken = default)
{
if (req.Dimensions.Count == 0)
return new List<Dictionary<string, object?>>();
return [];

if (req.DimensionHierarchies != null && req.Dimensions.Any(d => req.DimensionHierarchies.TryGetValue(d, out var h) && h != DateHierarchy.None))
{
Expand All @@ -51,7 +51,7 @@ public class ServerSideGroupByStrategy : IGroupByStrategy
CancellationToken cancellationToken = default)
{
if (req.Dimensions.Count == 0)
return new List<Dictionary<string, object?>>();
return [];

if (req.DimensionHierarchies != null && req.Dimensions.Any(d => req.DimensionHierarchies.TryGetValue(d, out var h) && h != DateHierarchy.None))
{
Expand Down
2 changes: 1 addition & 1 deletion src/WalkingTec.Mvvm.Core/BasePagedListVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
/// <summary>
///记录批量操作时列表中选择的Id
/// </summary>
public List<string> Ids { get; set; } = new List<string>();
public List<string> Ids { get; set; } = [];
public string? SelectorValueField { get; set; }
/// <summary>
/// 是否已经搜索过
Expand Down Expand Up @@ -1254,7 +1254,7 @@
}
}

public List<FrameworkWorkflow> GetMyApproves(string? flowname = null)

Check warning on line 1257 in src/WalkingTec.Mvvm.Core/BasePagedListVM.cs

View workflow job for this annotation

GitHub Actions / build-and-test

'FrameworkWorkflow' is obsolete: 'WTM's built-in Elsa workflow integration has been removed. This member will be deleted in the next major version. See CHANGELOG.md for migration guidance.'
{
var mt = ModelType.GetParentWorkflowPoco();
if (mt != null)
Expand Down
Loading