41 lines
851 B
TypeScript
41 lines
851 B
TypeScript
import { ReactNode } from 'react';
|
|
import { View } from './common.ts';
|
|
|
|
export interface Kpi {
|
|
title: string;
|
|
value: number;
|
|
unit: string;
|
|
icon: ReactNode;
|
|
trend: number[];
|
|
trendDates?: string[];
|
|
status: 'ok' | 'warning' | 'critical';
|
|
targetView?: View;
|
|
disclaimer?: string;
|
|
effectiveDate?: Date;
|
|
showDateDisclaimer?: boolean;
|
|
}
|
|
|
|
export interface CoopZone {
|
|
id: string;
|
|
density: number; // kg/m^2
|
|
count: number;
|
|
}
|
|
|
|
export interface EnvironmentData {
|
|
time: string;
|
|
Suhu: number;
|
|
Kelembapan: number;
|
|
Amonia: number;
|
|
}
|
|
|
|
export interface AiInsight {
|
|
/** Legacy single-insight cache entry */
|
|
text?: string;
|
|
/** Static pool of pre-generated insights */
|
|
insights?: string[];
|
|
currentIndex?: number;
|
|
generatedAt: Date;
|
|
kandangId: string | null;
|
|
version: string; // For cache invalidation if prompt changes
|
|
}
|