You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
665 B
Go

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
}