Refactor: Remove unused structs, redundant services, and streamline repository models
This commit is contained in:
@@ -58,18 +58,18 @@ pub struct GuideLineQuery {
|
||||
}
|
||||
|
||||
pub struct GuideLineAIQuery {
|
||||
pub user_id: String,
|
||||
pub book_id: String,
|
||||
pub _user_id: String,
|
||||
pub _book_id: String,
|
||||
pub global_resume: Option<String>,
|
||||
pub themes: Option<String>,
|
||||
pub verbe_tense: Option<i64>,
|
||||
pub narrative_type: Option<i64>,
|
||||
pub langue: Option<i64>,
|
||||
pub dialogue_type: Option<i64>,
|
||||
pub tone: Option<String>,
|
||||
pub _tone: Option<String>,
|
||||
pub atmosphere: Option<String>,
|
||||
pub current_resume: Option<String>,
|
||||
pub meta: String,
|
||||
pub _meta: String,
|
||||
}
|
||||
|
||||
/// Fetches the guideline for a specific book.
|
||||
@@ -211,8 +211,8 @@ pub fn fetch_guide_line_ai(conn: &Connection, user_id: &str, book_id: &str, lang
|
||||
global_resume: query_row.get(2)?, atmosphere: query_row.get(3)?,
|
||||
verbe_tense: query_row.get(4)?, langue: query_row.get(5)?,
|
||||
themes: query_row.get(6)?, current_resume: query_row.get(7)?,
|
||||
user_id: user_id.to_string(), book_id: book_id.to_string(),
|
||||
tone: None, meta: String::new(),
|
||||
_user_id: user_id.to_string(), _book_id: book_id.to_string(),
|
||||
_tone: None, _meta: String::new(),
|
||||
})
|
||||
})
|
||||
.map_err(|error| match error {
|
||||
|
||||
@@ -8,16 +8,6 @@ use crate::error::{AppError, AppResult};
|
||||
use crate::helpers::timestamp_in_seconds;
|
||||
use crate::shared::types::Lang;
|
||||
|
||||
/// Represents the synced guideline data for a book.
|
||||
pub struct SyncedGuideLine {
|
||||
pub last_update: i64,
|
||||
}
|
||||
|
||||
/// Represents the synced AI guideline data for a book.
|
||||
pub struct SyncedAIGuideLine {
|
||||
pub last_update: i64,
|
||||
}
|
||||
|
||||
/// Represents the decrypted guideline properties for a book.
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user