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>,
32 /// A safe representation of person, without the sensitive info
33 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
34 #[table_name = "person"]
35 pub struct PersonSafe {
38 pub display_name: Option<String>,
39 pub avatar: Option<DbUrl>,
41 pub published: chrono::NaiveDateTime,
42 pub updated: Option<chrono::NaiveDateTime>,
44 pub bio: Option<String>,
46 pub banner: Option<DbUrl>,
49 pub shared_inbox_url: Option<DbUrl>,
50 pub matrix_user_id: Option<String>,
54 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
55 #[table_name = "person_alias_1"]
56 pub struct PersonAlias1 {
59 pub display_name: Option<String>,
60 pub avatar: Option<DbUrl>,
62 pub published: chrono::NaiveDateTime,
63 pub updated: Option<chrono::NaiveDateTime>,
65 pub bio: Option<String>,
67 pub private_key: Option<String>,
68 pub public_key: Option<String>,
69 pub last_refreshed_at: chrono::NaiveDateTime,
70 pub banner: Option<DbUrl>,
73 pub shared_inbox_url: Option<DbUrl>,
74 pub matrix_user_id: Option<String>,
78 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
79 #[table_name = "person_alias_1"]
80 pub struct PersonSafeAlias1 {
83 pub display_name: Option<String>,
84 pub avatar: Option<DbUrl>,
86 pub published: chrono::NaiveDateTime,
87 pub updated: Option<chrono::NaiveDateTime>,
89 pub bio: Option<String>,
91 pub banner: Option<DbUrl>,
94 pub shared_inbox_url: Option<DbUrl>,
95 pub matrix_user_id: Option<String>,
99 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
100 #[table_name = "person_alias_2"]
101 pub struct PersonAlias2 {
104 pub display_name: Option<String>,
105 pub avatar: Option<DbUrl>,
107 pub published: chrono::NaiveDateTime,
108 pub updated: Option<chrono::NaiveDateTime>,
110 pub bio: Option<String>,
112 pub private_key: Option<String>,
113 pub public_key: Option<String>,
114 pub last_refreshed_at: chrono::NaiveDateTime,
115 pub banner: Option<DbUrl>,
117 pub inbox_url: DbUrl,
118 pub shared_inbox_url: Option<DbUrl>,
119 pub matrix_user_id: Option<String>,
123 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
124 #[table_name = "person_alias_1"]
125 pub struct PersonSafeAlias2 {
128 pub display_name: Option<String>,
129 pub avatar: Option<DbUrl>,
131 pub published: chrono::NaiveDateTime,
132 pub updated: Option<chrono::NaiveDateTime>,
134 pub bio: Option<String>,
136 pub banner: Option<DbUrl>,
138 pub inbox_url: DbUrl,
139 pub shared_inbox_url: Option<DbUrl>,
140 pub matrix_user_id: Option<String>,
144 #[derive(Insertable, AsChangeset, Clone, Default)]
145 #[table_name = "person"]
146 pub struct PersonForm {
148 pub display_name: Option<Option<String>>,
149 pub avatar: Option<Option<DbUrl>>,
150 pub banned: Option<bool>,
151 pub published: Option<chrono::NaiveDateTime>,
152 pub updated: Option<chrono::NaiveDateTime>,
153 pub actor_id: Option<DbUrl>,
154 pub bio: Option<Option<String>>,
155 pub local: Option<bool>,
156 pub private_key: Option<Option<String>>,
157 pub public_key: Option<Option<String>>,
158 pub last_refreshed_at: Option<chrono::NaiveDateTime>,
159 pub banner: Option<Option<DbUrl>>,
160 pub deleted: Option<bool>,
161 pub inbox_url: Option<DbUrl>,
162 pub shared_inbox_url: Option<Option<DbUrl>>,
163 pub matrix_user_id: Option<Option<String>>,
164 pub admin: Option<bool>,