Newer
Older
//// ------------------------------------------------------
//// THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
//// ------------------------------------------------------
Table Setting {
key String [pk]
value String [not null]
}
lastPixelTime DateTime [default: `now()`, not null]
isAdmin Boolean [not null, default: false]
isModerator Boolean [not null, default: false]
pixels Pixel [not null]
FactionMember FactionMember [not null]
Table Instance {
id Int [pk, increment]
hostname String [unique, not null]
name String
logo_url String
banner_url String
id Int [pk, increment]
name String [not null]
hex String [unique, not null]
}
Table Pixel {
id Int [pk, increment]
userId String [not null]
x Int [not null]
y Int [not null]
color String [not null]
isTop Boolean [not null, default: false]
isModAction Boolean [not null, default: false]
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
user User [not null]
}
Table Faction {
id String [pk]
name String [not null]
image String
FactionMember FactionMember [not null]
FactionRole FactionRole [not null]
FactionSocial FactionSocial [not null]
FactionSetting FactionSetting [not null]
}
Table FactionMember {
id Int [pk, increment]
sub String [not null]
factionId String [not null]
user User [not null]
faction Faction [not null]
}
Table FactionRole {
id String [pk]
name String [not null]
level Int [not null]
factionId String [not null]
faction Faction [not null]
}
Table FactionSocial {
id String [pk]
factionId String [not null]
title String
url String [not null]
position Int [not null]
faction Faction [not null]
}
Table FactionSetting {
id String [pk]
factionId String [not null]
key String [not null]
value String [not null]
definition FactionSettingDefinition [not null]
faction Faction [not null]
}
Table FactionSettingDefinition {
id String [pk]
name String [not null]
type String [not null]
minimumLevel Int [not null]
FactionSetting FactionSetting [not null]
}
Table Ban {
id Int [pk, increment]
userId String [unique]
instanceId Int [unique]
privateNote String
publicNote String
expiresAt DateTime [not null]
createdAt DateTime [default: `now()`, not null]
updatedAt DateTime
user User
instance Instance
AuditLog AuditLog [not null]
}
Table AuditLog {
id Int [pk, increment]
userId String
action AuditLogAction [not null]
reason String
comment String
banId Int
createdAt DateTime [default: `now()`, not null]
updatedAt DateTime
user User
ban Ban
}
Enum AuditLogAction {
BAN_CREATE
BAN_UPDATE
BAN_DELETE
Ref: Pixel.userId > User.sub
Ref: FactionMember.sub > User.sub
Ref: FactionMember.factionId > Faction.id
Ref: FactionRole.factionId > Faction.id
Ref: FactionSocial.factionId > Faction.id
Ref: FactionSetting.key > FactionSettingDefinition.id
Ref: FactionSetting.factionId > Faction.id
Ref: Ban.userId - User.sub