add db
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user