mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-08 09:30:43 +01:00
Move to sqlx
This commit is contained in:
@@ -1,17 +1,7 @@
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::prisma::source;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[derive(sqlx::FromRow, sqlx::Type, Serialize)]
|
||||
pub struct Source {
|
||||
pub id: i32,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl From<source::Data> for Source {
|
||||
fn from(val: source::Data) -> Self {
|
||||
let source::Data { id, name, .. } = val;
|
||||
|
||||
Source { id, name }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user