chore(models/schema): Update with author fields
This commit is contained in:
parent
249f17b60a
commit
115f50ae37
2 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,8 @@ pub struct Thread {
|
||||||
pub title: String,
|
pub title: String,
|
||||||
pub body: String,
|
pub body: String,
|
||||||
pub posted: DateTime<Utc>,
|
pub posted: DateTime<Utc>,
|
||||||
|
pub author_name: String,
|
||||||
|
pub author_email: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Identifiable, Queryable, Serialize, Associations)]
|
#[derive(Identifiable, Queryable, Serialize, Associations)]
|
||||||
|
@ -16,6 +18,8 @@ pub struct Post {
|
||||||
pub thread_id: i32,
|
pub thread_id: i32,
|
||||||
pub body: String,
|
pub body: String,
|
||||||
pub posted: DateTime<Utc>,
|
pub posted: DateTime<Utc>,
|
||||||
|
pub author_name: String,
|
||||||
|
pub author_email: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Insertable)]
|
#[derive(Deserialize, Insertable)]
|
||||||
|
|
|
@ -4,6 +4,8 @@ table! {
|
||||||
thread_id -> Int4,
|
thread_id -> Int4,
|
||||||
body -> Text,
|
body -> Text,
|
||||||
posted -> Timestamptz,
|
posted -> Timestamptz,
|
||||||
|
author_name -> Varchar,
|
||||||
|
author_email -> Varchar,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +15,8 @@ table! {
|
||||||
title -> Varchar,
|
title -> Varchar,
|
||||||
body -> Text,
|
body -> Text,
|
||||||
posted -> Timestamptz,
|
posted -> Timestamptz,
|
||||||
|
author_name -> Varchar,
|
||||||
|
author_email -> Varchar,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue