summaryrefslogtreecommitdiffstats
path: root/server/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/db')
-rw-r--r--server/src/db/comment_view.rs7
-rw-r--r--server/src/db/post_view.rs5
2 files changed, 12 insertions, 0 deletions
diff --git a/server/src/db/comment_view.rs b/server/src/db/comment_view.rs
index d1b27a3c..75ed4cb7 100644
--- a/server/src/db/comment_view.rs
+++ b/server/src/db/comment_view.rs
@@ -28,6 +28,7 @@ table! {
creator_local -> Bool,
creator_name -> Varchar,
creator_avatar -> Nullable<Text>,
+ creator_published -> Timestamp,
score -> BigInt,
upvotes -> BigInt,
downvotes -> BigInt,
@@ -63,6 +64,7 @@ table! {
creator_local -> Bool,
creator_name -> Varchar,
creator_avatar -> Nullable<Text>,
+ creator_published -> Timestamp,
score -> BigInt,
upvotes -> BigInt,
downvotes -> BigInt,
@@ -101,6 +103,7 @@ pub struct CommentView {
pub creator_local: bool,
pub creator_name: String,
pub creator_avatar: Option<String>,
+ pub creator_published: chrono::NaiveDateTime,
pub score: i64,
pub upvotes: i64,
pub downvotes: i64,
@@ -314,6 +317,7 @@ table! {
creator_local -> Bool,
creator_name -> Varchar,
creator_avatar -> Nullable<Text>,
+ creator_published -> Timestamp,
score -> BigInt,
upvotes -> BigInt,
downvotes -> BigInt,
@@ -353,6 +357,7 @@ pub struct ReplyView {
pub creator_local: bool,
pub creator_name: String,
pub creator_avatar: Option<String>,
+ pub creator_published: chrono::NaiveDateTime,
pub score: i64,
pub upvotes: i64,
pub downvotes: i64,
@@ -576,6 +581,7 @@ mod tests {
published: inserted_comment.published,
updated: None,
creator_name: inserted_user.name.to_owned(),
+ creator_published: inserted_user.published,
creator_avatar: None,
score: 1,
downvotes: 0,
@@ -609,6 +615,7 @@ mod tests {
published: inserted_comment.published,
updated: None,
creator_name: inserted_user.name.to_owned(),
+ creator_published: inserted_user.published,
creator_avatar: None,
score: 1,
downvotes: 0,
diff --git a/server/src/db/post_view.rs b/server/src/db/post_view.rs
index 808cf28c..cda5cecf 100644
--- a/server/src/db/post_view.rs
+++ b/server/src/db/post_view.rs
@@ -28,6 +28,7 @@ table! {
creator_actor_id -> Text,
creator_local -> Bool,
creator_name -> Varchar,
+ creator_published -> Timestamp,
creator_avatar -> Nullable<Text>,
banned -> Bool,
banned_from_community -> Bool,
@@ -75,6 +76,7 @@ table! {
creator_actor_id -> Text,
creator_local -> Bool,
creator_name -> Varchar,
+ creator_published -> Timestamp,
creator_avatar -> Nullable<Text>,
banned -> Bool,
banned_from_community -> Bool,
@@ -125,6 +127,7 @@ pub struct PostView {
pub creator_actor_id: String,
pub creator_local: bool,
pub creator_name: String,
+ pub creator_published: chrono::NaiveDateTime,
pub creator_avatar: Option<String>,
pub banned: bool,
pub banned_from_community: bool,
@@ -499,6 +502,7 @@ mod tests {
body: None,
creator_id: inserted_user.id,
creator_name: user_name.to_owned(),
+ creator_published: inserted_user.published,
creator_avatar: None,
banned: false,
banned_from_community: false,
@@ -548,6 +552,7 @@ mod tests {
stickied: false,
creator_id: inserted_user.id,
creator_name: user_name,
+ creator_published: inserted_user.published,
creator_avatar: None,
banned: false,
banned_from_community: false,