1
2use {
3 crate::schema::*,
4 chrono::prelude::*,
5};
6
7#[derive(Queryable)]
25pub struct Feed {
26 pub name: String,
27 pub uri: String,
28 pub backlog: i32,
29 pub fetch_since: Option<NaiveDateTime>,
30}
31
32#[derive(Insertable)]
33#[table_name="feeds"]
34pub struct NewFeed<'a> {
35 pub name: &'a str,
36 pub uri: &'a str,
37 pub backlog: i32,
38 pub fetch_since: Option<NaiveDateTime>,
39}
40
41#[derive(Queryable)]
42pub struct Registration {
43 pub feed: String,
44 pub guid: String,
45}
46
47#[derive(Insertable)]
48#[table_name="register"]
49pub struct NewRegistration<'a> {
50 pub feed: &'a str,
51 pub guid: &'a str,
52}
53