chore: 编译器警告清理 — 22 条全部消除,workspace 零警告
erp-ai(8): 移除未用 import + serde 结构体 #[allow(dead_code)] erp-plugin(5): 移除未用 import + FromQueryResult 结构体允许 erp-health(8): 移除未用 import/变量 + FromQueryResult 字段允许 erp-server(1): AnalyticsEvent.timestamp 允许(未来分析集成)
This commit is contained in:
@@ -459,6 +459,7 @@ impl PluginDataService {
|
||||
rel_table, fk
|
||||
);
|
||||
#[derive(FromQueryResult)]
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要 chk 字段,仅检查是否存在
|
||||
struct RefCheck { chk: Option<i32> }
|
||||
let has_ref = RefCheck::find_by_statement(Statement::from_sql_and_values(
|
||||
sea_orm::DatabaseBackend::Postgres,
|
||||
@@ -771,6 +772,7 @@ impl PluginDataService {
|
||||
rel_table, fk
|
||||
);
|
||||
#[derive(FromQueryResult)]
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要 chk 字段,仅检查是否存在
|
||||
struct RefCheck { chk: Option<i32> }
|
||||
let has_ref = RefCheck::find_by_statement(Statement::from_sql_and_values(
|
||||
sea_orm::DatabaseBackend::Postgres,
|
||||
@@ -1168,6 +1170,7 @@ impl PluginDataService {
|
||||
let col = sanitize_identifier(&field.name);
|
||||
|
||||
#[derive(FromQueryResult)]
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要 id 字段,通过 is_some 检查
|
||||
struct RefRow {
|
||||
id: Uuid,
|
||||
// 动态列 — SeaORM 无法直接映射,用 JSON 构建
|
||||
@@ -1530,6 +1533,7 @@ async fn validate_ref_entities(
|
||||
ref_table
|
||||
);
|
||||
#[derive(FromQueryResult)]
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要 check_result 字段,仅检查是否存在
|
||||
struct ExistsCheck { check_result: Option<i32> }
|
||||
let result = ExistsCheck::find_by_statement(Statement::from_sql_and_values(
|
||||
sea_orm::DatabaseBackend::Postgres,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use sea_orm::{ConnectionTrait, DatabaseConnection};
|
||||
use sea_orm::DatabaseConnection;
|
||||
use uuid::Uuid;
|
||||
use wasmtime::StoreLimits;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user