Feat: add backlog
This commit is contained in:
		| @@ -9,5 +9,5 @@ var ( | ||||
| 	CacheStatePrefix = "state-" | ||||
| 	// sse | ||||
| 	NotifyRoomUpdatePrefix = "roomupdate_" | ||||
| 	NotifyMimePrefix       = "mimeclue_" | ||||
| 	NotifyBacklogPrefix    = "backlog_" | ||||
| ) | ||||
|   | ||||
| @@ -37,24 +37,34 @@ type Team struct { | ||||
| 	Color    string | ||||
| } | ||||
|  | ||||
| type Action struct { | ||||
| 	Actor      string | ||||
| 	ActorColor string | ||||
| 	Action     string // clue | guess | ||||
| 	Word       string | ||||
| 	WordColor  string | ||||
| 	Number     string // for clue | ||||
| } | ||||
|  | ||||
| type Room struct { | ||||
| 	ID        string    `json:"id" db:"id"` | ||||
| 	CreatedAt time.Time `json:"created_at" db:"created_at"` | ||||
| 	// RoomName     string    `json:"room_name"` | ||||
| 	RoomPass    string `json:"room_pass"` | ||||
| 	RoomLink    string | ||||
| 	CreatorName string   `json:"creator_name"` | ||||
| 	PlayerList  []string `json:"player_list"` | ||||
| 	TeamTurn    string | ||||
| 	RedTeam     Team | ||||
| 	BlueTeam    Team | ||||
| 	Cards       []WordCard | ||||
| 	Result      uint8 // 0 for unknown; 1 is win for red; 2 if for blue; | ||||
| 	BlueCounter uint8 | ||||
| 	RedCounter  uint8 | ||||
| 	RedTurn     bool // false is blue turn | ||||
| 	MimeDone    bool | ||||
| 	IsPublic    bool | ||||
| 	RoomPass      string `json:"room_pass"` | ||||
| 	RoomLink      string | ||||
| 	CreatorName   string   `json:"creator_name"` | ||||
| 	PlayerList    []string `json:"player_list"` | ||||
| 	ActionHistory []Action | ||||
| 	TeamTurn      string | ||||
| 	RedTeam       Team | ||||
| 	BlueTeam      Team | ||||
| 	Cards         []WordCard | ||||
| 	Result        uint8 // 0 for unknown; 1 is win for red; 2 if for blue; | ||||
| 	BlueCounter   uint8 | ||||
| 	RedCounter    uint8 | ||||
| 	RedTurn       bool // false is blue turn | ||||
| 	MimeDone      bool | ||||
| 	IsPublic      bool | ||||
| 	// GameSettings *GameSettings `json:"settings"` | ||||
| 	IsRunning bool   `json:"is_running"` | ||||
| 	Language  string `json:"language" example:"en" form:"language"` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder