mirror of
https://hacklab.nilfm.cc/felt
synced 2024-10-22 22:41:48 +00:00
44 lines
1 KiB
Go
44 lines
1 KiB
Go
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"`
|
|
X int `json:"x"`
|
|
Y int `json:"y"`
|
|
}
|
|
|
|
type Table struct {
|
|
Name string `json:"name"`
|
|
Passcode string `json:"passcode"`
|
|
MapImageUrl string `json:"mapImageUrl"`
|
|
DiceRolls []DiceRoll `json:"diceRolls"`
|
|
Tokens []Token `json:"tokens"`
|
|
AvailableTokens []Token `json:"availableTokens"`
|
|
AuxMessage string `json:"auxMessage"`
|
|
}
|
|
|
|
type TableMessage struct {
|
|
Key TableKey `json:"key"`
|
|
Roll DiceRoll `json:"roll"`
|
|
Token Token `json:"token"`
|
|
MapImg string `json:"mapImg"`
|
|
AuxMsg string `json:"auxMsg"`
|
|
}
|