omni_orchestrator/schemas/v1/models/
util_tables.rs

1use serde::{Deserialize, Serialize};
2use chrono::{DateTime, NaiveDateTime, Utc};
3use sqlx::FromRow;
4
5/// Represents a resource type in the system.
6#[derive(Debug, FromRow, Serialize, Deserialize, Clone)]
7
8pub struct ResourceType {
9    /// Unique identifier
10    pub id: i32,
11    /// Name of the resource type (e.g., 'cpu_usage', 'memory_usage')
12    pub name: String,
13    /// Category of the resource (e.g., 'compute', 'storage', 'network')
14    pub category: String,
15    /// Unit of measurement (e.g., 'vCPU-hour', 'GB-month')
16    pub unit_of_measurement: String,
17    /// Optional description of the resource type
18    pub description: Option<String>,
19    /// Creation timestamp
20    pub created_at: DateTime<Utc>,
21    /// Last update timestamp
22    pub updated_at: DateTime<Utc>,
23}