2 schema::{person, person_alias_1, person_alias_2},
7 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
8 #[table_name = "person"]
12 pub preferred_username: Option<String>,
13 pub avatar: Option<DbUrl>,
15 pub published: chrono::NaiveDateTime,
16 pub updated: Option<chrono::NaiveDateTime>,
18 pub bio: Option<String>,
20 pub private_key: Option<String>,
21 pub public_key: Option<String>,
22 pub last_refreshed_at: chrono::NaiveDateTime,
23 pub banner: Option<DbUrl>,
26 pub shared_inbox_url: Option<DbUrl>,
29 /// A safe representation of user, without the sensitive info
30 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
31 #[table_name = "person"]
32 pub struct PersonSafe {
35 pub preferred_username: Option<String>,
36 pub avatar: Option<DbUrl>,
38 pub published: chrono::NaiveDateTime,
39 pub updated: Option<chrono::NaiveDateTime>,
41 pub bio: Option<String>,
43 pub banner: Option<DbUrl>,
46 pub shared_inbox_url: Option<DbUrl>,
49 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
50 #[table_name = "person_alias_1"]
51 pub struct PersonAlias1 {
54 pub preferred_username: Option<String>,
55 pub avatar: Option<DbUrl>,
57 pub published: chrono::NaiveDateTime,
58 pub updated: Option<chrono::NaiveDateTime>,
60 pub bio: Option<String>,
62 pub private_key: Option<String>,
63 pub public_key: Option<String>,
64 pub last_refreshed_at: chrono::NaiveDateTime,
65 pub banner: Option<DbUrl>,
68 pub shared_inbox_url: Option<DbUrl>,
71 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
72 #[table_name = "person_alias_1"]
73 pub struct PersonSafeAlias1 {
76 pub preferred_username: Option<String>,
77 pub avatar: Option<DbUrl>,
79 pub published: chrono::NaiveDateTime,
80 pub updated: Option<chrono::NaiveDateTime>,
82 pub bio: Option<String>,
84 pub banner: Option<DbUrl>,
87 pub shared_inbox_url: Option<DbUrl>,
90 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
91 #[table_name = "person_alias_2"]
92 pub struct PersonAlias2 {
95 pub preferred_username: Option<String>,
96 pub avatar: Option<DbUrl>,
98 pub published: chrono::NaiveDateTime,
99 pub updated: Option<chrono::NaiveDateTime>,
101 pub bio: Option<String>,
103 pub private_key: Option<String>,
104 pub public_key: Option<String>,
105 pub last_refreshed_at: chrono::NaiveDateTime,
106 pub banner: Option<DbUrl>,
108 pub inbox_url: DbUrl,
109 pub shared_inbox_url: Option<DbUrl>,
112 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
113 #[table_name = "person_alias_1"]
114 pub struct PersonSafeAlias2 {
117 pub preferred_username: Option<String>,
118 pub avatar: Option<DbUrl>,
120 pub published: chrono::NaiveDateTime,
121 pub updated: Option<chrono::NaiveDateTime>,
123 pub bio: Option<String>,
125 pub banner: Option<DbUrl>,
127 pub inbox_url: DbUrl,
128 pub shared_inbox_url: Option<DbUrl>,
131 #[derive(Insertable, AsChangeset, Clone)]
132 #[table_name = "person"]
133 pub struct PersonForm {
135 pub preferred_username: Option<Option<String>>,
136 pub avatar: Option<Option<DbUrl>>,
137 pub banned: Option<bool>,
138 pub published: Option<chrono::NaiveDateTime>,
139 pub updated: Option<chrono::NaiveDateTime>,
140 pub actor_id: Option<DbUrl>,
141 pub bio: Option<Option<String>>,
142 pub local: Option<bool>,
143 pub private_key: Option<Option<String>>,
144 pub public_key: Option<Option<String>>,
145 pub last_refreshed_at: Option<chrono::NaiveDateTime>,
146 pub banner: Option<Option<DbUrl>>,
147 pub deleted: Option<bool>,
148 pub inbox_url: Option<DbUrl>,
149 pub shared_inbox_url: Option<Option<DbUrl>>,