From 3644ac7c9f4b0fc30191873cf7c0b9e84a2f4c64 Mon Sep 17 00:00:00 2001 From: optclblast Date: Sun, 5 May 2024 20:50:55 +0300 Subject: [PATCH] tmp --- .../usecase/repository/users/repository.go | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/backend/internal/usecase/repository/users/repository.go b/backend/internal/usecase/repository/users/repository.go index 9f326c4..33340e0 100644 --- a/backend/internal/usecase/repository/users/repository.go +++ b/backend/internal/usecase/repository/users/repository.go @@ -2,13 +2,15 @@ package users import ( "context" + "database/sql" "github.com/emochka2007/block-accounting/internal/pkg/models" + "github.com/google/uuid" ) type GetParams struct { - Id string - OrganizationId string + Ids uuid.UUIDs + OrganizationId uuid.UUIDs Seed []byte } @@ -20,3 +22,31 @@ type Repository interface { Update(ctx context.Context, user *models.User) error Delete(ctx context.Context, id string) error } + +type repositorySQL struct { + db *sql.DB +} + +func NewRepository(db *sql.DB) Repository { + return nil +} + +func (r *repositorySQL) Get(ctx context.Context, params GetParams) (*models.User, error) { + +} + +func (r *repositorySQL) Create(ctx context.Context, user *models.User) error { + +} + +func (r *repositorySQL) Activate(ctx context.Context, id string) error { + +} + +func (r *repositorySQL) Update(ctx context.Context, user *models.User) error { + +} + +func (r *repositorySQL) Delete(ctx context.Context, id string) error { + +}