29 lines
880 B
Rust
29 lines
880 B
Rust
use crate::models::common::{AgentType, Status, Visibility};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct Agent {
|
|
pub id: Uuid,
|
|
pub owner_id: Uuid,
|
|
pub workspace_id: Option<Uuid>,
|
|
pub name: String,
|
|
pub slug: String,
|
|
pub description: Option<String>,
|
|
pub avatar_url: Option<String>,
|
|
pub agent_type: AgentType,
|
|
pub status: Status,
|
|
pub visibility: Visibility,
|
|
pub default_model_id: Option<Uuid>,
|
|
pub current_version_id: Option<Uuid>,
|
|
pub system_prompt: Option<String>,
|
|
pub tools: Vec<String>,
|
|
pub tags: Vec<String>,
|
|
pub enabled: bool,
|
|
pub last_run_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
pub deleted_at: Option<DateTime<Utc>>,
|
|
}
|