felt/models/models.go

46 lines
1.1 KiB
Go
Raw Normal View History

package models
import (
"time"
)
type TableKey struct {
Name string `json:"name"`
Passcode string `json:"passcode"`
}
type DiceRoll struct {
Faces uint8 `json:"faces"`
Roll []uint8 `json:"roll"`
Player string `json:"player"`
Note string `json:"note"`
Timestamp time.Time `json:"timestamp"`
}
type Token struct {
Id string `json:"id"`
Name string `json:"name"`
SpriteUri string `json:"spriteUrl"`
2023-05-13 04:33:14 +00:00
X *int `json:"x"`
Y *int `json:"y"`
}
type Table struct {
Name string `json:"name"`
Passcode string `json:"passcode"`
2023-05-13 04:33:14 +00:00
MapImageUrl string `json:"mapImg"`
DiceRolls []DiceRoll `json:"diceRolls"`
Tokens []Token `json:"tokens"`
AvailableTokens []Token `json:"availableTokens"`
2023-05-13 04:33:14 +00:00
AuxMessage string `json:"auxMsg"`
}
2022-12-07 04:58:42 +00:00
type TableMessage struct {
Auth *string `json:"auth,omitempty"`
Key *TableKey `json:"key"`
DiceRoll *DiceRoll `json:"diceRoll"`
Token *Token `json:"token"`
MapImg *string `json:"mapImg"`
AuxMsg *string `json:"auxMsg"`
2022-12-22 04:45:15 +00:00
}