notesmachine/server/nm-store/src/structs.rs

28 lines
665 B
Rust
Raw Normal View History

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::{self, FromRow};
#[derive(Clone, Serialize, Deserialize, Debug, FromRow)]
pub struct RawPage {
id: i64,
slug: String,
title: String,
note_id: i64,
creation_date: DateTime<Utc>,
updated_date: DateTime<Utc>,
lastview_date: DateTime<Utc>,
deleted_date: DateTime<Utc>,
}
#[derive(Clone, Serialize, Deserialize, Debug, FromRow)]
pub struct RawNote {
id: i64,
uuid: String,
content: String,
notetype: String,
creation_date: DateTime<Utc>,
updated_date: DateTime<Utc>,
lastview_date: DateTime<Utc>,
deleted_date: DateTime<Utc>,
}