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>,
30 /// A safe representation of person, without the sensitive info
31 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
32 #[table_name = "person"]
33 pub struct PersonSafe {
36 pub preferred_username: Option<String>,
37 pub avatar: Option<DbUrl>,
39 pub published: chrono::NaiveDateTime,
40 pub updated: Option<chrono::NaiveDateTime>,
42 pub bio: Option<String>,
44 pub banner: Option<DbUrl>,
47 pub shared_inbox_url: Option<DbUrl>,
50 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
51 #[table_name = "person_alias_1"]
52 pub struct PersonAlias1 {
55 pub preferred_username: Option<String>,
56 pub avatar: Option<DbUrl>,
58 pub published: chrono::NaiveDateTime,
59 pub updated: Option<chrono::NaiveDateTime>,
61 pub bio: Option<String>,
63 pub private_key: Option<String>,
64 pub public_key: Option<String>,
65 pub last_refreshed_at: chrono::NaiveDateTime,
66 pub banner: Option<DbUrl>,
69 pub shared_inbox_url: Option<DbUrl>,
72 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
73 #[table_name = "person_alias_1"]
74 pub struct PersonSafeAlias1 {
77 pub preferred_username: Option<String>,
78 pub avatar: Option<DbUrl>,
80 pub published: chrono::NaiveDateTime,
81 pub updated: Option<chrono::NaiveDateTime>,
83 pub bio: Option<String>,
85 pub banner: Option<DbUrl>,
88 pub shared_inbox_url: Option<DbUrl>,
91 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
92 #[table_name = "person_alias_2"]
93 pub struct PersonAlias2 {
96 pub preferred_username: Option<String>,
97 pub avatar: Option<DbUrl>,
99 pub published: chrono::NaiveDateTime,
100 pub updated: Option<chrono::NaiveDateTime>,
102 pub bio: Option<String>,
104 pub private_key: Option<String>,
105 pub public_key: Option<String>,
106 pub last_refreshed_at: chrono::NaiveDateTime,
107 pub banner: Option<DbUrl>,
109 pub inbox_url: DbUrl,
110 pub shared_inbox_url: Option<DbUrl>,
113 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
114 #[table_name = "person_alias_1"]
115 pub struct PersonSafeAlias2 {
118 pub preferred_username: Option<String>,
119 pub avatar: Option<DbUrl>,
121 pub published: chrono::NaiveDateTime,
122 pub updated: Option<chrono::NaiveDateTime>,
124 pub bio: Option<String>,
126 pub banner: Option<DbUrl>,
128 pub inbox_url: DbUrl,
129 pub shared_inbox_url: Option<DbUrl>,
132 #[derive(Insertable, AsChangeset, Clone)]
133 #[table_name = "person"]
134 pub struct PersonForm {
136 pub preferred_username: Option<Option<String>>,
137 pub avatar: Option<Option<DbUrl>>,
138 pub banned: Option<bool>,
139 pub published: Option<chrono::NaiveDateTime>,
140 pub updated: Option<chrono::NaiveDateTime>,
141 pub actor_id: Option<DbUrl>,
142 pub bio: Option<Option<String>>,
143 pub local: Option<bool>,
144 pub private_key: Option<Option<String>>,
145 pub public_key: Option<Option<String>>,
146 pub last_refreshed_at: Option<chrono::NaiveDateTime>,
147 pub banner: Option<Option<DbUrl>>,
148 pub deleted: Option<bool>,
149 pub inbox_url: Option<DbUrl>,
150 pub shared_inbox_url: Option<Option<DbUrl>>,