mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-02 07:40:28 +00:00
feat: items-editor (#5)
* format readme * update logo * format html * add logo to docs * repository for document and document tokens * add attachments type and repository * autogenerate types via scripts * use autogenerated types * attachment type updates * add insured and quantity fields for items * implement HasID interface for entities * implement label updates for items * implement service update method * WIP item update client side actions * check err on attachment * finish types for basic items editor * remove unused var * house keeping
This commit is contained in:
parent
fbc364dcd2
commit
95ab14b866
125 changed files with 15626 additions and 1791 deletions
|
@ -12,8 +12,14 @@ import (
|
|||
// Tx is a transactional client that is created by calling Client.Tx().
|
||||
type Tx struct {
|
||||
config
|
||||
// Attachment is the client for interacting with the Attachment builders.
|
||||
Attachment *AttachmentClient
|
||||
// AuthTokens is the client for interacting with the AuthTokens builders.
|
||||
AuthTokens *AuthTokensClient
|
||||
// Document is the client for interacting with the Document builders.
|
||||
Document *DocumentClient
|
||||
// DocumentToken is the client for interacting with the DocumentToken builders.
|
||||
DocumentToken *DocumentTokenClient
|
||||
// Group is the client for interacting with the Group builders.
|
||||
Group *GroupClient
|
||||
// Item is the client for interacting with the Item builders.
|
||||
|
@ -161,7 +167,10 @@ func (tx *Tx) Client() *Client {
|
|||
}
|
||||
|
||||
func (tx *Tx) init() {
|
||||
tx.Attachment = NewAttachmentClient(tx.config)
|
||||
tx.AuthTokens = NewAuthTokensClient(tx.config)
|
||||
tx.Document = NewDocumentClient(tx.config)
|
||||
tx.DocumentToken = NewDocumentTokenClient(tx.config)
|
||||
tx.Group = NewGroupClient(tx.config)
|
||||
tx.Item = NewItemClient(tx.config)
|
||||
tx.ItemField = NewItemFieldClient(tx.config)
|
||||
|
@ -177,7 +186,7 @@ func (tx *Tx) init() {
|
|||
// of them in order to commit or rollback the transaction.
|
||||
//
|
||||
// If a closed transaction is embedded in one of the generated entities, and the entity
|
||||
// applies a query, for example: AuthTokens.QueryXXX(), the query will be executed
|
||||
// applies a query, for example: Attachment.QueryXXX(), the query will be executed
|
||||
// through the driver which created this transaction.
|
||||
//
|
||||
// Note that txDriver is not goroutine safe.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue