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)]

View file

@ -4,6 +4,8 @@ table! {
thread_id -> Int4,
body -> Text,
posted -> Timestamptz,
author_name -> Varchar,
author_email -> Varchar,
}
}
@ -13,6 +15,8 @@ table! {
title -> Varchar,
body -> Text,
posted -> Timestamptz,
author_name -> Varchar,
author_email -> Varchar,
}
}