]> Untitled Git - lemmy.git/blob - server/src/schema.rs
Spanish translations
[lemmy.git] / server / src / schema.rs
1 table! {
2     category (id) {
3         id -> Int4,
4         name -> Varchar,
5     }
6 }
7
8 table! {
9     comment (id) {
10         id -> Int4,
11         creator_id -> Int4,
12         post_id -> Int4,
13         parent_id -> Nullable<Int4>,
14         content -> Text,
15         removed -> Bool,
16         read -> Bool,
17         published -> Timestamp,
18         updated -> Nullable<Timestamp>,
19         deleted -> Bool,
20     }
21 }
22
23 table! {
24     comment_like (id) {
25         id -> Int4,
26         user_id -> Int4,
27         comment_id -> Int4,
28         post_id -> Int4,
29         score -> Int2,
30         published -> Timestamp,
31     }
32 }
33
34 table! {
35     comment_saved (id) {
36         id -> Int4,
37         comment_id -> Int4,
38         user_id -> Int4,
39         published -> Timestamp,
40     }
41 }
42
43 table! {
44     community (id) {
45         id -> Int4,
46         name -> Varchar,
47         title -> Varchar,
48         description -> Nullable<Text>,
49         category_id -> Int4,
50         creator_id -> Int4,
51         removed -> Bool,
52         published -> Timestamp,
53         updated -> Nullable<Timestamp>,
54         deleted -> Bool,
55         nsfw -> Bool,
56     }
57 }
58
59 table! {
60     community_follower (id) {
61         id -> Int4,
62         community_id -> Int4,
63         user_id -> Int4,
64         published -> Timestamp,
65     }
66 }
67
68 table! {
69     community_moderator (id) {
70         id -> Int4,
71         community_id -> Int4,
72         user_id -> Int4,
73         published -> Timestamp,
74     }
75 }
76
77 table! {
78     community_user_ban (id) {
79         id -> Int4,
80         community_id -> Int4,
81         user_id -> Int4,
82         published -> Timestamp,
83     }
84 }
85
86 table! {
87     mod_add (id) {
88         id -> Int4,
89         mod_user_id -> Int4,
90         other_user_id -> Int4,
91         removed -> Nullable<Bool>,
92         when_ -> Timestamp,
93     }
94 }
95
96 table! {
97     mod_add_community (id) {
98         id -> Int4,
99         mod_user_id -> Int4,
100         other_user_id -> Int4,
101         community_id -> Int4,
102         removed -> Nullable<Bool>,
103         when_ -> Timestamp,
104     }
105 }
106
107 table! {
108     mod_ban (id) {
109         id -> Int4,
110         mod_user_id -> Int4,
111         other_user_id -> Int4,
112         reason -> Nullable<Text>,
113         banned -> Nullable<Bool>,
114         expires -> Nullable<Timestamp>,
115         when_ -> Timestamp,
116     }
117 }
118
119 table! {
120     mod_ban_from_community (id) {
121         id -> Int4,
122         mod_user_id -> Int4,
123         other_user_id -> Int4,
124         community_id -> Int4,
125         reason -> Nullable<Text>,
126         banned -> Nullable<Bool>,
127         expires -> Nullable<Timestamp>,
128         when_ -> Timestamp,
129     }
130 }
131
132 table! {
133     mod_lock_post (id) {
134         id -> Int4,
135         mod_user_id -> Int4,
136         post_id -> Int4,
137         locked -> Nullable<Bool>,
138         when_ -> Timestamp,
139     }
140 }
141
142 table! {
143     mod_remove_comment (id) {
144         id -> Int4,
145         mod_user_id -> Int4,
146         comment_id -> Int4,
147         reason -> Nullable<Text>,
148         removed -> Nullable<Bool>,
149         when_ -> Timestamp,
150     }
151 }
152
153 table! {
154     mod_remove_community (id) {
155         id -> Int4,
156         mod_user_id -> Int4,
157         community_id -> Int4,
158         reason -> Nullable<Text>,
159         removed -> Nullable<Bool>,
160         expires -> Nullable<Timestamp>,
161         when_ -> Timestamp,
162     }
163 }
164
165 table! {
166     mod_remove_post (id) {
167         id -> Int4,
168         mod_user_id -> Int4,
169         post_id -> Int4,
170         reason -> Nullable<Text>,
171         removed -> Nullable<Bool>,
172         when_ -> Timestamp,
173     }
174 }
175
176 table! {
177     mod_sticky_post (id) {
178         id -> Int4,
179         mod_user_id -> Int4,
180         post_id -> Int4,
181         stickied -> Nullable<Bool>,
182         when_ -> Timestamp,
183     }
184 }
185
186 table! {
187     post (id) {
188         id -> Int4,
189         name -> Varchar,
190         url -> Nullable<Text>,
191         body -> Nullable<Text>,
192         creator_id -> Int4,
193         community_id -> Int4,
194         removed -> Bool,
195         locked -> Bool,
196         published -> Timestamp,
197         updated -> Nullable<Timestamp>,
198         deleted -> Bool,
199         nsfw -> Bool,
200         stickied -> Bool,
201     }
202 }
203
204 table! {
205     post_like (id) {
206         id -> Int4,
207         post_id -> Int4,
208         user_id -> Int4,
209         score -> Int2,
210         published -> Timestamp,
211     }
212 }
213
214 table! {
215     post_read (id) {
216         id -> Int4,
217         post_id -> Int4,
218         user_id -> Int4,
219         published -> Timestamp,
220     }
221 }
222
223 table! {
224     post_saved (id) {
225         id -> Int4,
226         post_id -> Int4,
227         user_id -> Int4,
228         published -> Timestamp,
229     }
230 }
231
232 table! {
233     site (id) {
234         id -> Int4,
235         name -> Varchar,
236         description -> Nullable<Text>,
237         creator_id -> Int4,
238         published -> Timestamp,
239         updated -> Nullable<Timestamp>,
240     }
241 }
242
243 table! {
244     user_ (id) {
245         id -> Int4,
246         name -> Varchar,
247         fedi_name -> Varchar,
248         preferred_username -> Nullable<Varchar>,
249         password_encrypted -> Text,
250         email -> Nullable<Text>,
251         icon -> Nullable<Bytea>,
252         admin -> Bool,
253         banned -> Bool,
254         published -> Timestamp,
255         updated -> Nullable<Timestamp>,
256         show_nsfw -> Bool,
257         theme -> Varchar,
258     }
259 }
260
261 table! {
262     user_ban (id) {
263         id -> Int4,
264         user_id -> Int4,
265         published -> Timestamp,
266     }
267 }
268
269 joinable!(comment -> post (post_id));
270 joinable!(comment -> user_ (creator_id));
271 joinable!(comment_like -> comment (comment_id));
272 joinable!(comment_like -> post (post_id));
273 joinable!(comment_like -> user_ (user_id));
274 joinable!(comment_saved -> comment (comment_id));
275 joinable!(comment_saved -> user_ (user_id));
276 joinable!(community -> category (category_id));
277 joinable!(community -> user_ (creator_id));
278 joinable!(community_follower -> community (community_id));
279 joinable!(community_follower -> user_ (user_id));
280 joinable!(community_moderator -> community (community_id));
281 joinable!(community_moderator -> user_ (user_id));
282 joinable!(community_user_ban -> community (community_id));
283 joinable!(community_user_ban -> user_ (user_id));
284 joinable!(mod_add_community -> community (community_id));
285 joinable!(mod_ban_from_community -> community (community_id));
286 joinable!(mod_lock_post -> post (post_id));
287 joinable!(mod_lock_post -> user_ (mod_user_id));
288 joinable!(mod_remove_comment -> comment (comment_id));
289 joinable!(mod_remove_comment -> user_ (mod_user_id));
290 joinable!(mod_remove_community -> community (community_id));
291 joinable!(mod_remove_community -> user_ (mod_user_id));
292 joinable!(mod_remove_post -> post (post_id));
293 joinable!(mod_remove_post -> user_ (mod_user_id));
294 joinable!(mod_sticky_post -> post (post_id));
295 joinable!(mod_sticky_post -> user_ (mod_user_id));
296 joinable!(post -> community (community_id));
297 joinable!(post -> user_ (creator_id));
298 joinable!(post_like -> post (post_id));
299 joinable!(post_like -> user_ (user_id));
300 joinable!(post_read -> post (post_id));
301 joinable!(post_read -> user_ (user_id));
302 joinable!(post_saved -> post (post_id));
303 joinable!(post_saved -> user_ (user_id));
304 joinable!(site -> user_ (creator_id));
305 joinable!(user_ban -> user_ (user_id));
306
307 allow_tables_to_appear_in_same_query!(
308   category,
309   comment,
310   comment_like,
311   comment_saved,
312   community,
313   community_follower,
314   community_moderator,
315   community_user_ban,
316   mod_add,
317   mod_add_community,
318   mod_ban,
319   mod_ban_from_community,
320   mod_lock_post,
321   mod_remove_comment,
322   mod_remove_community,
323   mod_remove_post,
324   mod_sticky_post,
325   post,
326   post_like,
327   post_read,
328   post_saved,
329   site,
330   user_,
331   user_ban,
332 );