user, role, post db

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-12-04 23:17:19 +03:00
parent 20af44c357
commit ee9015c1e3
15 changed files with 210 additions and 74 deletions

View file

@ -1,13 +1,9 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
pub struct Post {
pub poster_email: String,
pub creation_time: DateTime<Utc>,
pub poster_id: i64,
pub post: String,
}
impl Post {
pub async fn new(poster_email: String, post: String) -> Self {
Self { poster_email, post }
}
}