DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: fb43c0af69ed4a14409e38a413143053869ff74a deck-builder/api/src/schema.rs -rw-r--r-- 1.3 KiB
fb43c0afJonni Liljamo WIP(api): session management 1 year, 9 months ago
                                                                                
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
61
// @generated automatically by Diesel CLI.

diesel::table! {
    actions (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        updated_at -> Timestamptz,
        game_data_id -> Uuid,
        invoker -> Uuid,
        data -> Json,
        timestamp -> Timestamptz,
    }
}

diesel::table! {
    gamedata (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        updated_at -> Timestamptz,
        turn -> Int2,
        host_hand -> Nullable<Json>,
        host_deck -> Nullable<Json>,
        guest_hand -> Nullable<Json>,
        guest_deck -> Nullable<Json>,
    }
}

diesel::table! {
    games (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        updated_at -> Timestamptz,
        host_id -> Uuid,
        guest_id -> Nullable<Uuid>,
        state -> Int2,
        ended_at -> Nullable<Timestamptz>,
        game_data_id -> Uuid,
    }
}

diesel::table! {
    users (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        updated_at -> Timestamptz,
        username -> Varchar,
        email -> Varchar,
        password -> Varchar,
    }
}

diesel::joinable!(actions -> gamedata (game_data_id));
diesel::joinable!(actions -> users (invoker));
diesel::joinable!(games -> gamedata (game_data_id));

diesel::allow_tables_to_appear_in_same_query!(
    actions,
    gamedata,
    games,
    users,
);