ow
This commit is contained in:
1 parent
94d5fb2ec9
commit
6c86c59bdc
15 files changed
+429
-14
No files matched your search
@@ -0,0 +1,37 @@
|
||||
using CloudBuilder.Core.Authorization;
|
||||
|
||||
namespace CloudBuilder.Master.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 族谱「统计」tab 的聚合数据:总数/男/女/世代层数 + 各世代人数分布。
|
||||
/// 后端单次遍历算完(族员表 + 亲子边表 + 始祖 BFS),避免前端拉全表再算;
|
||||
/// 世代 = 始祖起 BFS 深度(始祖=1 世),未连到始祖的旁支不入世代桶,只计入 Total。
|
||||
/// </summary>
|
||||
[TypeScript]
|
||||
public class FamilyTreeStatisticsData
|
||||
{
|
||||
/// <summary>入树成员总数(family_person 按 TreeId 过滤后的行数)</summary>
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>男性族员数(Gender=M)</summary>
|
||||
public int Male { get; set; }
|
||||
|
||||
/// <summary>女性族员数(Gender=W,GenderPolicy 里女= W 而非 F)</summary>
|
||||
public int Female { get; set; }
|
||||
|
||||
/// <summary>世代层数(本谱出现过的最大世代号;空谱为 0)</summary>
|
||||
public int GenerationCount { get; set; }
|
||||
|
||||
/// <summary>各世代人数分布(按世代升序;空档世代也占位,图表柱不连续)</summary>
|
||||
public FamilyTreeGenerationCountData[] PerGeneration { get; set; } = [];
|
||||
}
|
||||
|
||||
/// <summary>单个世代的人数条目(世代号 + 该世代族员数)</summary>
|
||||
[TypeScript]
|
||||
public class FamilyTreeGenerationCountData
|
||||
{
|
||||
public int Generation { get; set; }
|
||||
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user