user, role, post db
This commit is contained in:
parent
20af44c357
commit
ee9015c1e3
15 changed files with 210 additions and 74 deletions
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue