This commit is contained in:
2023-08-14 00:17:42 +07:00
parent 6ce7cee5bc
commit fd88563096
5 changed files with 47 additions and 16 deletions
+4 -4
View File
@@ -5,12 +5,12 @@ import "context"
//go:generate mockgen -source=$GOFILE -destination=mocks/$GOFILE -package=mocks
type User struct {
ChatID string
UserID string
ChatID string `sql:"chat_id"`
UserID string `sql:"user_id"`
}
type IStorage interface {
UpsertUser(ctx context.Context, user User) error
GetAllUsersByChatID(ctx context.Context, chatID string) ([]User, error)
UpsertUser(ctx context.Context, user *User) error
GetAllUsersByChatID(ctx context.Context, chatID string) ([]*User, error)
Close()
}