24 lines
399 B
Go
24 lines
399 B
Go
|
package db
|
||
|
|
||
|
const (
|
||
|
UserStateNone = UserState("")
|
||
|
UserStateGo = UserState("Go")
|
||
|
UserStateEat = UserState("Eat")
|
||
|
UserStatePause = UserState("Pause")
|
||
|
)
|
||
|
|
||
|
type UserState string
|
||
|
|
||
|
type Chat struct {
|
||
|
ChatID int64 `bson:"chat_id"`
|
||
|
}
|
||
|
|
||
|
type ChatInfo struct {
|
||
|
ChatID int64 `bson:"chat_id"`
|
||
|
Status string `bson:"status"`
|
||
|
}
|
||
|
|
||
|
func (c *ChatInfo) GetStatus() UserState {
|
||
|
return UserState(c.Status)
|
||
|
}
|