From 6543c14fbc1dfaabba00e8422041690c704283d1 Mon Sep 17 00:00:00 2001
From: Danis Kirasirov <dbgbbu@gmail.com>
Date: Fri, 20 Dec 2024 09:26:49 +0300
Subject: [PATCH] wip

---
 pkg/items/storage.go | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/pkg/items/storage.go b/pkg/items/storage.go
index 7d2ddb60..c33cc1c1 100644
--- a/pkg/items/storage.go
+++ b/pkg/items/storage.go
@@ -27,13 +27,13 @@ type Storage interface {
 	// ---------------------------------------------------------------------------------------------
 
 	// Create - создать новую запись
-	Create(ctx context.Context, coll *collections.Collection, item *Item, options ...*CreateOptions) (*Item, error)
+	Create(ctx context.Context, coll *collections.Collection, item *Item, locales []*locales.Locale, options ...*CreateOptions) (*Item, error)
 
 	// CreateRevision - перенести ревизию в коллекцию Revisions
 	CreateRevision(ctx context.Context, spaceId, envId, collectionId, itemId string) error
 
 	// Update - Обновление текущей ревизии
-	Update(ctx context.Context, coll *collections.Collection, item *Item, options ...*UpdateOptions) error
+	Update(ctx context.Context, coll *collections.Collection, item *Item, locales []*locales.Locale, options ...*UpdateOptions) error
 
 	// Find - поиск записей по рабочим записям, коллекция 'items'
 	Find(ctx context.Context, coll *collections.Collection, filter *Filter, opts ...*StorageFindOptions) ([]*Item, int, error)
@@ -48,28 +48,28 @@ type Storage interface {
 	ChangeRevisionsItemID(ctx context.Context, spaceId, envId, collectionId, itemId, newItemId string) error
 
 	// Publish - опубликовать запись
-	Publish(ctx context.Context, published *Item, options ...*PublishOptions) error
+	Publish(ctx context.Context, published *Item, locales []*locales.Locale, options ...*PublishOptions) error
 
 	// Unpublish - отменить публикацию записи
-	Unpublish(ctx context.Context, unpublished *Item, options ...*UnpublishOptions) error
+	Unpublish(ctx context.Context, unpublished *Item, locales []*locales.Locale, options ...*UnpublishOptions) error
 
 	// FindPublished - поиск по опубликованным записям, коллекция 'items_published'
 	FindPublished(ctx context.Context, coll *collections.Collection, filter *Filter, opts ...*StorageFindOptions) ([]*Item, int, error)
 
 	// Archive - архивация записи
-	Archive(ctx context.Context, archived *Item, options ...*ArchiveOptions) error
+	Archive(ctx context.Context, archived *Item, locales []*locales.Locale, options ...*ArchiveOptions) error
 
 	// Unarchive - разархивация записи
-	Unarchive(ctx context.Context, unarchived *Item, options ...*UnarchiveOptions) error
+	Unarchive(ctx context.Context, unarchived *Item, locales []*locales.Locale, options ...*UnarchiveOptions) error
 
 	// FindArchived - поиск по архивированным записям, коллекция 'items_archived'
 	FindArchived(ctx context.Context, coll *collections.Collection, filter *Filter, opts ...*StorageFindOptions) ([]*Item, int, error)
 
 	// RemoveItems - удаление записи из коллекций Items
-	RemoveItems(ctx context.Context, spaceId, envId, collectionId, itemId string, options ...*DeleteOptions) error
+	RemoveItems(ctx context.Context, spaceId, envId, collectionId, itemId string, locales []*locales.Locale, options ...*DeleteOptions) error
 
 	// RemovePublished - удаление записи из коллекций Published
-	RemovePublished(ctx context.Context, spaceId, envId, collectionId, itemId string, options ...*DeleteOptions) error
+	RemovePublished(ctx context.Context, spaceId, envId, collectionId, itemId string, locales []*locales.Locale, options ...*DeleteOptions) error
 
 	// CleanUpRevisions - очистка ревизий элемента, согласно настройкам лимитов для ревизий в коллекции
 	CleanUpRevisions(ctx context.Context, coll *collections.Collection, itemId string) error
@@ -84,9 +84,9 @@ type Storage interface {
 	RemoveArchived(ctx context.Context, spaceId, envId, collectionId, itemId string, options ...*DeleteOptions) error
 
 	// Copy - копирование записей
-	Copy(ctx context.Context, src, dst *collections.Collection, itemSets ...string) error
+	Copy(ctx context.Context, src, dst *collections.Collection, locales []*locales.Locale, itemSets ...string) error
 
-	Reset(ctx context.Context, spaceId, envId, collectionId string) error
+	Reset(ctx context.Context, spaceId, envId, collectionId string, locales []*locales.Locale) error
 	Init(ctx context.Context, collection *collections.Collection, locales ...*locales.Locale) error
 
 	// Aggregate выполняет агрегацию данных
-- 
GitLab