feat(db): add schema, sqlc queries and generated code

This commit is contained in:
kk10
2026-10-04 21:25:07 +03:00
parent 492e0be15c
commit e1f2cb01e0
14 changed files with 744 additions and 23 deletions
+30
View File
@@ -0,0 +1,30 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package db
import (
"context"
"github.com/google/uuid"
)
type Querier interface {
AddChatMembers(ctx context.Context, arg AddChatMembersParams) error
CreateChat(ctx context.Context, arg CreateChatParams) (Chat, error)
CreateMessage(ctx context.Context, arg CreateMessageParams) (Message, error)
CreateSession(ctx context.Context, arg CreateSessionParams) error
CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error)
DeleteExpiredSessions(ctx context.Context) (int64, error)
DeleteSession(ctx context.Context, tokenHash string) error
GetChat(ctx context.Context, arg GetChatParams) (GetChatRow, error)
GetSessionUser(ctx context.Context, tokenHash string) (GetSessionUserRow, error)
GetUser(ctx context.Context, id uuid.UUID) (GetUserRow, error)
GetUserByUsername(ctx context.Context, username string) (User, error)
IsChatMember(ctx context.Context, arg IsChatMemberParams) (bool, error)
ListChats(ctx context.Context, arg ListChatsParams) ([]ListChatsRow, error)
ListMessages(ctx context.Context, arg ListMessagesParams) ([]Message, error)
}
var _ Querier = (*Queries)(nil)