fix: mode user table definition to db file
This commit is contained in:
parent
3a449c4d0d
commit
97a25308d8
@ -7,6 +7,14 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
ID int64
|
||||
State string
|
||||
MsgCounter uint
|
||||
RoleBitmask uint
|
||||
}
|
||||
|
||||
func (u User) IsAdmin() bool {
|
||||
return u.RoleBitmask&1 == 1
|
||||
}
|
||||
|
||||
@ -16,14 +16,6 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
ID int64
|
||||
State string
|
||||
MsgCounter uint
|
||||
RoleBitmask uint
|
||||
}
|
||||
|
||||
type BotController struct {
|
||||
cfg config.Config
|
||||
bot *tgbotapi.BotAPI
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user