|
@@ -5,10 +5,12 @@ mod service;
|
|
|
use sea_orm::{ConnectionTrait, DatabaseConnection, Statement, TransactionTrait};
|
|
|
use std::fs::{self, File};
|
|
|
use std::sync::Arc;
|
|
|
+use tauri::State;
|
|
|
use tauri::{AppHandle, Manager, path::BaseDirectory};
|
|
|
|
|
|
+type CmdState<'a> = State<'a, AppState>;
|
|
|
type CmdResult<T> = Result<T, String>;
|
|
|
-// 添加 AppState 结构体
|
|
|
+
|
|
|
#[derive(Default)]
|
|
|
pub struct AppState {
|
|
|
pub conn: Arc<DatabaseConnection>,
|