95 lines
2.2 KiB
TypeScript
95 lines
2.2 KiB
TypeScript
/** Accuracy % or N/A (null) for IoT vs manual report cells. */
|
|
export type ReportAccuracy = number | null;
|
|
|
|
export interface DashboardReportCountingRow {
|
|
date: string;
|
|
day: number;
|
|
countBefore: number | null;
|
|
mortality: number | null;
|
|
harvest: number | null;
|
|
harvestWeight: number | null;
|
|
countAfter: number | null;
|
|
iotCount: number | null;
|
|
accuracy: ReportAccuracy;
|
|
}
|
|
|
|
export interface DashboardReportWeightRow {
|
|
date: string;
|
|
day: number;
|
|
avgManual: number | null;
|
|
avgIot: number | null;
|
|
uniformity: number | null;
|
|
difference: number | null;
|
|
accuracy: ReportAccuracy;
|
|
}
|
|
|
|
export interface DashboardReportFeedInRow {
|
|
date: string;
|
|
manualIn: number | null;
|
|
iotIn: number | null;
|
|
accuracy: ReportAccuracy;
|
|
}
|
|
|
|
export interface DashboardReportFeedUseRow {
|
|
date: string;
|
|
day: number;
|
|
manualUse: number | null;
|
|
iotUse: number | null;
|
|
accuracy: ReportAccuracy;
|
|
}
|
|
|
|
export type DashboardReportType = 'daily' | 'end_cycle';
|
|
|
|
export interface DashboardReportFcrRow {
|
|
day: number;
|
|
iotFcr: number | null;
|
|
feedTotal: number | null;
|
|
iotWeight: number | null;
|
|
chickenLife: number | null;
|
|
harvestWeightTotal: number | null;
|
|
}
|
|
|
|
export interface DashboardReportEefRow {
|
|
day: number;
|
|
iotEef: number | null;
|
|
chickenLifePercentage: number | null;
|
|
iotAverageHarvestBw: number | null;
|
|
iotAverageDayWeight: number | null;
|
|
iotFcr: number | null;
|
|
}
|
|
|
|
export interface DashboardReportPayload {
|
|
cycleId: string;
|
|
kandangId: number;
|
|
kandangName: string;
|
|
area: string;
|
|
upToDay: number;
|
|
generatedAt: string;
|
|
reportType?: DashboardReportType;
|
|
counting: DashboardReportCountingRow[];
|
|
weight: DashboardReportWeightRow[];
|
|
feedIn: DashboardReportFeedInRow[];
|
|
feedUse: DashboardReportFeedUseRow[];
|
|
fcr?: DashboardReportFcrRow[];
|
|
eef?: DashboardReportEefRow[];
|
|
}
|
|
|
|
export interface DashboardReportSnapshotRecord {
|
|
id: number;
|
|
cycleId: string;
|
|
kandangId: number;
|
|
upToDay: number;
|
|
generatedAt: string;
|
|
reportType?: DashboardReportType;
|
|
payload: DashboardReportPayload;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface DashboardReportSnapshotResponse {
|
|
success: boolean;
|
|
data: DashboardReportSnapshotRecord | null;
|
|
message?: string;
|
|
error?: string;
|
|
}
|