Rewrite to rust init

This commit is contained in:
2023-08-11 01:11:27 +02:00
parent 22d8b33bf4
commit 9acdb20463
84 changed files with 28739 additions and 4196 deletions

View File

@@ -0,0 +1,24 @@
use serde::Serialize;
use crate::prisma::author_annotation;
#[derive(Serialize)]
pub struct AuthorAnnotation {
pub id: i32,
pub title: String,
pub text: String,
pub file: Option<String>
}
impl From<author_annotation::Data> for AuthorAnnotation {
fn from(val: author_annotation::Data) -> Self {
let author_annotation::Data { id, title, text, file, .. } = val;
AuthorAnnotation {
id,
title,
text,
file
}
}
}