summaryrefslogtreecommitdiffstats
path: root/server/src/db/community_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/db/community_view.rs')
-rw-r--r--server/src/db/community_view.rs41
1 files changed, 0 insertions, 41 deletions
diff --git a/server/src/db/community_view.rs b/server/src/db/community_view.rs
index 04b68441..157c4d91 100644
--- a/server/src/db/community_view.rs
+++ b/server/src/db/community_view.rs
@@ -59,22 +59,6 @@ table! {
}
}
-table! {
- site_view (id) {
- id -> Int4,
- name -> Varchar,
- description -> Nullable<Text>,
- creator_id -> Int4,
- published -> Timestamp,
- updated -> Nullable<Timestamp>,
- creator_name -> Varchar,
- number_of_users -> BigInt,
- number_of_posts -> BigInt,
- number_of_comments -> BigInt,
- number_of_communities -> BigInt,
- }
-}
-
#[derive(
Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize, QueryableByName, Clone,
)]
@@ -328,28 +312,3 @@ impl CommunityUserBanView {
.first::<Self>(conn)
}
}
-
-#[derive(
- Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize, QueryableByName, Clone,
-)]
-#[table_name = "site_view"]
-pub struct SiteView {
- pub id: i32,
- pub name: String,
- pub description: Option<String>,
- pub creator_id: i32,
- pub published: chrono::NaiveDateTime,
- pub updated: Option<chrono::NaiveDateTime>,
- pub creator_name: String,
- pub number_of_users: i64,
- pub number_of_posts: i64,
- pub number_of_comments: i64,
- pub number_of_communities: i64,
-}
-
-impl SiteView {
- pub fn read(conn: &PgConnection) -> Result<Self, Error> {
- use super::community_view::site_view::dsl::*;
- site_view.first::<Self>(conn)
- }
-}