aboutsummaryrefslogtreecommitdiff
path: root/src/schema.rs
blob: 2f0daba4b3b91c82e9f68a5b1801b27c917fb16f (plain) (blame)
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
62
63
64
65
66
table! {
    users(userid) {
        userid -> Serial,
        email -> VarChar,
        firstname -> VarChar,
        lastname -> VarChar,
        password -> VarChar,
        joindate -> Date,
        activated -> Bool,
    }
}
table! {
    activation_keys(code) {
        code -> VarChar,
        userid -> Serial,
    }
}
table! {
    games(gameid) {
        gameid -> Serial,
        title -> VarChar,
        gametypeid -> Serial,
        players -> SmallInt,
        waitfor -> Integer,
        lastturn -> Date,
        gamestate -> Integer,
    }
}
table! {
    allegiances(gameid, userid) {
        gameid -> Serial,
        userid -> Serial,
        allegiance -> VarChar,
        ordernum -> SmallInt,
        playing -> SmallInt,
    }
}
table! {
    regions(regionid) {
        regionid -> Serial,
        name -> VarChar,
        abbreviation -> Char,
        bonus -> Integer,
    }
}
table! {
    nationstates(nationid) {
        nationid -> Serial,
        regionid -> Serial,
        name -> VarChar,
        abbreviation -> Char,
    }
}
table! {
    borders(nationid, borderid) {
        nationid -> Serial,
        borderid -> Serial,
    }
}
table! {
    regions_nationstates(gameid, nationid) {
        gameid -> Serial,
        nationid -> Serial,
        userid -> Serial,
    }
}