Update Saqel Platform: 2026-09-08 13:43:36
This commit is contained in:
@@ -33,16 +33,16 @@ class MacroTelemetryModel {
|
||||
|
||||
factory MacroTelemetryModel.fromJson(Map<String, dynamic> json) {
|
||||
return MacroTelemetryModel(
|
||||
totalDirectorates: json['total_directorates'] ?? 2,
|
||||
totalSchools: json['total_schools'] ?? 43,
|
||||
totalStudents: json['total_students'] ?? 19350,
|
||||
totalTeachers: json['total_teachers'] ?? 812,
|
||||
grossMarginPercent: (json['gross_margin_percent'] as num?)?.toDouble() ?? 84.6,
|
||||
treasuryBalanceJod: (json['treasury_balance_jod'] as num?)?.toDouble() ?? 48500.0,
|
||||
totalCliqInflowJod: (json['total_cliq_inflow_jod'] as num?)?.toDouble() ?? 15200.0,
|
||||
pendingPayoutsCount: json['pending_payouts_count'] ?? 4,
|
||||
r2BandwidthCostSavingsJod: (json['r2_cost_savings_jod'] as num?)?.toDouble() ?? 3240.0,
|
||||
uptimePercent: (json['uptime_percent'] as num?)?.toDouble() ?? 99.98,
|
||||
totalDirectorates: (json['total_directorates'] as num?)?.toInt() ?? 0,
|
||||
totalSchools: (json['total_schools'] as num?)?.toInt() ?? 0,
|
||||
totalStudents: (json['total_students'] as num?)?.toInt() ?? 0,
|
||||
totalTeachers: (json['total_teachers'] as num?)?.toInt() ?? 0,
|
||||
grossMarginPercent: (json['gross_margin_percent'] as num?)?.toDouble() ?? 0,
|
||||
treasuryBalanceJod: (json['treasury_balance_jod'] as num?)?.toDouble() ?? 0,
|
||||
totalCliqInflowJod: (json['total_cliq_inflow_jod'] as num?)?.toDouble() ?? 0,
|
||||
pendingPayoutsCount: (json['pending_payouts_count'] as num?)?.toInt() ?? 0,
|
||||
r2BandwidthCostSavingsJod: (json['r2_cost_savings_jod'] as num?)?.toDouble() ?? 0,
|
||||
uptimePercent: (json['uptime_percent'] as num?)?.toDouble() ?? 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,16 @@ class AiClusterNodeModel {
|
||||
required this.latencyMs,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
factory AiClusterNodeModel.fromJson(Map<String, dynamic> json) => AiClusterNodeModel(
|
||||
nodeName: json['node_name']?.toString() ?? '',
|
||||
modelName: json['model_name']?.toString() ?? '',
|
||||
role: json['role']?.toString() ?? '',
|
||||
gpuVramUsageGb: (json['gpu_vram_usage_gb'] as num?)?.toDouble() ?? 0,
|
||||
gpuTotalVramGb: (json['gpu_total_vram_gb'] as num?)?.toDouble() ?? 0,
|
||||
latencyMs: (json['latency_ms'] as num?)?.toInt() ?? 0,
|
||||
status: json['status']?.toString() ?? 'unknown',
|
||||
);
|
||||
}
|
||||
|
||||
class PayoutQueueItemModel {
|
||||
@@ -83,6 +93,15 @@ class PayoutQueueItemModel {
|
||||
required this.requestedAt,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
factory PayoutQueueItemModel.fromJson(Map<String, dynamic> json) => PayoutQueueItemModel(
|
||||
id: (json['id'] as num?)?.toInt() ?? 0,
|
||||
teacherName: json['teacher_name']?.toString() ?? '',
|
||||
cliqAlias: json['cliq_alias']?.toString() ?? '',
|
||||
amountJod: (json['amount_jod'] as num?)?.toDouble() ?? 0,
|
||||
requestedAt: json['requested_at']?.toString() ?? '',
|
||||
status: json['status']?.toString() ?? 'unknown',
|
||||
);
|
||||
}
|
||||
|
||||
class SecurityIntegrityAlertModel {
|
||||
@@ -101,4 +120,13 @@ class SecurityIntegrityAlertModel {
|
||||
required this.severity,
|
||||
required this.timeAgo,
|
||||
});
|
||||
|
||||
factory SecurityIntegrityAlertModel.fromJson(Map<String, dynamic> json) => SecurityIntegrityAlertModel(
|
||||
alertId: json['alert_id']?.toString() ?? '',
|
||||
title: json['title']?.toString() ?? '',
|
||||
schoolName: json['school_name']?.toString() ?? '',
|
||||
details: json['details']?.toString() ?? '',
|
||||
severity: json['severity']?.toString() ?? 'info',
|
||||
timeAgo: json['time_ago']?.toString() ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user