feat(room): read model_id in search results, register m20260420_000003 migration
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions

This commit is contained in:
ZhenYi 2026-04-20 16:08:35 +08:00
parent 3c8e9e3674
commit d4b0a9ae67
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,7 @@
pub use sea_orm_migration::prelude::*; pub use sea_orm_migration::prelude::*;
mod m20260420_000003_add_model_id_to_room_message;
pub async fn execute_sql(manager: &SchemaManager<'_>, sql: &str) -> Result<(), DbErr> { pub async fn execute_sql(manager: &SchemaManager<'_>, sql: &str) -> Result<(), DbErr> {
for stmt in split_sql_statements(sql) { for stmt in split_sql_statements(sql) {
if stmt.is_empty() { if stmt.is_empty() {

View File

@ -119,6 +119,7 @@ impl RoomService {
room: row.try_get::<RoomId>("", "room").unwrap_or_default(), room: row.try_get::<RoomId>("", "room").unwrap_or_default(),
sender_type, sender_type,
sender_id: row.try_get::<Option<UserId>>("", "sender_id").ok().flatten(), sender_id: row.try_get::<Option<UserId>>("", "sender_id").ok().flatten(),
model_id: row.try_get::<Option<Uuid>>("", "model_id").ok().flatten(),
thread: row.try_get::<Option<RoomThreadId>>("", "thread").ok().flatten(), thread: row.try_get::<Option<RoomThreadId>>("", "thread").ok().flatten(),
in_reply_to: row.try_get::<Option<MessageId>>("", "in_reply_to").ok().flatten(), in_reply_to: row.try_get::<Option<MessageId>>("", "in_reply_to").ok().flatten(),
content: row.try_get::<String>("", "content").unwrap_or_default(), content: row.try_get::<String>("", "content").unwrap_or_default(),