2 schema::{person, person_alias_1, person_alias_2},
8 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
9 #[table_name = "person"]
13 pub preferred_username: 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>,
31 /// A safe representation of person, without the sensitive info
32 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
33 #[table_name = "person"]
34 pub struct PersonSafe {
37 pub preferred_username: Option<String>,
38 pub avatar: Option<DbUrl>,
40 pub published: chrono::NaiveDateTime,
41 pub updated: Option<chrono::NaiveDateTime>,
43 pub bio: Option<String>,
45 pub banner: Option<DbUrl>,
48 pub shared_inbox_url: Option<DbUrl>,
49 pub matrix_user_id: Option<String>,
52 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
53 #[table_name = "person_alias_1"]
54 pub struct PersonAlias1 {
57 pub preferred_username: Option<String>,
58 pub avatar: Option<DbUrl>,
60 pub published: chrono::NaiveDateTime,
61 pub updated: Option<chrono::NaiveDateTime>,
63 pub bio: Option<String>,
65 pub private_key: Option<String>,
66 pub public_key: Option<String>,
67 pub last_refreshed_at: chrono::NaiveDateTime,
68 pub banner: Option<DbUrl>,
71 pub shared_inbox_url: Option<DbUrl>,
72 pub matrix_user_id: Option<String>,
75 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
76 #[table_name = "person_alias_1"]
77 pub struct PersonSafeAlias1 {
80 pub preferred_username: Option<String>,
81 pub avatar: Option<DbUrl>,
83 pub published: chrono::NaiveDateTime,
84 pub updated: Option<chrono::NaiveDateTime>,
86 pub bio: Option<String>,
88 pub banner: Option<DbUrl>,
91 pub shared_inbox_url: Option<DbUrl>,
92 pub matrix_user_id: Option<String>,
95 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
96 #[table_name = "person_alias_2"]
97 pub struct PersonAlias2 {
100 pub preferred_username: Option<String>,
101 pub avatar: Option<DbUrl>,
103 pub published: chrono::NaiveDateTime,
104 pub updated: Option<chrono::NaiveDateTime>,
106 pub bio: Option<String>,
108 pub private_key: Option<String>,
109 pub public_key: Option<String>,
110 pub last_refreshed_at: chrono::NaiveDateTime,
111 pub banner: Option<DbUrl>,
113 pub inbox_url: DbUrl,
114 pub shared_inbox_url: Option<DbUrl>,
115 pub matrix_user_id: Option<String>,
118 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
119 #[table_name = "person_alias_1"]
120 pub struct PersonSafeAlias2 {
123 pub preferred_username: Option<String>,
124 pub avatar: Option<DbUrl>,
126 pub published: chrono::NaiveDateTime,
127 pub updated: Option<chrono::NaiveDateTime>,
129 pub bio: Option<String>,
131 pub banner: Option<DbUrl>,
133 pub inbox_url: DbUrl,
134 pub shared_inbox_url: Option<DbUrl>,
135 pub matrix_user_id: Option<String>,
138 #[derive(Insertable, AsChangeset, Clone, Default)]
139 #[table_name = "person"]
140 pub struct PersonForm {
142 pub preferred_username: Option<Option<String>>,
143 pub avatar: Option<Option<DbUrl>>,
144 pub banned: Option<bool>,
145 pub published: Option<chrono::NaiveDateTime>,
146 pub updated: Option<chrono::NaiveDateTime>,
147 pub actor_id: Option<DbUrl>,
148 pub bio: Option<Option<String>>,
149 pub local: Option<bool>,
150 pub private_key: Option<Option<String>>,
151 pub public_key: Option<Option<String>>,
152 pub last_refreshed_at: Option<chrono::NaiveDateTime>,
153 pub banner: Option<Option<DbUrl>>,
154 pub deleted: Option<bool>,
155 pub inbox_url: Option<DbUrl>,
156 pub shared_inbox_url: Option<Option<DbUrl>>,
157 pub matrix_user_id: Option<Option<String>>,