29 lines
842 B
Rust
29 lines
842 B
Rust
use crate::{DateTimeUtc, Uuid};
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "ai_subagent_session")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: Uuid,
|
|
pub conversation_id: Uuid,
|
|
pub message_id: Uuid,
|
|
pub children_id: String,
|
|
pub role: String,
|
|
pub task: String,
|
|
#[sea_orm(column_type = "Text")]
|
|
pub output: String,
|
|
pub input_tokens: i64,
|
|
pub output_tokens: i64,
|
|
pub model_name: Option<String>,
|
|
pub status: String,
|
|
#[sea_orm(column_type = "Text", nullable)]
|
|
pub error_message: Option<String>,
|
|
pub created_at: DateTimeUtc,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {} |