2 schema::{person, person_alias_1, person_alias_2},
8 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
9 #[table_name = "person"]
13 pub display_name: Option<String>,
14 pub avatar: Option<DbUrl>,
16 pub published: chrono::NaiveDateTime,
17 pub updated: Option<chrono::NaiveDateTime>,
19 pub bio: Option<String>,
21 pub private_key: Option<String>,
22 pub public_key: Option<String>,
23 pub last_refreshed_at: chrono::NaiveDateTime,
24 pub banner: Option<DbUrl>,
27 pub shared_inbox_url: Option<DbUrl>,
28 pub matrix_user_id: Option<String>,
30 pub bot_account: bool,
33 /// A safe representation of person, without the sensitive info
34 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
35 #[table_name = "person"]
36 pub struct PersonSafe {
39 pub display_name: Option<String>,
40 pub avatar: Option<DbUrl>,
42 pub published: chrono::NaiveDateTime,
43 pub updated: Option<chrono::NaiveDateTime>,
45 pub bio: Option<String>,
47 pub banner: Option<DbUrl>,
50 pub shared_inbox_url: Option<DbUrl>,
51 pub matrix_user_id: Option<String>,
53 pub bot_account: bool,
56 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
57 #[table_name = "person_alias_1"]
58 pub struct PersonAlias1 {
61 pub display_name: Option<String>,
62 pub avatar: Option<DbUrl>,
64 pub published: chrono::NaiveDateTime,
65 pub updated: Option<chrono::NaiveDateTime>,
67 pub bio: Option<String>,
69 pub private_key: Option<String>,
70 pub public_key: Option<String>,
71 pub last_refreshed_at: chrono::NaiveDateTime,
72 pub banner: Option<DbUrl>,
75 pub shared_inbox_url: Option<DbUrl>,
76 pub matrix_user_id: Option<String>,
78 pub bot_account: bool,
81 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
82 #[table_name = "person_alias_1"]
83 pub struct PersonSafeAlias1 {
86 pub display_name: Option<String>,
87 pub avatar: Option<DbUrl>,
89 pub published: chrono::NaiveDateTime,
90 pub updated: Option<chrono::NaiveDateTime>,
92 pub bio: Option<String>,
94 pub banner: Option<DbUrl>,
97 pub shared_inbox_url: Option<DbUrl>,
98 pub matrix_user_id: Option<String>,
100 pub bot_account: bool,
103 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
104 #[table_name = "person_alias_2"]
105 pub struct PersonAlias2 {
108 pub display_name: Option<String>,
109 pub avatar: Option<DbUrl>,
111 pub published: chrono::NaiveDateTime,
112 pub updated: Option<chrono::NaiveDateTime>,
114 pub bio: Option<String>,
116 pub private_key: Option<String>,
117 pub public_key: Option<String>,
118 pub last_refreshed_at: chrono::NaiveDateTime,
119 pub banner: Option<DbUrl>,
121 pub inbox_url: DbUrl,
122 pub shared_inbox_url: Option<DbUrl>,
123 pub matrix_user_id: Option<String>,
125 pub bot_account: bool,
128 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
129 #[table_name = "person_alias_1"]
130 pub struct PersonSafeAlias2 {
133 pub display_name: Option<String>,
134 pub avatar: Option<DbUrl>,
136 pub published: chrono::NaiveDateTime,
137 pub updated: Option<chrono::NaiveDateTime>,
139 pub bio: Option<String>,
141 pub banner: Option<DbUrl>,
143 pub inbox_url: DbUrl,
144 pub shared_inbox_url: Option<DbUrl>,
145 pub matrix_user_id: Option<String>,
147 pub bot_account: bool,
150 #[derive(Insertable, AsChangeset, Clone, Default)]
151 #[table_name = "person"]
152 pub struct PersonForm {
154 pub display_name: Option<Option<String>>,
155 pub avatar: Option<Option<DbUrl>>,
156 pub banned: Option<bool>,
157 pub published: Option<chrono::NaiveDateTime>,
158 pub updated: Option<chrono::NaiveDateTime>,
159 pub actor_id: Option<DbUrl>,
160 pub bio: Option<Option<String>>,
161 pub local: Option<bool>,
162 pub private_key: Option<Option<String>>,
163 pub public_key: Option<Option<String>>,
164 pub last_refreshed_at: Option<chrono::NaiveDateTime>,
165 pub banner: Option<Option<DbUrl>>,
166 pub deleted: Option<bool>,
167 pub inbox_url: Option<DbUrl>,
168 pub shared_inbox_url: Option<Option<DbUrl>>,
169 pub matrix_user_id: Option<Option<String>>,
170 pub admin: Option<bool>,
171 pub bot_account: Option<bool>,