Initial commit

This commit is contained in:
2022-03-03 01:14:39 +01:00
commit 88d26d1e5c
14 changed files with 1638 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
package db
// Entities
type Utente struct {
ID string
Username string
Permissions []string
}
type Stanza struct {
ID string
Posti []string
}
// Actions
type AzioneBase struct {
Tipo string
}
type AzioneStanza struct {
AzioneBase
UserID string
StanzaID string
}
type AzioneOccupaPosto struct {
AzioneStanza
PostoID string
}
type AzioneLiberaPosto struct {
AzioneStanza
PostoID string
}
// Database Interfaces
type Store interface {
// Entities
GetUtente(userID string) *Utente
GetStanza(stanzaID string) *Stanza
// Available Seats
GetPostiOccupati(stanzaID string) []string
GetPostiLiberi(stanzaID string) []string
}