7 description -> Nullable<Text>,
9 published -> Timestamp,
10 updated -> Nullable<Timestamp>,
11 enable_downvotes -> Bool,
12 open_registration -> Bool,
14 creator_name -> Varchar,
15 creator_avatar -> Nullable<Text>,
16 number_of_users -> BigInt,
17 number_of_posts -> BigInt,
18 number_of_comments -> BigInt,
19 number_of_communities -> BigInt,
24 Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize, QueryableByName, Clone,
26 #[table_name = "site_view"]
30 pub description: Option<String>,
32 pub published: chrono::NaiveDateTime,
33 pub updated: Option<chrono::NaiveDateTime>,
34 pub enable_downvotes: bool,
35 pub open_registration: bool,
36 pub enable_nsfw: bool,
37 pub creator_name: String,
38 pub creator_avatar: Option<String>,
39 pub number_of_users: i64,
40 pub number_of_posts: i64,
41 pub number_of_comments: i64,
42 pub number_of_communities: i64,
46 pub fn read(conn: &PgConnection) -> Result<Self, Error> {
47 use super::site_view::site_view::dsl::*;
48 site_view.first::<Self>(conn)