1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! `diesel` table definitions, copied over from [`doc/`](../../doc/)umentation.


table! {
    /// See [`doc/session.md`](../../doc/session/)
    sessions {
        /// Nullable wrapper so we can pass NULL to SQLite so it assigns new id
        id              -> Nullable<Integer>,
        expiry          -> Timestamp,
        is_admin        -> Bool,
        user_id         -> Nullable<Integer>,
        sudoku_board_id -> Nullable<Integer>,
        board_skeleton  -> Nullable<Text>,
        solve_start     -> Nullable<Timestamp>,
    }
}

table! {
    /// See [`doc/user.md`](../../doc/user/)
    users {
        /// Nullable wrapper so we can pass NULL to SQLite so it assigns new id
        id                 -> Nullable<Integer>,
        username           -> Text,
        password           -> Text,
        email              -> Text,
        created_at         -> Timestamp,
        is_admin           -> Bool,
        points_total       -> Integer,
        games_total        -> Integer,
        games_total_easy   -> Integer,
        games_total_medium -> Integer,
        games_total_hard   -> Integer,
    }
}

table! {
    /// See [`doc/sudoku.md`](../../doc/sudoku/)
    sudoku_boards {
        /// Nullable wrapper so we can pass NULL to SQLite so it assigns new id
        id            -> Nullable<Integer>,
        full_board    -> Text,
        difficulty    -> Integer,
        creation_time -> Timestamp,
    }
}

table! {
    /// See [`doc/sudoku.md`](../../doc/sudoku/)
    sudoku_solutions {
        /// Nullable wrapper so we can pass NULL to SQLite so it assigns new id
        id                     -> Nullable<Integer>,
        display_name           -> Text,
        board_id               -> Integer,
        skeleton               -> Text,
        difficulty             -> Integer,
        solution_duration_secs -> Integer,
        score                  -> Integer,
        solution_time          -> Timestamp,
    }
}