Chat ID is an int64 (telego).
This commit is contained in:
parent
8c1816a3d2
commit
a459018095
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Chat struct {
|
type Chat struct {
|
||||||
ID int `db:"id"`
|
ID int64 `db:"id"`
|
||||||
Name string `db:"name"`
|
Name string `db:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ func NewChatModel(ctx context.Context, db *sqlx.DB) *ChatModel {
|
||||||
return &ChatModel{ctx, db, nil}
|
return &ChatModel{ctx, db, nil}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cm *ChatModel) AddChat(id int, name string) (chat *Chat, err error) {
|
func (cm *ChatModel) AddChat(id int64, name string) (chat *Chat, err error) {
|
||||||
cm.chats = nil
|
cm.chats = nil
|
||||||
chat = &Chat{}
|
chat = &Chat{}
|
||||||
err = cm.db.GetContext(cm.ctx, chat,
|
err = cm.db.GetContext(cm.ctx, chat,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue