Files
appks/models/agents/agent_schedules.rs
T
2026-06-07 11:30:56 +08:00

23 lines
705 B
Rust

use crate::models::json_types::{AgentSchedulePayload, TypedJson};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
pub struct AgentSchedule {
pub id: Uuid,
pub agent_id: Uuid,
pub workspace_id: Option<Uuid>,
pub repo_id: Option<Uuid>,
pub name: String,
pub cron_expr: String,
pub timezone: String,
pub payload: Option<TypedJson<AgentSchedulePayload>>,
pub enabled: bool,
pub last_run_at: Option<DateTime<Utc>>,
pub next_run_at: Option<DateTime<Utc>>,
pub created_by: Uuid,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}