85 lines
2.0 KiB
Rust
85 lines
2.0 KiB
Rust
|
|
use serde::{Deserialize, Serialize};
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct Project {
|
||
|
|
pub id: String,
|
||
|
|
pub name: String,
|
||
|
|
pub created_at: String,
|
||
|
|
pub updated_at: String,
|
||
|
|
pub settings: Option<String>,
|
||
|
|
pub status: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct MediaFile {
|
||
|
|
pub id: String,
|
||
|
|
pub project_id: String,
|
||
|
|
pub file_path: String,
|
||
|
|
pub file_hash: Option<String>,
|
||
|
|
pub duration_ms: Option<i64>,
|
||
|
|
pub sample_rate: Option<i32>,
|
||
|
|
pub channels: Option<i32>,
|
||
|
|
pub format: Option<String>,
|
||
|
|
pub file_size: Option<i64>,
|
||
|
|
pub created_at: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct Speaker {
|
||
|
|
pub id: String,
|
||
|
|
pub project_id: String,
|
||
|
|
pub label: String,
|
||
|
|
pub display_name: Option<String>,
|
||
|
|
pub color: Option<String>,
|
||
|
|
pub metadata: Option<String>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct Segment {
|
||
|
|
pub id: String,
|
||
|
|
pub project_id: String,
|
||
|
|
pub media_file_id: String,
|
||
|
|
pub speaker_id: Option<String>,
|
||
|
|
pub start_ms: i64,
|
||
|
|
pub end_ms: i64,
|
||
|
|
pub text: String,
|
||
|
|
pub original_text: Option<String>,
|
||
|
|
pub confidence: Option<f64>,
|
||
|
|
pub is_edited: bool,
|
||
|
|
pub edited_at: Option<String>,
|
||
|
|
pub segment_index: i32,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct Word {
|
||
|
|
pub id: String,
|
||
|
|
pub segment_id: String,
|
||
|
|
pub word: String,
|
||
|
|
pub start_ms: i64,
|
||
|
|
pub end_ms: i64,
|
||
|
|
pub confidence: Option<f64>,
|
||
|
|
pub word_index: i32,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct AiOutput {
|
||
|
|
pub id: String,
|
||
|
|
pub project_id: String,
|
||
|
|
pub output_type: String,
|
||
|
|
pub prompt: Option<String>,
|
||
|
|
pub content: String,
|
||
|
|
pub provider: Option<String>,
|
||
|
|
pub created_at: String,
|
||
|
|
pub metadata: Option<String>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
|
|
pub struct Annotation {
|
||
|
|
pub id: String,
|
||
|
|
pub project_id: String,
|
||
|
|
pub start_ms: i64,
|
||
|
|
pub end_ms: Option<i64>,
|
||
|
|
pub text: String,
|
||
|
|
pub annotation_type: String,
|
||
|
|
}
|