use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::FromRow;
use uuid::Uuid;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FromRow)]
pub struct AgentSessionModel {
    pub id: Uuid,
    pub user: Option<Uuid>,
    pub wk: Option<Uuid>,
    pub name: String,
    pub description: Option<String>,
    pub agent_kind: String,
    pub model_version: Option<Uuid>,
    pub system_prompt: Option<String>,
    pub temperature: Option<f32>,
    pub max_output_tokens: Option<i32>,
    pub tool_policy: Option<String>,
    pub knowledge_base_ids: Option<String>,
    pub variables: Option<String>,
    pub visibility: String,
    pub version: i32,
    pub published_at: Option<DateTime<Utc>>,
    pub rollback_from_version: Option<i32>,
    pub enabled: bool,
    pub source: Option<String>,
    pub parent_session_id: Option<Uuid>,
    pub toolset_json: Option<String>,
    pub memory_provider: Option<String>,
    pub memory_provider_config: Option<String>,
    pub iteration_budget: Option<i32>,
    pub created_by: Uuid,
    pub created_at: DateTime<Utc>,
    pub updated_at: DateTime<Utc>,
    pub deleted_at: Option<DateTime<Utc>>,
}
