20 lines
614 B
Rust
20 lines
614 B
Rust
use crate::models::common::EventType;
|
|
use crate::models::json_types::{AgentEventFilters, TypedJson};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct AgentEventSubscription {
|
|
pub id: Uuid,
|
|
pub agent_id: Uuid,
|
|
pub workspace_id: Option<Uuid>,
|
|
pub repo_id: Option<Uuid>,
|
|
pub event_type: EventType,
|
|
pub filters: Option<TypedJson<AgentEventFilters>>,
|
|
pub enabled: bool,
|
|
pub created_by: Uuid,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
}
|