feat: item-attachments CRUD (#22)

* change /content/ -> /homebox/

* add cache to code generators

* update env variables to set data storage

* update env variables

* set env variables in prod container

* implement attachment post route (WIP)

* get attachment endpoint

* attachment download

* implement string utilities lib

* implement generic drop zone

* use explicit truncate

* remove clean dir

* drop strings composable for lib

* update item types and add attachments

* add attachment API

* implement service context

* consolidate API code

* implement editing attachments

* implement upload limit configuration

* improve error handling

* add docs for max upload size

* fix test cases
This commit is contained in:
Hayden 2022-09-24 11:33:38 -08:00 committed by GitHub
parent 852d312ba7
commit 31b34241e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
165 changed files with 2509 additions and 664 deletions

View file

@ -9,9 +9,9 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/item"
)
// Attachment is the model entity for the Attachment schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/item"
)
// AttachmentCreate is the builder for creating a Attachment entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// AttachmentDelete is the builder for deleting a Attachment entity.

View file

@ -11,10 +11,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// AttachmentQuery is the builder for querying Attachment entities.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// AttachmentUpdate is the builder for updating Attachment entities.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/user"
)
// AuthTokens is the model entity for the AuthTokens schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,8 +11,8 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/user"
)
// AuthTokensCreate is the builder for creating a AuthTokens entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// AuthTokensDelete is the builder for deleting a AuthTokens entity.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// AuthTokensQuery is the builder for querying AuthTokens entities.

View file

@ -12,9 +12,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// AuthTokensUpdate is the builder for updating AuthTokens entities.

View file

@ -9,18 +9,18 @@ import (
"log"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/migrate"
"github.com/hay-kot/homebox/backend/ent/migrate"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/user"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql"

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/group"
)
// Document is the model entity for the Document schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,10 +11,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
)
// DocumentCreate is the builder for creating a Document entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentDelete is the builder for deleting a Document entity.

View file

@ -12,11 +12,11 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentQuery is the builder for querying Document entities.

View file

@ -12,11 +12,11 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentUpdate is the builder for updating Document entities.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
)
// DocumentToken is the model entity for the DocumentToken schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,8 +11,8 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
)
// DocumentTokenCreate is the builder for creating a DocumentToken entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentTokenDelete is the builder for deleting a DocumentToken entity.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentTokenQuery is the builder for querying DocumentToken entities.

View file

@ -12,9 +12,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// DocumentTokenUpdate is the builder for updating DocumentToken entities.

View file

@ -10,16 +10,16 @@ import (
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/user"
)
// ent aliases to avoid import conflicts in user's code.

View file

@ -5,12 +5,12 @@ package enttest
import (
"context"
"github.com/hay-kot/content/backend/ent"
"github.com/hay-kot/homebox/backend/ent"
// required by schema hooks.
_ "github.com/hay-kot/content/backend/ent/runtime"
_ "github.com/hay-kot/homebox/backend/ent/runtime"
"entgo.io/ent/dialect/sql/schema"
"github.com/hay-kot/content/backend/ent/migrate"
"github.com/hay-kot/homebox/backend/ent/migrate"
)
type (

View file

@ -9,7 +9,7 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/group"
)
// Group is the model entity for the Group schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,12 +11,12 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/user"
)
// GroupCreate is the builder for creating a Group entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// GroupDelete is the builder for deleting a Group entity.

View file

@ -12,13 +12,13 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// GroupQuery is the builder for querying Group entities.

View file

@ -12,13 +12,13 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// GroupUpdate is the builder for updating Group entities.

View file

@ -6,7 +6,7 @@ import (
"context"
"fmt"
"github.com/hay-kot/content/backend/ent"
"github.com/hay-kot/homebox/backend/ent"
)
// The AttachmentFunc type is an adapter to allow the use of ordinary

View file

@ -9,9 +9,9 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/location"
)
// Item is the model entity for the Item schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,12 +11,12 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
)
// ItemCreate is the builder for creating a Item entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemDelete is the builder for deleting a Item entity.

View file

@ -12,13 +12,13 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemQuery is the builder for querying Item entities.

View file

@ -12,13 +12,13 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemUpdate is the builder for updating Item entities.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
)
// ItemField is the model entity for the ItemField schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,8 +11,8 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
)
// ItemFieldCreate is the builder for creating a ItemField entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemFieldDelete is the builder for deleting a ItemField entity.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemFieldQuery is the builder for querying ItemField entities.

View file

@ -12,9 +12,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ItemFieldUpdate is the builder for updating ItemField entities.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/label"
)
// Label is the model entity for the Label schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
)
// LabelCreate is the builder for creating a Label entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LabelDelete is the builder for deleting a Label entity.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LabelQuery is the builder for querying Label entities.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LabelUpdate is the builder for updating Label entities.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/location"
)
// Location is the model entity for the Location schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/location"
)
// LocationCreate is the builder for creating a Location entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LocationDelete is the builder for deleting a Location entity.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LocationQuery is the builder for querying Location entities.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// LocationUpdate is the builder for updating Location entities.

View file

@ -10,17 +10,17 @@ import (
"time"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
"entgo.io/ent"
)

View file

@ -6,17 +6,17 @@ import (
"time"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/attachment"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/document"
"github.com/hay-kot/content/backend/ent/documenttoken"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/item"
"github.com/hay-kot/content/backend/ent/itemfield"
"github.com/hay-kot/content/backend/ent/label"
"github.com/hay-kot/content/backend/ent/location"
"github.com/hay-kot/content/backend/ent/schema"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/attachment"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/document"
"github.com/hay-kot/homebox/backend/ent/documenttoken"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/item"
"github.com/hay-kot/homebox/backend/ent/itemfield"
"github.com/hay-kot/homebox/backend/ent/label"
"github.com/hay-kot/homebox/backend/ent/location"
"github.com/hay-kot/homebox/backend/ent/schema"
"github.com/hay-kot/homebox/backend/ent/user"
)
// The init function reads all schema descriptors with runtime code

View file

@ -2,7 +2,7 @@
package runtime
// The schema-stitching logic is generated in github.com/hay-kot/content/backend/ent/runtime.go
// The schema-stitching logic is generated in github.com/hay-kot/homebox/backend/ent/runtime.go
const (
Version = "v0.11.2" // Version of ent codegen.

View file

@ -4,7 +4,7 @@ import (
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Attachment holds the schema definition for the Attachment entity.

View file

@ -7,7 +7,7 @@ import (
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/index"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// AuthTokens holds the schema definition for the AuthTokens entity.

View file

@ -5,7 +5,7 @@ import (
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Document holds the schema definition for the Document entity.

View file

@ -7,7 +7,7 @@ import (
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/index"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// DocumentToken holds the schema definition for the DocumentToken entity.

View file

@ -5,7 +5,7 @@ import (
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Group holds the schema definition for the Group entity.

View file

@ -6,7 +6,7 @@ import (
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/index"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Item holds the schema definition for the Item entity.

View file

@ -6,7 +6,7 @@ import (
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// ItemField holds the schema definition for the ItemField entity.

View file

@ -5,7 +5,7 @@ import (
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Label holds the schema definition for the Label entity.

View file

@ -4,7 +4,7 @@ import (
"entgo.io/ent"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// Location holds the schema definition for the Location entity.

View file

@ -5,7 +5,7 @@ import (
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/schema/mixins"
"github.com/hay-kot/homebox/backend/ent/schema/mixins"
)
// User holds the schema definition for the User entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/user"
)
// User is the model entity for the User schema.

View file

@ -8,7 +8,7 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/predicate"
)
// ID filters vertices based on their ID field.

View file

@ -11,9 +11,9 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/user"
)
// UserCreate is the builder for creating a User entity.

View file

@ -9,8 +9,8 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// UserDelete is the builder for deleting a User entity.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// UserQuery is the builder for querying User entities.

View file

@ -12,10 +12,10 @@ import (
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/hay-kot/content/backend/ent/authtokens"
"github.com/hay-kot/content/backend/ent/group"
"github.com/hay-kot/content/backend/ent/predicate"
"github.com/hay-kot/content/backend/ent/user"
"github.com/hay-kot/homebox/backend/ent/authtokens"
"github.com/hay-kot/homebox/backend/ent/group"
"github.com/hay-kot/homebox/backend/ent/predicate"
"github.com/hay-kot/homebox/backend/ent/user"
)
// UserUpdate is the builder for updating User entities.