chore(models/schema): Update with author fields

This commit is contained in:
Vincent Ambo 2018-04-08 22:37:21 +02:00
parent 249f17b60a
commit 115f50ae37
2 changed files with 8 additions and 0 deletions

View file

@ -7,6 +7,8 @@ pub struct Thread {
pub title: String,
pub body: String,
pub posted: DateTime<Utc>,
pub author_name: String,
pub author_email: String,
}
#[derive(Identifiable, Queryable, Serialize, Associations)]
@ -16,6 +18,8 @@ pub struct Post {
pub thread_id: i32,
pub body: String,
pub posted: DateTime<Utc>,
pub author_name: String,
pub author_email: String,
}
#[derive(Deserialize, Insertable)]