From 5c7ccee1c53e2378ac8bf4ea55b8e7d92348a289 Mon Sep 17 00:00:00 2001 From: Yewolf Date: Wed, 23 Aug 2023 02:16:30 +0200 Subject: [PATCH] feat(items): removable buy_limit & optimal_stock --- .gitignore | 11 + backend/Taskfile.yml | 2 +- backend/api/items.go | 11 +- backend/api/transactions.go | 12 +- backend/autogen/bar.gen.go | 877 +++++++++--------- bar.openapi.yml | 16 +- frontend/src/lib/api/api.ts | 26 +- .../src/routes/admin/produits/+page.svelte | 197 ++-- 8 files changed, 630 insertions(+), 522 deletions(-) diff --git a/.gitignore b/.gitignore index 3b735ec..20ab681 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,14 @@ # Go workspace file go.work +<<<<<<< Updated upstream +======= + +*.img + +*.tar + +borne/OVMF.fd + +borne/build/ +>>>>>>> Stashed changes diff --git a/backend/Taskfile.yml b/backend/Taskfile.yml index f4b78e3..56b8d03 100644 --- a/backend/Taskfile.yml +++ b/backend/Taskfile.yml @@ -12,4 +12,4 @@ tasks: cmds: - oapi-codegen -generate="types,server,strict-server,spec" -package autogen ../bar.openapi.yml > autogen/bar.gen.go - go mod tidy - - gomodifytags -all -file ./autogen/bar.gen.go -add-tags bson -add-options bson=omitempty -w > /dev/null \ No newline at end of file + - gomodifytags -all -file ./autogen/bar.gen.go -add-tags bson -w > /dev/null \ No newline at end of file diff --git a/backend/api/items.go b/backend/api/items.go index 7092dfc..87974c8 100644 --- a/backend/api/items.go +++ b/backend/api/items.go @@ -143,6 +143,7 @@ func (s *Server) PostItem(c echo.Context, categoryId autogen.UUID) error { State: p.State, AmountLeft: p.AmountLeft, BuyLimit: p.BuyLimit, + OptimalAmount: p.OptimalAmount, }, } @@ -249,8 +250,16 @@ func (s *Server) PatchItem(c echo.Context, categoryId autogen.UUID, itemId autog if p.AmountLeft != nil { item.AmountLeft = *p.AmountLeft } + if p.OptimalAmount != nil { + item.OptimalAmount = *p.OptimalAmount + } if p.BuyLimit != nil { - item.BuyLimit = *p.BuyLimit + if *p.BuyLimit < 0 { + item.BuyLimit = nil + } else { + var buyLimit uint64 = uint64(*p.BuyLimit) + item.BuyLimit = &buyLimit + } } var rp = item.RealPrices() diff --git a/backend/api/transactions.go b/backend/api/transactions.go index e8ff4b6..3015db1 100644 --- a/backend/api/transactions.go +++ b/backend/api/transactions.go @@ -75,9 +75,11 @@ func (s *Server) PostTransactions(c echo.Context) error { logrus.Warnf("Item %s is not in stock", item.Id.String()) return Error400(c) } - if item.BuyLimit < potentialItem.Amount { - logrus.Warnf("Item %s cannot be bought for that amount", item.Id.String()) - return Error400(c) + if item.BuyLimit != nil { + if *item.BuyLimit < potentialItem.Amount { + logrus.Warnf("Item %s cannot be bought for that amount", item.Id.String()) + return Error400(c) + } } transaction.Items = append(transaction.Items, autogen.TransactionItem{ @@ -118,7 +120,9 @@ func (s *Server) PostTransactions(c echo.Context) error { // update items for _, item := range fetchedItems { - item.BuyLimit += item.AmountLeft + if item.BuyLimit != nil { + *item.BuyLimit += item.AmountLeft + } err = s.DBackend.UpdateItem(ctx, item) if err != nil { logrus.Error(err) diff --git a/backend/autogen/bar.gen.go b/backend/autogen/bar.gen.go index 9f9f70b..557de6f 100644 --- a/backend/autogen/bar.gen.go +++ b/backend/autogen/bar.gen.go @@ -127,27 +127,27 @@ const ( // Account defines model for Account. type Account struct { - Balance int64 `json:"balance" bson:"balance,omitempty"` - CardId string `json:"card_id" bson:"card_id,omitempty"` - CardPin string `json:"-" bson:"card_pin,omitempty"` - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - EmailAddress string `json:"email_address" bson:"email_address,omitempty"` - FirstName string `json:"first_name" bson:"first_name,omitempty"` - GoogleId *string `json:"google_id,omitempty" bson:"google_id,omitempty"` - GooglePicture *string `json:"google_picture,omitempty" bson:"google_picture,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` - LastName string `json:"last_name" bson:"last_name,omitempty"` + Balance int64 `json:"balance" bson:"balance"` + CardId string `json:"card_id" bson:"card_id"` + CardPin string `json:"-" bson:"card_pin"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + EmailAddress string `json:"email_address" bson:"email_address"` + FirstName string `json:"first_name" bson:"first_name"` + GoogleId *string `json:"google_id,omitempty" bson:"google_id"` + GooglePicture *string `json:"google_picture,omitempty" bson:"google_picture"` + Id UUID `json:"id" bson:"id"` + LastName string `json:"last_name" bson:"last_name"` // PriceRole Role of the account - PriceRole AccountPriceRole `json:"price_role" bson:"price_role,omitempty"` - Restrictions []AccountRestrictions `json:"restrictions" bson:"restrictions,omitempty"` + PriceRole AccountPriceRole `json:"price_role" bson:"price_role"` + Restrictions []AccountRestrictions `json:"restrictions" bson:"restrictions"` // Role Role of the account - Role AccountRole `json:"role" bson:"role,omitempty"` + Role AccountRole `json:"role" bson:"role"` // State State of the account - State AccountState `json:"state" bson:"state,omitempty"` + State AccountState `json:"state" bson:"state"` } // AccountPriceRole Role of the account @@ -164,52 +164,52 @@ type AccountState string // CarouselImage defines model for CarouselImage. type CarouselImage struct { - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + Id UUID `json:"id" bson:"id"` // ImageUrl Image to display - ImageUrl string `json:"image_url" bson:"image_url,omitempty"` + ImageUrl string `json:"image_url" bson:"image_url"` } // CarouselImageUpload defines model for CarouselImageUpload. type CarouselImageUpload struct { // Image Image to display - Image openapi_types.File `json:"image" bson:"image,omitempty"` + Image openapi_types.File `json:"image" bson:"image"` } // CarouselText defines model for CarouselText. type CarouselText struct { // Color Color of the text - Color string `json:"color" bson:"color,omitempty"` - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` + Color string `json:"color" bson:"color"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + Id UUID `json:"id" bson:"id"` // Text Text to display - Text string `json:"text" bson:"text,omitempty"` + Text string `json:"text" bson:"text"` } // CarouselTextCreate defines model for CarouselTextCreate. type CarouselTextCreate struct { // Color Color of the text - Color *string `json:"color,omitempty" bson:"color,omitempty"` + Color *string `json:"color,omitempty" bson:"color"` // Text Text to display - Text string `json:"text" bson:"text,omitempty"` + Text string `json:"text" bson:"text"` } // Category defines model for Category. type Category struct { - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + Id UUID `json:"id" bson:"id"` // Name Name of the current category - Name string `json:"name" bson:"name,omitempty"` + Name string `json:"name" bson:"name"` // PictureUri Link to picture of the current category - PictureUri string `json:"picture_uri" bson:"picture_uri,omitempty"` + PictureUri string `json:"picture_uri" bson:"picture_uri"` } // ErrorCodes defines model for ErrorCodes. @@ -217,41 +217,42 @@ type ErrorCodes string // HTTPError defines model for HTTPError. type HTTPError struct { - ErrorCode ErrorCodes `json:"error_code" bson:"error_code,omitempty"` - Message Messages `json:"message" bson:"message,omitempty"` + ErrorCode ErrorCodes `json:"error_code" bson:"error_code"` + Message Messages `json:"message" bson:"message"` } // Item defines model for Item. type Item struct { - AmountLeft uint64 `json:"amount_left" bson:"amount_left,omitempty"` - BuyLimit uint64 `json:"buy_limit" bson:"buy_limit,omitempty"` - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - DisplayPrice *uint64 `json:"display_price,omitempty" bson:"display_price,omitempty"` - DisplayPrices *ItemPrices `json:"display_prices,omitempty" bson:"display_prices,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` + AmountLeft uint64 `json:"amount_left" bson:"amount_left"` + BuyLimit *uint64 `json:"buy_limit,omitempty" bson:"buy_limit"` + CategoryId UUID `json:"category_id" bson:"category_id"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + DisplayPrice *uint64 `json:"display_price,omitempty" bson:"display_price"` + DisplayPrices *ItemPrices `json:"display_prices,omitempty" bson:"display_prices"` + Id UUID `json:"id" bson:"id"` // Name Name of the current item - Name string `json:"name" bson:"name,omitempty"` + Name string `json:"name" bson:"name"` + OptimalAmount uint64 `json:"optimal_amount" bson:"optimal_amount"` // PictureUri Link to picture of the current item - PictureUri string `json:"picture_uri" bson:"picture_uri,omitempty"` - Prices ItemPrices `json:"prices" bson:"prices,omitempty"` - Promotion *uint64 `json:"promotion,omitempty" bson:"promotion,omitempty"` - PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at,omitempty"` + PictureUri string `json:"picture_uri" bson:"picture_uri"` + Prices ItemPrices `json:"prices" bson:"prices"` + Promotion *uint64 `json:"promotion,omitempty" bson:"promotion"` + PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at"` // State State of the item - State ItemState `json:"state" bson:"state,omitempty"` + State ItemState `json:"state" bson:"state"` } // ItemPrices defines model for ItemPrices. type ItemPrices struct { - Ceten uint64 `json:"ceten" bson:"ceten,omitempty"` - Exte uint64 `json:"exte" bson:"exte,omitempty"` - Normal uint64 `json:"normal" bson:"normal,omitempty"` - Staff uint64 `json:"staff" bson:"staff,omitempty"` - Vip uint64 `json:"vip" bson:"vip,omitempty"` + Ceten uint64 `json:"ceten" bson:"ceten"` + Exte uint64 `json:"exte" bson:"exte"` + Normal uint64 `json:"normal" bson:"normal"` + Staff uint64 `json:"staff" bson:"staff"` + Vip uint64 `json:"vip" bson:"vip"` } // ItemState State of the item @@ -262,73 +263,74 @@ type Messages string // NewAccount defines model for NewAccount. type NewAccount struct { - Balance int64 `json:"balance" bson:"balance,omitempty"` - CardId *string `json:"card_id,omitempty" bson:"card_id,omitempty"` - EmailAddress string `json:"email_address" bson:"email_address,omitempty"` - FirstName string `json:"first_name" bson:"first_name,omitempty"` - LastName string `json:"last_name" bson:"last_name,omitempty"` + Balance int64 `json:"balance" bson:"balance"` + CardId *string `json:"card_id,omitempty" bson:"card_id"` + EmailAddress string `json:"email_address" bson:"email_address"` + FirstName string `json:"first_name" bson:"first_name"` + LastName string `json:"last_name" bson:"last_name"` // PriceRole Role of the account - PriceRole *AccountPriceRole `json:"price_role,omitempty" bson:"price_role,omitempty"` + PriceRole *AccountPriceRole `json:"price_role,omitempty" bson:"price_role"` // Role Role of the account - Role AccountRole `json:"role" bson:"role,omitempty"` + Role AccountRole `json:"role" bson:"role"` } // NewCategory defines model for NewCategory. type NewCategory struct { // Name Name of the current category - Name string `json:"name" bson:"name,omitempty"` - Picture string `json:"picture" bson:"picture,omitempty"` + Name string `json:"name" bson:"name"` + Picture string `json:"picture" bson:"picture"` } // NewItem defines model for NewItem. type NewItem struct { - AmountLeft uint64 `json:"amount_left" bson:"amount_left,omitempty"` - BuyLimit uint64 `json:"buy_limit" bson:"buy_limit,omitempty"` + AmountLeft uint64 `json:"amount_left" bson:"amount_left"` + BuyLimit *uint64 `json:"buy_limit,omitempty" bson:"buy_limit"` // Name Name of the current item - Name string `json:"name" bson:"name,omitempty"` + Name string `json:"name" bson:"name"` + OptimalAmount uint64 `json:"optimal_amount" bson:"optimal_amount"` // Picture Picture of the current item - Picture string `json:"picture" bson:"picture,omitempty"` - Prices ItemPrices `json:"prices" bson:"prices,omitempty"` - Promotion *uint64 `json:"promotion,omitempty" bson:"promotion,omitempty"` - PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at,omitempty"` + Picture string `json:"picture" bson:"picture"` + Prices ItemPrices `json:"prices" bson:"prices"` + Promotion *uint64 `json:"promotion,omitempty" bson:"promotion"` + PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at"` // State State of the item - State ItemState `json:"state" bson:"state,omitempty"` + State ItemState `json:"state" bson:"state"` } // NewTransaction defines model for NewTransaction. type NewTransaction struct { // CardPin Pin of the card - CardPin string `json:"card_pin" bson:"card_pin,omitempty"` - Items []NewTransactionItem `json:"items" bson:"items,omitempty"` + CardPin string `json:"card_pin" bson:"card_pin"` + Items []NewTransactionItem `json:"items" bson:"items"` } // NewTransactionItem defines model for NewTransactionItem. type NewTransactionItem struct { - Amount uint64 `json:"amount" bson:"amount,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + Amount uint64 `json:"amount" bson:"amount"` + ItemId UUID `json:"item_id" bson:"item_id"` } // Refill defines model for Refill. type Refill struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` // AccountName Name of the account - AccountName string `json:"account_name" bson:"account_name,omitempty"` - Amount uint64 `json:"amount" bson:"amount,omitempty"` - CanceledBy *UUID `json:"canceled_by,omitempty" bson:"canceled_by,omitempty"` - CanceledByName *string `json:"canceled_by_name,omitempty" bson:"canceled_by_name,omitempty"` - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` - IssuedAt uint64 `json:"issued_at" bson:"issued_at,omitempty"` - IssuedBy UUID `json:"issued_by" bson:"issued_by,omitempty"` - IssuedByName string `json:"issued_by_name" bson:"issued_by_name,omitempty"` - State RefillState `json:"state" bson:"state,omitempty"` + AccountName string `json:"account_name" bson:"account_name"` + Amount uint64 `json:"amount" bson:"amount"` + CanceledBy *UUID `json:"canceled_by,omitempty" bson:"canceled_by"` + CanceledByName *string `json:"canceled_by_name,omitempty" bson:"canceled_by_name"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + Id UUID `json:"id" bson:"id"` + IssuedAt uint64 `json:"issued_at" bson:"issued_at"` + IssuedBy UUID `json:"issued_by" bson:"issued_by"` + IssuedByName string `json:"issued_by_name" bson:"issued_by_name"` + State RefillState `json:"state" bson:"state"` } // RefillState defines model for RefillState. @@ -336,28 +338,28 @@ type RefillState string // Transaction defines model for Transaction. type Transaction struct { - AccountId string `json:"account_id" bson:"account_id,omitempty"` - DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at,omitempty"` - DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by,omitempty"` - Id UUID `json:"id" bson:"id,omitempty"` - Items []TransactionItem `json:"items" bson:"items,omitempty"` - State TransactionState `json:"state" bson:"state,omitempty"` - TotalCost uint64 `json:"total_cost" bson:"total_cost,omitempty"` + AccountId string `json:"account_id" bson:"account_id"` + DeletedAt *uint64 `json:"deleted_at,omitempty" bson:"deleted_at"` + DeletedBy *UUID `json:"deleted_by,omitempty" bson:"deleted_by"` + Id UUID `json:"id" bson:"id"` + Items []TransactionItem `json:"items" bson:"items"` + State TransactionState `json:"state" bson:"state"` + TotalCost uint64 `json:"total_cost" bson:"total_cost"` } // TransactionItem defines model for TransactionItem. type TransactionItem struct { - ItemAmount uint64 `json:"item_amount" bson:"item_amount,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + ItemAmount uint64 `json:"item_amount" bson:"item_amount"` + ItemId UUID `json:"item_id" bson:"item_id"` // ItemName Name of the current item - ItemName string `json:"item_name" bson:"item_name,omitempty"` + ItemName string `json:"item_name" bson:"item_name"` // PictureUri Link to picture of the current item - PictureUri string `json:"picture_uri" bson:"picture_uri,omitempty"` - State TransactionItemState `json:"state" bson:"state,omitempty"` - TotalCost uint64 `json:"total_cost" bson:"total_cost,omitempty"` - UnitCost uint64 `json:"unit_cost" bson:"unit_cost,omitempty"` + PictureUri string `json:"picture_uri" bson:"picture_uri"` + State TransactionItemState `json:"state" bson:"state"` + TotalCost uint64 `json:"total_cost" bson:"total_cost"` + UnitCost uint64 `json:"unit_cost" bson:"unit_cost"` } // TransactionItemState defines model for TransactionItemState. @@ -371,282 +373,283 @@ type UUID = openapi_types.UUID // UpdateAccountAdmin defines model for UpdateAccountAdmin. type UpdateAccountAdmin struct { - Balance *int64 `json:"balance,omitempty" bson:"balance,omitempty"` - CardId *string `json:"card_id,omitempty" bson:"card_id,omitempty"` - EmailAddress *string `json:"email_address,omitempty" bson:"email_address,omitempty"` - FirstName *string `json:"first_name,omitempty" bson:"first_name,omitempty"` - LastName *string `json:"last_name,omitempty" bson:"last_name,omitempty"` + Balance *int64 `json:"balance,omitempty" bson:"balance"` + CardId *string `json:"card_id,omitempty" bson:"card_id"` + EmailAddress *string `json:"email_address,omitempty" bson:"email_address"` + FirstName *string `json:"first_name,omitempty" bson:"first_name"` + LastName *string `json:"last_name,omitempty" bson:"last_name"` // PriceRole Role of the account - PriceRole *AccountPriceRole `json:"price_role,omitempty" bson:"price_role,omitempty"` - Restrictions *[]AccountRestrictions `json:"restrictions,omitempty" bson:"restrictions,omitempty"` + PriceRole *AccountPriceRole `json:"price_role,omitempty" bson:"price_role"` + Restrictions *[]AccountRestrictions `json:"restrictions,omitempty" bson:"restrictions"` // Role Role of the account - Role *AccountRole `json:"role,omitempty" bson:"role,omitempty"` + Role *AccountRole `json:"role,omitempty" bson:"role"` // State State of the account - State *AccountState `json:"state,omitempty" bson:"state,omitempty"` + State *AccountState `json:"state,omitempty" bson:"state"` } // UpdateCategory defines model for UpdateCategory. type UpdateCategory struct { // Name Name of the current category - Name *string `json:"name,omitempty" bson:"name,omitempty"` - Picture *string `json:"picture,omitempty" bson:"picture,omitempty"` + Name *string `json:"name,omitempty" bson:"name"` + Picture *string `json:"picture,omitempty" bson:"picture"` } // UpdateItem defines model for UpdateItem. type UpdateItem struct { - AmountLeft *uint64 `json:"amount_left,omitempty" bson:"amount_left,omitempty"` - BuyLimit *uint64 `json:"buy_limit,omitempty" bson:"buy_limit,omitempty"` - CategoryId *UUID `json:"category_id,omitempty" bson:"category_id,omitempty"` + AmountLeft *uint64 `json:"amount_left,omitempty" bson:"amount_left"` + BuyLimit *int64 `json:"buy_limit,omitempty" bson:"buy_limit"` + CategoryId *UUID `json:"category_id,omitempty" bson:"category_id"` // Name Name of the current item - Name *string `json:"name,omitempty" bson:"name,omitempty"` + Name *string `json:"name,omitempty" bson:"name"` + OptimalAmount *uint64 `json:"optimal_amount,omitempty" bson:"optimal_amount"` // Picture Picture of the current item - Picture *string `json:"picture,omitempty" bson:"picture,omitempty"` - Prices *ItemPrices `json:"prices,omitempty" bson:"prices,omitempty"` - Promotion *uint64 `json:"promotion,omitempty" bson:"promotion,omitempty"` - PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at,omitempty"` + Picture *string `json:"picture,omitempty" bson:"picture"` + Prices *ItemPrices `json:"prices,omitempty" bson:"prices"` + Promotion *uint64 `json:"promotion,omitempty" bson:"promotion"` + PromotionEndsAt *uint64 `json:"promotion_ends_at,omitempty" bson:"promotion_ends_at"` // State State of the item - State *ItemState `json:"state,omitempty" bson:"state,omitempty"` + State *ItemState `json:"state,omitempty" bson:"state"` } // PatchAccountJSONBody defines parameters for PatchAccount. type PatchAccountJSONBody struct { - NewCardPin string `json:"new_card_pin" bson:"new_card_pin,omitempty"` - OldCardPin string `json:"old_card_pin" bson:"old_card_pin,omitempty"` + NewCardPin string `json:"new_card_pin" bson:"new_card_pin"` + OldCardPin string `json:"old_card_pin" bson:"old_card_pin"` } // GetAccountQRJSONBody defines parameters for GetAccountQR. type GetAccountQRJSONBody struct { - CardPin string `json:"card_pin" bson:"card_pin,omitempty"` + CardPin string `json:"card_pin" bson:"card_pin"` } // GetSelfRefillsParams defines parameters for GetSelfRefills. type GetSelfRefillsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // StartDate Start date of the refill - StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date,omitempty"` + StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date"` // EndDate End date of the refill - EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date,omitempty"` + EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date"` } // GetCurrentAccountTransactionsParams defines parameters for GetCurrentAccountTransactions. type GetCurrentAccountTransactionsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // State Filter by state - State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state,omitempty"` + State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state"` } // GetAccountsParams defines parameters for GetAccounts. type GetAccountsParams struct { // Page page to get - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit number of accounts to get - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // Search search string - Search *string `form:"search,omitempty" json:"search,omitempty" bson:"search,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty" bson:"search"` } // GetAccountRefillsParams defines parameters for GetAccountRefills. type GetAccountRefillsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // StartDate Start date of the refill - StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date,omitempty"` + StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date"` // EndDate End date of the refill - EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date,omitempty"` + EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date"` } // PostRefillParams defines parameters for PostRefill. type PostRefillParams struct { // Amount Amount of the refill - Amount uint64 `form:"amount" json:"amount" bson:"amount,omitempty"` + Amount uint64 `form:"amount" json:"amount" bson:"amount"` } // PatchRefillIdParams defines parameters for PatchRefillId. type PatchRefillIdParams struct { // State New state of the refill - State RefillState `form:"state" json:"state" bson:"state,omitempty"` + State RefillState `form:"state" json:"state" bson:"state"` } // GetAccountTransactionsParams defines parameters for GetAccountTransactions. type GetAccountTransactionsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // State Filter by state - State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state,omitempty"` + State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state"` } // PatchTransactionIdParams defines parameters for PatchTransactionId. type PatchTransactionIdParams struct { // State New state of the transaction - State TransactionState `form:"state" json:"state" bson:"state,omitempty"` + State TransactionState `form:"state" json:"state" bson:"state"` } // PatchTransactionItemIdParams defines parameters for PatchTransactionItemId. type PatchTransactionItemIdParams struct { // State New state of the item - State *TransactionItemState `form:"state,omitempty" json:"state,omitempty" bson:"state,omitempty"` + State *TransactionItemState `form:"state,omitempty" json:"state,omitempty" bson:"state"` // Amount New amount of the item - Amount *uint64 `form:"amount,omitempty" json:"amount,omitempty" bson:"amount,omitempty"` + Amount *uint64 `form:"amount,omitempty" json:"amount,omitempty" bson:"amount"` } // ConnectCardJSONBody defines parameters for ConnectCard. type ConnectCardJSONBody struct { - CardId string `json:"card_id" bson:"card_id,omitempty"` - CardPin string `json:"card_pin" bson:"card_pin,omitempty"` + CardId string `json:"card_id" bson:"card_id"` + CardPin string `json:"card_pin" bson:"card_pin"` } // ConnectGoogleParams defines parameters for ConnectGoogle. type ConnectGoogleParams struct { // R Redirect to this url after connecting - R string `form:"r" json:"r" bson:"r,omitempty"` + R string `form:"r" json:"r" bson:"r"` } // CallbackParams defines parameters for Callback. type CallbackParams struct { // Code Google OAuth code - Code string `form:"code" json:"code" bson:"code,omitempty"` + Code string `form:"code" json:"code" bson:"code"` // State Google OAuth state - State string `form:"state" json:"state" bson:"state,omitempty"` + State string `form:"state" json:"state" bson:"state"` } // GetCategoryItemsParams defines parameters for GetCategoryItems. type GetCategoryItemsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of items per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // State Filter by state - State *ItemState `form:"state,omitempty" json:"state,omitempty" bson:"state,omitempty"` + State *ItemState `form:"state,omitempty" json:"state,omitempty" bson:"state"` } // GetDeletedAccountsParams defines parameters for GetDeletedAccounts. type GetDeletedAccountsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // Search search string - Search *string `form:"search,omitempty" json:"search,omitempty" bson:"search,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty" bson:"search"` } // GetDeletedCarouselImagesParams defines parameters for GetDeletedCarouselImages. type GetDeletedCarouselImagesParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // GetDeletedCarouselTextsParams defines parameters for GetDeletedCarouselTexts. type GetDeletedCarouselTextsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // GetDeletedCategoriesParams defines parameters for GetDeletedCategories. type GetDeletedCategoriesParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of categories per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // GetDeletedItemsParams defines parameters for GetDeletedItems. type GetDeletedItemsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // GetDeletedRefillsParams defines parameters for GetDeletedRefills. type GetDeletedRefillsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // GetDeletedTransactionsParams defines parameters for GetDeletedTransactions. type GetDeletedTransactionsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of accounts per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` } // ImportAccountsMultipartBody defines parameters for ImportAccounts. type ImportAccountsMultipartBody struct { - File *openapi_types.File `json:"file,omitempty" bson:"file,omitempty"` + File *openapi_types.File `json:"file,omitempty" bson:"file"` } // GetRefillsParams defines parameters for GetRefills. type GetRefillsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // StartDate Start date of the refill - StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date,omitempty"` + StartDate *openapi_types.Date `form:"start_date,omitempty" json:"start_date,omitempty" bson:"start_date"` // EndDate End date of the refill - EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date,omitempty"` + EndDate *openapi_types.Date `form:"end_date,omitempty" json:"end_date,omitempty" bson:"end_date"` } // GetTransactionsParams defines parameters for GetTransactions. type GetTransactionsParams struct { // Page Page number - Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page,omitempty"` + Page *uint64 `form:"page,omitempty" json:"page,omitempty" bson:"page"` // Limit Number of transactions per page - Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit,omitempty"` + Limit *uint64 `form:"limit,omitempty" json:"limit,omitempty" bson:"limit"` // State Filter by state - State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state,omitempty"` + State *TransactionState `form:"state,omitempty" json:"state,omitempty" bson:"state"` } // PatchAccountJSONRequestBody defines body for PatchAccount for application/json ContentType. @@ -901,7 +904,7 @@ type ServerInterface interface { // ServerInterfaceWrapper converts echo contexts to parameters. type ServerInterfaceWrapper struct { - Handler ServerInterface `bson:"handler,omitempty"` + Handler ServerInterface `bson:"handler"` } // GetAccount converts echo context to params. @@ -2506,8 +2509,8 @@ type GetAccountResponseObject interface { } type GetAccount200JSONResponse struct { - Account *Account `json:"account,omitempty" bson:"account,omitempty"` - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` + Account *Account `json:"account,omitempty" bson:"account"` + Message *Messages `json:"message,omitempty" bson:"message"` } func (response GetAccount200JSONResponse) VisitGetAccountResponse(w http.ResponseWriter) error { @@ -2536,7 +2539,7 @@ func (response GetAccount500JSONResponse) VisitGetAccountResponse(w http.Respons } type PatchAccountRequestObject struct { - Body *PatchAccountJSONRequestBody `bson:"body,omitempty"` + Body *PatchAccountJSONRequestBody `bson:"body"` } type PatchAccountResponseObject interface { @@ -2544,8 +2547,8 @@ type PatchAccountResponseObject interface { } type PatchAccount200JSONResponse struct { - Account *Account `json:"account,omitempty" bson:"account,omitempty"` - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` + Account *Account `json:"account,omitempty" bson:"account"` + Message *Messages `json:"message,omitempty" bson:"message"` } func (response PatchAccount200JSONResponse) VisitPatchAccountResponse(w http.ResponseWriter) error { @@ -2608,9 +2611,9 @@ type GetAccountAdminResponseObject interface { } type GetAccountAdmin200JSONResponse struct { - CanRestore bool `json:"can_restore" bson:"can_restore,omitempty"` - IsAllowed bool `json:"is_allowed" bson:"is_allowed,omitempty"` - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` + CanRestore bool `json:"can_restore" bson:"can_restore"` + IsAllowed bool `json:"is_allowed" bson:"is_allowed"` + Message *Messages `json:"message,omitempty" bson:"message"` } func (response GetAccountAdmin200JSONResponse) VisitGetAccountAdminResponse(w http.ResponseWriter) error { @@ -2664,13 +2667,13 @@ type GetAccountQRWebsocketResponseObject interface { } type GetAccountQRWebsocket101ResponseHeaders struct { - Connection string `bson:"connection,omitempty"` - SecWebSocketAccept string `bson:"sec_web_socket_accept,omitempty"` - Upgrade string `bson:"upgrade,omitempty"` + Connection string `bson:"connection"` + SecWebSocketAccept string `bson:"sec_web_socket_accept"` + Upgrade string `bson:"upgrade"` } type GetAccountQRWebsocket101Response struct { - Headers GetAccountQRWebsocket101ResponseHeaders `bson:"headers,omitempty"` + Headers GetAccountQRWebsocket101ResponseHeaders `bson:"headers"` } func (response GetAccountQRWebsocket101Response) VisitGetAccountQRWebsocketResponse(w http.ResponseWriter) error { @@ -2682,7 +2685,7 @@ func (response GetAccountQRWebsocket101Response) VisitGetAccountQRWebsocketRespo } type GetAccountQRRequestObject struct { - Body *GetAccountQRJSONRequestBody `bson:"body,omitempty"` + Body *GetAccountQRJSONRequestBody `bson:"body"` } type GetAccountQRResponseObject interface { @@ -2690,8 +2693,8 @@ type GetAccountQRResponseObject interface { } type GetAccountQR200ImagepngResponse struct { - Body io.Reader `bson:"body,omitempty"` - ContentLength int64 `bson:"content_length,omitempty"` + Body io.Reader `bson:"body"` + ContentLength int64 `bson:"content_length"` } func (response GetAccountQR200ImagepngResponse) VisitGetAccountQRResponse(w http.ResponseWriter) error { @@ -2727,7 +2730,7 @@ func (response GetAccountQR500JSONResponse) VisitGetAccountQRResponse(w http.Res } type GetSelfRefillsRequestObject struct { - Params GetSelfRefillsParams `bson:"params,omitempty"` + Params GetSelfRefillsParams `bson:"params"` } type GetSelfRefillsResponseObject interface { @@ -2735,10 +2738,10 @@ type GetSelfRefillsResponseObject interface { } type GetSelfRefills200JSONResponse struct { - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` - Refills *[]Refill `json:"refills,omitempty" bson:"refills,omitempty"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` + Refills *[]Refill `json:"refills,omitempty" bson:"refills"` } func (response GetSelfRefills200JSONResponse) VisitGetSelfRefillsResponse(w http.ResponseWriter) error { @@ -2767,7 +2770,7 @@ func (response GetSelfRefills500JSONResponse) VisitGetSelfRefillsResponse(w http } type GetCurrentAccountTransactionsRequestObject struct { - Params GetCurrentAccountTransactionsParams `bson:"params,omitempty"` + Params GetCurrentAccountTransactionsParams `bson:"params"` } type GetCurrentAccountTransactionsResponseObject interface { @@ -2775,10 +2778,10 @@ type GetCurrentAccountTransactionsResponseObject interface { } type GetCurrentAccountTransactions200JSONResponse struct { - Limit *uint64 `json:"limit,omitempty" bson:"limit,omitempty"` - MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page,omitempty"` - Page *uint64 `json:"page,omitempty" bson:"page,omitempty"` - Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions,omitempty"` + Limit *uint64 `json:"limit,omitempty" bson:"limit"` + MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page"` + Page *uint64 `json:"page,omitempty" bson:"page"` + Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions"` } func (response GetCurrentAccountTransactions200JSONResponse) VisitGetCurrentAccountTransactionsResponse(w http.ResponseWriter) error { @@ -2807,7 +2810,7 @@ func (response GetCurrentAccountTransactions403JSONResponse) VisitGetCurrentAcco } type PostTransactionsRequestObject struct { - Body *PostTransactionsJSONRequestBody `bson:"body,omitempty"` + Body *PostTransactionsJSONRequestBody `bson:"body"` } type PostTransactionsResponseObject interface { @@ -2860,7 +2863,7 @@ func (response PostTransactions500JSONResponse) VisitPostTransactionsResponse(w } type GetAccountsRequestObject struct { - Params GetAccountsParams `bson:"params,omitempty"` + Params GetAccountsParams `bson:"params"` } type GetAccountsResponseObject interface { @@ -2868,11 +2871,11 @@ type GetAccountsResponseObject interface { } type GetAccounts200JSONResponse struct { - Accounts []Account `json:"accounts" bson:"accounts,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Accounts []Account `json:"accounts" bson:"accounts"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Message *Messages `json:"message,omitempty" bson:"message"` + Page uint64 `json:"page" bson:"page"` } func (response GetAccounts200JSONResponse) VisitGetAccountsResponse(w http.ResponseWriter) error { @@ -2910,7 +2913,7 @@ func (response GetAccounts500JSONResponse) VisitGetAccountsResponse(w http.Respo } type PostAccountsRequestObject struct { - Body *PostAccountsJSONRequestBody `bson:"body,omitempty"` + Body *PostAccountsJSONRequestBody `bson:"body"` } type PostAccountsResponseObject interface { @@ -2963,7 +2966,7 @@ func (response PostAccounts500JSONResponse) VisitPostAccountsResponse(w http.Res } type MarkDeleteAccountIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` } type MarkDeleteAccountIdResponseObject interface { @@ -3015,7 +3018,7 @@ func (response MarkDeleteAccountId500JSONResponse) VisitMarkDeleteAccountIdRespo } type GetAccountIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` } type GetAccountIdResponseObject interface { @@ -3068,8 +3071,8 @@ func (response GetAccountId500JSONResponse) VisitGetAccountIdResponse(w http.Res } type PatchAccountIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - Body *PatchAccountIdJSONRequestBody `bson:"body,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + Body *PatchAccountIdJSONRequestBody `bson:"body"` } type PatchAccountIdResponseObject interface { @@ -3122,8 +3125,8 @@ func (response PatchAccountId500JSONResponse) VisitPatchAccountIdResponse(w http } type GetAccountRefillsRequestObject struct { - AccountId string `json:"account_id" bson:"account_id,omitempty"` - Params GetAccountRefillsParams `bson:"params,omitempty"` + AccountId string `json:"account_id" bson:"account_id"` + Params GetAccountRefillsParams `bson:"params"` } type GetAccountRefillsResponseObject interface { @@ -3131,10 +3134,10 @@ type GetAccountRefillsResponseObject interface { } type GetAccountRefills200JSONResponse struct { - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` - Refills *[]Refill `json:"refills,omitempty" bson:"refills,omitempty"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` + Refills *[]Refill `json:"refills,omitempty" bson:"refills"` } func (response GetAccountRefills200JSONResponse) VisitGetAccountRefillsResponse(w http.ResponseWriter) error { @@ -3181,8 +3184,8 @@ func (response GetAccountRefills500JSONResponse) VisitGetAccountRefillsResponse( } type PostRefillRequestObject struct { - AccountId string `json:"account_id" bson:"account_id,omitempty"` - Params PostRefillParams `bson:"params,omitempty"` + AccountId string `json:"account_id" bson:"account_id"` + Params PostRefillParams `bson:"params"` } type PostRefillResponseObject interface { @@ -3244,8 +3247,8 @@ func (response PostRefill500JSONResponse) VisitPostRefillResponse(w http.Respons } type MarkDeleteRefillRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - RefillId UUID `json:"refill_id" bson:"refill_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + RefillId UUID `json:"refill_id" bson:"refill_id"` } type MarkDeleteRefillResponseObject interface { @@ -3297,9 +3300,9 @@ func (response MarkDeleteRefill500JSONResponse) VisitMarkDeleteRefillResponse(w } type PatchRefillIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - RefillId UUID `json:"refill_id" bson:"refill_id,omitempty"` - Params PatchRefillIdParams `bson:"params,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + RefillId UUID `json:"refill_id" bson:"refill_id"` + Params PatchRefillIdParams `bson:"params"` } type PatchRefillIdResponseObject interface { @@ -3370,8 +3373,8 @@ func (response PatchRefillId500JSONResponse) VisitPatchRefillIdResponse(w http.R } type GetAccountTransactionsRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - Params GetAccountTransactionsParams `bson:"params,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + Params GetAccountTransactionsParams `bson:"params"` } type GetAccountTransactionsResponseObject interface { @@ -3379,10 +3382,10 @@ type GetAccountTransactionsResponseObject interface { } type GetAccountTransactions200JSONResponse struct { - Limit *uint64 `json:"limit,omitempty" bson:"limit,omitempty"` - MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page,omitempty"` - Page *uint64 `json:"page,omitempty" bson:"page,omitempty"` - Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions,omitempty"` + Limit *uint64 `json:"limit,omitempty" bson:"limit"` + MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page"` + Page *uint64 `json:"page,omitempty" bson:"page"` + Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions"` } func (response GetAccountTransactions200JSONResponse) VisitGetAccountTransactionsResponse(w http.ResponseWriter) error { @@ -3420,8 +3423,8 @@ func (response GetAccountTransactions500JSONResponse) VisitGetAccountTransaction } type MarkDeleteTransactionIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` } type MarkDeleteTransactionIdResponseObject interface { @@ -3474,8 +3477,8 @@ func (response MarkDeleteTransactionId500JSONResponse) VisitMarkDeleteTransactio } type GetTransactionIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` } type GetTransactionIdResponseObject interface { @@ -3528,9 +3531,9 @@ func (response GetTransactionId500JSONResponse) VisitGetTransactionIdResponse(w } type PatchTransactionIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` - Params PatchTransactionIdParams `bson:"params,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` + Params PatchTransactionIdParams `bson:"params"` } type PatchTransactionIdResponseObject interface { @@ -3583,10 +3586,10 @@ func (response PatchTransactionId500JSONResponse) VisitPatchTransactionIdRespons } type PatchTransactionItemIdRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` - Params PatchTransactionItemIdParams `bson:"params,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` + ItemId UUID `json:"item_id" bson:"item_id"` + Params PatchTransactionItemIdParams `bson:"params"` } type PatchTransactionItemIdResponseObject interface { @@ -3639,7 +3642,7 @@ func (response PatchTransactionItemId500JSONResponse) VisitPatchTransactionItemI } type ConnectCardRequestObject struct { - Body *ConnectCardJSONRequestBody `bson:"body,omitempty"` + Body *ConnectCardJSONRequestBody `bson:"body"` } type ConnectCardResponseObject interface { @@ -3647,8 +3650,8 @@ type ConnectCardResponseObject interface { } type ConnectCard200JSONResponse struct { - Account *Account `json:"account,omitempty" bson:"account,omitempty"` - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` + Account *Account `json:"account,omitempty" bson:"account"` + Message *Messages `json:"message,omitempty" bson:"message"` } func (response ConnectCard200JSONResponse) VisitConnectCardResponse(w http.ResponseWriter) error { @@ -3686,7 +3689,7 @@ func (response ConnectCard500JSONResponse) VisitConnectCardResponse(w http.Respo } type ConnectGoogleRequestObject struct { - Params ConnectGoogleParams `bson:"params,omitempty"` + Params ConnectGoogleParams `bson:"params"` } type ConnectGoogleResponseObject interface { @@ -3694,11 +3697,11 @@ type ConnectGoogleResponseObject interface { } type ConnectGoogle301ResponseHeaders struct { - Location string `bson:"location,omitempty"` + Location string `bson:"location"` } type ConnectGoogle301Response struct { - Headers ConnectGoogle301ResponseHeaders `bson:"headers,omitempty"` + Headers ConnectGoogle301ResponseHeaders `bson:"headers"` } func (response ConnectGoogle301Response) VisitConnectGoogleResponse(w http.ResponseWriter) error { @@ -3735,7 +3738,7 @@ func (response ConnectGoogle500JSONResponse) VisitConnectGoogleResponse(w http.R } type ConnectAccountRequestObject struct { - QrNonce string `json:"qr_nonce" bson:"qr_nonce,omitempty"` + QrNonce string `json:"qr_nonce" bson:"qr_nonce"` } type ConnectAccountResponseObject interface { @@ -3743,11 +3746,11 @@ type ConnectAccountResponseObject interface { } type ConnectAccount301ResponseHeaders struct { - Location string `bson:"location,omitempty"` + Location string `bson:"location"` } type ConnectAccount301Response struct { - Headers ConnectAccount301ResponseHeaders `bson:"headers,omitempty"` + Headers ConnectAccount301ResponseHeaders `bson:"headers"` } func (response ConnectAccount301Response) VisitConnectAccountResponse(w http.ResponseWriter) error { @@ -3775,7 +3778,7 @@ func (response ConnectAccount500JSONResponse) VisitConnectAccountResponse(w http } type CallbackRequestObject struct { - Params CallbackParams `bson:"params,omitempty"` + Params CallbackParams `bson:"params"` } type CallbackResponseObject interface { @@ -3783,11 +3786,11 @@ type CallbackResponseObject interface { } type Callback301ResponseHeaders struct { - Location string `bson:"location,omitempty"` + Location string `bson:"location"` } type Callback301Response struct { - Headers Callback301ResponseHeaders `bson:"headers,omitempty"` + Headers Callback301ResponseHeaders `bson:"headers"` } func (response Callback301Response) VisitCallbackResponse(w http.ResponseWriter) error { @@ -3831,7 +3834,7 @@ func (response GetCarouselImages500JSONResponse) VisitGetCarouselImagesResponse( } type AddCarouselImageRequestObject struct { - Body *multipart.Reader `bson:"body,omitempty"` + Body *multipart.Reader `bson:"body"` } type AddCarouselImageResponseObject interface { @@ -3893,7 +3896,7 @@ func (response AddCarouselImage500JSONResponse) VisitAddCarouselImageResponse(w } type MarkDeleteCarouselImageRequestObject struct { - ImageId UUID `json:"image_id" bson:"image_id,omitempty"` + ImageId UUID `json:"image_id" bson:"image_id"` } type MarkDeleteCarouselImageResponseObject interface { @@ -3945,7 +3948,7 @@ func (response MarkDeleteCarouselImage500JSONResponse) VisitMarkDeleteCarouselIm } type GetCarouselImageRequestObject struct { - ImageId UUID `json:"image_id" bson:"image_id,omitempty"` + ImageId UUID `json:"image_id" bson:"image_id"` } type GetCarouselImageResponseObject interface { @@ -3953,9 +3956,9 @@ type GetCarouselImageResponseObject interface { } type GetCarouselImage200ImageResponse struct { - Body io.Reader `bson:"body,omitempty"` - ContentType string `bson:"content_type,omitempty"` - ContentLength int64 `bson:"content_length,omitempty"` + Body io.Reader `bson:"body"` + ContentType string `bson:"content_type"` + ContentLength int64 `bson:"content_length"` } func (response GetCarouselImage200ImageResponse) VisitGetCarouselImageResponse(w http.ResponseWriter) error { @@ -4016,7 +4019,7 @@ func (response GetCarouselTexts500JSONResponse) VisitGetCarouselTextsResponse(w } type AddCarouselTextRequestObject struct { - Body *AddCarouselTextJSONRequestBody `bson:"body,omitempty"` + Body *AddCarouselTextJSONRequestBody `bson:"body"` } type AddCarouselTextResponseObject interface { @@ -4078,7 +4081,7 @@ func (response AddCarouselText500JSONResponse) VisitAddCarouselTextResponse(w ht } type MarkDeleteCarouselTextRequestObject struct { - TextId UUID `json:"text_id" bson:"text_id,omitempty"` + TextId UUID `json:"text_id" bson:"text_id"` } type MarkDeleteCarouselTextResponseObject interface { @@ -4155,7 +4158,7 @@ func (response GetCategories500JSONResponse) VisitGetCategoriesResponse(w http.R } type PostCategoryRequestObject struct { - Body *PostCategoryJSONRequestBody `bson:"body,omitempty"` + Body *PostCategoryJSONRequestBody `bson:"body"` } type PostCategoryResponseObject interface { @@ -4217,7 +4220,7 @@ func (response PostCategory500JSONResponse) VisitPostCategoryResponse(w http.Res } type MarkDeleteCategoryRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` } type MarkDeleteCategoryResponseObject interface { @@ -4251,7 +4254,7 @@ func (response MarkDeleteCategory500JSONResponse) VisitMarkDeleteCategoryRespons } type GetCategoryRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` } type GetCategoryResponseObject interface { @@ -4286,8 +4289,8 @@ func (response GetCategory500JSONResponse) VisitGetCategoryResponse(w http.Respo } type PatchCategoryRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - Body *PatchCategoryJSONRequestBody `bson:"body,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + Body *PatchCategoryJSONRequestBody `bson:"body"` } type PatchCategoryResponseObject interface { @@ -4349,8 +4352,8 @@ func (response PatchCategory500JSONResponse) VisitPatchCategoryResponse(w http.R } type GetCategoryItemsRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - Params GetCategoryItemsParams `bson:"params,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + Params GetCategoryItemsParams `bson:"params"` } type GetCategoryItemsResponseObject interface { @@ -4358,10 +4361,10 @@ type GetCategoryItemsResponseObject interface { } type GetCategoryItems200JSONResponse struct { - Items *[]Item `json:"items,omitempty" bson:"items,omitempty"` - Limit *uint64 `json:"limit,omitempty" bson:"limit,omitempty"` - MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page,omitempty"` - Page *uint64 `json:"page,omitempty" bson:"page,omitempty"` + Items *[]Item `json:"items,omitempty" bson:"items"` + Limit *uint64 `json:"limit,omitempty" bson:"limit"` + MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page"` + Page *uint64 `json:"page,omitempty" bson:"page"` } func (response GetCategoryItems200JSONResponse) VisitGetCategoryItemsResponse(w http.ResponseWriter) error { @@ -4390,8 +4393,8 @@ func (response GetCategoryItems500JSONResponse) VisitGetCategoryItemsResponse(w } type PostItemRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - Body *PostItemJSONRequestBody `bson:"body,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + Body *PostItemJSONRequestBody `bson:"body"` } type PostItemResponseObject interface { @@ -4453,8 +4456,8 @@ func (response PostItem500JSONResponse) VisitPostItemResponse(w http.ResponseWri } type MarkDeleteItemRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + ItemId UUID `json:"item_id" bson:"item_id"` } type MarkDeleteItemResponseObject interface { @@ -4506,9 +4509,9 @@ func (response MarkDeleteItem500JSONResponse) VisitMarkDeleteItemResponse(w http } type PatchItemRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` - Body *PatchItemJSONRequestBody `bson:"body,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + ItemId UUID `json:"item_id" bson:"item_id"` + Body *PatchItemJSONRequestBody `bson:"body"` } type PatchItemResponseObject interface { @@ -4570,8 +4573,8 @@ func (response PatchItem500JSONResponse) VisitPatchItemResponse(w http.ResponseW } type GetItemPictureRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` + ItemId UUID `json:"item_id" bson:"item_id"` } type GetItemPictureResponseObject interface { @@ -4579,8 +4582,8 @@ type GetItemPictureResponseObject interface { } type GetItemPicture200ImagepngResponse struct { - Body io.Reader `bson:"body,omitempty"` - ContentLength int64 `bson:"content_length,omitempty"` + Body io.Reader `bson:"body"` + ContentLength int64 `bson:"content_length"` } func (response GetItemPicture200ImagepngResponse) VisitGetItemPictureResponse(w http.ResponseWriter) error { @@ -4616,7 +4619,7 @@ func (response GetItemPicture500JSONResponse) VisitGetItemPictureResponse(w http } type GetCategoryPictureRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` } type GetCategoryPictureResponseObject interface { @@ -4624,8 +4627,8 @@ type GetCategoryPictureResponseObject interface { } type GetCategoryPicture200ImagepngResponse struct { - Body io.Reader `bson:"body,omitempty"` - ContentLength int64 `bson:"content_length,omitempty"` + Body io.Reader `bson:"body"` + ContentLength int64 `bson:"content_length"` } func (response GetCategoryPicture200ImagepngResponse) VisitGetCategoryPictureResponse(w http.ResponseWriter) error { @@ -4661,7 +4664,7 @@ func (response GetCategoryPicture500JSONResponse) VisitGetCategoryPictureRespons } type GetDeletedAccountsRequestObject struct { - Params GetDeletedAccountsParams `bson:"params,omitempty"` + Params GetDeletedAccountsParams `bson:"params"` } type GetDeletedAccountsResponseObject interface { @@ -4669,10 +4672,10 @@ type GetDeletedAccountsResponseObject interface { } type GetDeletedAccounts200JSONResponse struct { - Accounts []Account `json:"accounts" bson:"accounts,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Accounts []Account `json:"accounts" bson:"accounts"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` } func (response GetDeletedAccounts200JSONResponse) VisitGetDeletedAccountsResponse(w http.ResponseWriter) error { @@ -4710,7 +4713,7 @@ func (response GetDeletedAccounts500JSONResponse) VisitGetDeletedAccountsRespons } type DeleteAccountRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` } type DeleteAccountResponseObject interface { @@ -4771,7 +4774,7 @@ func (response DeleteAccount500JSONResponse) VisitDeleteAccountResponse(w http.R } type RestoreDeletedAccountRequestObject struct { - AccountId UUID `json:"account_id" bson:"account_id,omitempty"` + AccountId UUID `json:"account_id" bson:"account_id"` } type RestoreDeletedAccountResponseObject interface { @@ -4841,7 +4844,7 @@ func (response RestoreDeletedAccount500JSONResponse) VisitRestoreDeletedAccountR } type GetDeletedCarouselImagesRequestObject struct { - Params GetDeletedCarouselImagesParams `bson:"params,omitempty"` + Params GetDeletedCarouselImagesParams `bson:"params"` } type GetDeletedCarouselImagesResponseObject interface { @@ -4849,10 +4852,10 @@ type GetDeletedCarouselImagesResponseObject interface { } type GetDeletedCarouselImages200JSONResponse struct { - Items []CarouselImage `json:"items" bson:"items,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Items []CarouselImage `json:"items" bson:"items"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` } func (response GetDeletedCarouselImages200JSONResponse) VisitGetDeletedCarouselImagesResponse(w http.ResponseWriter) error { @@ -4890,7 +4893,7 @@ func (response GetDeletedCarouselImages500JSONResponse) VisitGetDeletedCarouselI } type DeleteCarouselImageRequestObject struct { - ImageId UUID `json:"image_id" bson:"image_id,omitempty"` + ImageId UUID `json:"image_id" bson:"image_id"` } type DeleteCarouselImageResponseObject interface { @@ -4951,7 +4954,7 @@ func (response DeleteCarouselImage500JSONResponse) VisitDeleteCarouselImageRespo } type RestoreDeletedCarouselImageRequestObject struct { - ImageId UUID `json:"image_id" bson:"image_id,omitempty"` + ImageId UUID `json:"image_id" bson:"image_id"` } type RestoreDeletedCarouselImageResponseObject interface { @@ -5021,7 +5024,7 @@ func (response RestoreDeletedCarouselImage500JSONResponse) VisitRestoreDeletedCa } type GetDeletedCarouselTextsRequestObject struct { - Params GetDeletedCarouselTextsParams `bson:"params,omitempty"` + Params GetDeletedCarouselTextsParams `bson:"params"` } type GetDeletedCarouselTextsResponseObject interface { @@ -5029,10 +5032,10 @@ type GetDeletedCarouselTextsResponseObject interface { } type GetDeletedCarouselTexts200JSONResponse struct { - Items []CarouselText `json:"items" bson:"items,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Items []CarouselText `json:"items" bson:"items"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` } func (response GetDeletedCarouselTexts200JSONResponse) VisitGetDeletedCarouselTextsResponse(w http.ResponseWriter) error { @@ -5070,7 +5073,7 @@ func (response GetDeletedCarouselTexts500JSONResponse) VisitGetDeletedCarouselTe } type DeleteCarouselTextRequestObject struct { - TextId UUID `json:"text_id" bson:"text_id,omitempty"` + TextId UUID `json:"text_id" bson:"text_id"` } type DeleteCarouselTextResponseObject interface { @@ -5131,7 +5134,7 @@ func (response DeleteCarouselText500JSONResponse) VisitDeleteCarouselTextRespons } type RestoreDeletedCarouselTextRequestObject struct { - TextId UUID `json:"text_id" bson:"text_id,omitempty"` + TextId UUID `json:"text_id" bson:"text_id"` } type RestoreDeletedCarouselTextResponseObject interface { @@ -5201,7 +5204,7 @@ func (response RestoreDeletedCarouselText500JSONResponse) VisitRestoreDeletedCar } type GetDeletedCategoriesRequestObject struct { - Params GetDeletedCategoriesParams `bson:"params,omitempty"` + Params GetDeletedCategoriesParams `bson:"params"` } type GetDeletedCategoriesResponseObject interface { @@ -5209,10 +5212,10 @@ type GetDeletedCategoriesResponseObject interface { } type GetDeletedCategories200JSONResponse struct { - Categories []Category `json:"categories" bson:"categories,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Categories []Category `json:"categories" bson:"categories"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` } func (response GetDeletedCategories200JSONResponse) VisitGetDeletedCategoriesResponse(w http.ResponseWriter) error { @@ -5250,7 +5253,7 @@ func (response GetDeletedCategories500JSONResponse) VisitGetDeletedCategoriesRes } type DeleteCategoryRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` } type DeleteCategoryResponseObject interface { @@ -5311,7 +5314,7 @@ func (response DeleteCategory500JSONResponse) VisitDeleteCategoryResponse(w http } type RestoreDeletedCategoryRequestObject struct { - CategoryId UUID `json:"category_id" bson:"category_id,omitempty"` + CategoryId UUID `json:"category_id" bson:"category_id"` } type RestoreDeletedCategoryResponseObject interface { @@ -5381,7 +5384,7 @@ func (response RestoreDeletedCategory500JSONResponse) VisitRestoreDeletedCategor } type GetDeletedItemsRequestObject struct { - Params GetDeletedItemsParams `bson:"params,omitempty"` + Params GetDeletedItemsParams `bson:"params"` } type GetDeletedItemsResponseObject interface { @@ -5389,10 +5392,10 @@ type GetDeletedItemsResponseObject interface { } type GetDeletedItems200JSONResponse struct { - Items []Item `json:"items" bson:"items,omitempty"` - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` + Items []Item `json:"items" bson:"items"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` } func (response GetDeletedItems200JSONResponse) VisitGetDeletedItemsResponse(w http.ResponseWriter) error { @@ -5430,7 +5433,7 @@ func (response GetDeletedItems500JSONResponse) VisitGetDeletedItemsResponse(w ht } type DeleteItemRequestObject struct { - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + ItemId UUID `json:"item_id" bson:"item_id"` } type DeleteItemResponseObject interface { @@ -5491,7 +5494,7 @@ func (response DeleteItem500JSONResponse) VisitDeleteItemResponse(w http.Respons } type RestoreDeletedItemRequestObject struct { - ItemId UUID `json:"item_id" bson:"item_id,omitempty"` + ItemId UUID `json:"item_id" bson:"item_id"` } type RestoreDeletedItemResponseObject interface { @@ -5561,7 +5564,7 @@ func (response RestoreDeletedItem500JSONResponse) VisitRestoreDeletedItemRespons } type GetDeletedRefillsRequestObject struct { - Params GetDeletedRefillsParams `bson:"params,omitempty"` + Params GetDeletedRefillsParams `bson:"params"` } type GetDeletedRefillsResponseObject interface { @@ -5569,10 +5572,10 @@ type GetDeletedRefillsResponseObject interface { } type GetDeletedRefills200JSONResponse struct { - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` - Refills []Refill `json:"refills" bson:"refills,omitempty"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` + Refills []Refill `json:"refills" bson:"refills"` } func (response GetDeletedRefills200JSONResponse) VisitGetDeletedRefillsResponse(w http.ResponseWriter) error { @@ -5610,7 +5613,7 @@ func (response GetDeletedRefills500JSONResponse) VisitGetDeletedRefillsResponse( } type DeleteRefillRequestObject struct { - RefillId UUID `json:"refill_id" bson:"refill_id,omitempty"` + RefillId UUID `json:"refill_id" bson:"refill_id"` } type DeleteRefillResponseObject interface { @@ -5671,7 +5674,7 @@ func (response DeleteRefill500JSONResponse) VisitDeleteRefillResponse(w http.Res } type RestoreDeletedRefillRequestObject struct { - RefillId UUID `json:"refill_id" bson:"refill_id,omitempty"` + RefillId UUID `json:"refill_id" bson:"refill_id"` } type RestoreDeletedRefillResponseObject interface { @@ -5741,7 +5744,7 @@ func (response RestoreDeletedRefill500JSONResponse) VisitRestoreDeletedRefillRes } type GetDeletedTransactionsRequestObject struct { - Params GetDeletedTransactionsParams `bson:"params,omitempty"` + Params GetDeletedTransactionsParams `bson:"params"` } type GetDeletedTransactionsResponseObject interface { @@ -5749,10 +5752,10 @@ type GetDeletedTransactionsResponseObject interface { } type GetDeletedTransactions200JSONResponse struct { - Limit uint64 `json:"limit" bson:"limit,omitempty"` - MaxPage uint64 `json:"max_page" bson:"max_page,omitempty"` - Page uint64 `json:"page" bson:"page,omitempty"` - Transactions []Transaction `json:"transactions" bson:"transactions,omitempty"` + Limit uint64 `json:"limit" bson:"limit"` + MaxPage uint64 `json:"max_page" bson:"max_page"` + Page uint64 `json:"page" bson:"page"` + Transactions []Transaction `json:"transactions" bson:"transactions"` } func (response GetDeletedTransactions200JSONResponse) VisitGetDeletedTransactionsResponse(w http.ResponseWriter) error { @@ -5790,7 +5793,7 @@ func (response GetDeletedTransactions500JSONResponse) VisitGetDeletedTransaction } type DeleteTransactionRequestObject struct { - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` } type DeleteTransactionResponseObject interface { @@ -5851,7 +5854,7 @@ func (response DeleteTransaction500JSONResponse) VisitDeleteTransactionResponse( } type RestoreDeletedTransactionRequestObject struct { - TransactionId UUID `json:"transaction_id" bson:"transaction_id,omitempty"` + TransactionId UUID `json:"transaction_id" bson:"transaction_id"` } type RestoreDeletedTransactionResponseObject interface { @@ -5921,7 +5924,7 @@ func (response RestoreDeletedTransaction500JSONResponse) VisitRestoreDeletedTran } type ImportAccountsRequestObject struct { - Body *multipart.Reader `bson:"body,omitempty"` + Body *multipart.Reader `bson:"body"` } type ImportAccountsResponseObject interface { @@ -5929,8 +5932,8 @@ type ImportAccountsResponseObject interface { } type ImportAccounts200JSONResponse struct { - Message *Messages `json:"message,omitempty" bson:"message,omitempty"` - NotAccepted *[]string `json:"not_accepted,omitempty" bson:"not_accepted,omitempty"` + Message *Messages `json:"message,omitempty" bson:"message"` + NotAccepted *[]string `json:"not_accepted,omitempty" bson:"not_accepted"` } func (response ImportAccounts200JSONResponse) VisitImportAccountsResponse(w http.ResponseWriter) error { @@ -6019,7 +6022,7 @@ func (response Logout500JSONResponse) VisitLogoutResponse(w http.ResponseWriter) } type GetRefillsRequestObject struct { - Params GetRefillsParams `bson:"params,omitempty"` + Params GetRefillsParams `bson:"params"` } type GetRefillsResponseObject interface { @@ -6027,10 +6030,10 @@ type GetRefillsResponseObject interface { } type GetRefills200JSONResponse struct { - Limit *uint64 `json:"limit,omitempty" bson:"limit,omitempty"` - MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page,omitempty"` - Page *uint64 `json:"page,omitempty" bson:"page,omitempty"` - Refills *[]Refill `json:"refills,omitempty" bson:"refills,omitempty"` + Limit *uint64 `json:"limit,omitempty" bson:"limit"` + MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page"` + Page *uint64 `json:"page,omitempty" bson:"page"` + Refills *[]Refill `json:"refills,omitempty" bson:"refills"` } func (response GetRefills200JSONResponse) VisitGetRefillsResponse(w http.ResponseWriter) error { @@ -6068,7 +6071,7 @@ func (response GetRefills500JSONResponse) VisitGetRefillsResponse(w http.Respons } type GetTransactionsRequestObject struct { - Params GetTransactionsParams `bson:"params,omitempty"` + Params GetTransactionsParams `bson:"params"` } type GetTransactionsResponseObject interface { @@ -6076,10 +6079,10 @@ type GetTransactionsResponseObject interface { } type GetTransactions200JSONResponse struct { - Limit *uint64 `json:"limit,omitempty" bson:"limit,omitempty"` - MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page,omitempty"` - Page *uint64 `json:"page,omitempty" bson:"page,omitempty"` - Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions,omitempty"` + Limit *uint64 `json:"limit,omitempty" bson:"limit"` + MaxPage *uint64 `json:"max_page,omitempty" bson:"max_page"` + Page *uint64 `json:"page,omitempty" bson:"page"` + Transactions *[]Transaction `json:"transactions,omitempty" bson:"transactions"` } func (response GetTransactions200JSONResponse) VisitGetTransactionsResponse(w http.ResponseWriter) error { @@ -6335,8 +6338,8 @@ func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareF } type strictHandler struct { - ssi StrictServerInterface `bson:"ssi,omitempty"` - middlewares []StrictMiddlewareFunc `bson:"middlewares,omitempty"` + ssi StrictServerInterface `bson:"ssi"` + middlewares []StrictMiddlewareFunc `bson:"middlewares"` } // GetAccount operation middleware @@ -8130,9 +8133,9 @@ func (sh *strictHandler) GetTransactions(ctx echo.Context, params GetTransaction // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x963LbuJL/q7B4/qdm5l9ypEw8N39zHGfWdcaOR07O7NasSwWRkMQTiuAAUByvy1/2", + "H4sIAAAAAAAC/+x963LbuJL/q7B4/qdm5l9yJE8yN39zHGfWdcaOR07O7NasSwWRkMQTiuAAUByvy1/2", "efap9km2cCEJkCAJyroL+RKZxKXR6P6huwE0n/wAzVOUwIQS/+zJJ8EMzgH/eR4EaJFQ9jPFKIWYRpC/", - "GIMYJAFkP+FXME9j6J+9HgwGPX+C8BxQ/8yPEvrjqd/z6WMKxZ9wCrH/3PMDgMNRFLLK8iWhOEqm+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odgSQjy2ZE3Izo/O6ch1rMntOBDFdc6HAwwHGG1GAcUgISBgndh5IVqFelfko17M+SP77o+U", - "BcXKKVGkoNUzoWWJce7JUbkn6vz3n5S/lnNUlAZsvBVVUu2/ha1VMh1L10bhnJeD+TK2IlzbMUhUCo7O", - "jdH1rsmXOUy1dq6NgxMHJ+2mRTRPEaZanmTzt8OueMHCL5hgNPeAd3H3T28SxdW0HaK8ki+5/gMY80VM", - "oxRg2mdW9kkIKGiy93l3Vum0LezgtmE9r9RVmUNCpEPRJADXohgXrATREQgCmLI5U52K0mANrkPr4CVi", - "ThZx/OgJSVDTYDsgPcTv46NkEkcB3S/QymVSoFaMpmhhAKnfxPOab5rnb3Wkyh9bmxhCYWI0ncLQY3U3", - "LbEBShIYULjbCfp7Txy9UDJGAIc8hKFPKisoJtRmkx/EcdMG/67u7KtO+2ay899RgKnHP9Rl3H+oftUW", - "01FY/rRt3rN8U1lcy91eJqF9pzAJu3fpzjG0nWNwcb/9jvtloiBQ0XrngUEjK/cF6nDzLcIhxOQ7E17u", - "9PbD5kFzHV8AV1i8ng+BH/bWhwOz/QYzTSjun0VN1pSAmAWO/TN/Rml61u/HKADxDBF69vPg54HP9LN4", - "T1gBeDIG+BWFMQzQPAFJ8PgqgbQP0qj/5bWhAiv9CB9QPHk1wayYr9BWDaDGgIdNkbcgEH9D+FTDhEq+", - "Kt9BYAOtwoehgSL0oX9CgVhVL+31VcOqds3IBcX7FkMQe3OUwMfvymdPTC0VyUIYHHN19qKE23VkhtLK", - "/dwImlrhd/k8lHgExLCmAQEVJgrUXI0eSMIiRX3etyhi5ISIiCMsQ+JsFcn2wIoWsmDY8/3z/wUAAP//", - "TotqENc/AQA=", + "ZIM5l9EYTqjmdb/+vmeFJ+PF4yiO5tFytXORtQeZTUCeROwR97maghFNvapttDqubHJuRck1QS4DAhPc", + "opRGcxCPhCAsNYsvQew6spZhW4rRHIlulVH4rweDgfftyevB37/zLQeUNTSCSUg6iJpVlIAR3RAikCPv", + "a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UIQ+9E8oEKvqpb2+aljVrhm5oHjfYghib44S+Phd", + "+eyJqaUiWQiDY67OXpRwu47MUFq5nxtBUyv8Lp+HEo+AGNY0IKDCRIGaq9EDSVikqM/7FkWMnBARcYRl", + "SJytItkeWNFCFgx7vn/+vwAAAP//lK1mcKlAAQA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/bar.openapi.yml b/bar.openapi.yml index 293dd46..ea38dea 100644 --- a/bar.openapi.yml +++ b/bar.openapi.yml @@ -3898,6 +3898,10 @@ components: format: uint64 example: 32 buy_limit: + type: integer + format: int64 + example: 32 + optimal_amount: type: integer format: uint64 example: 32 @@ -3962,6 +3966,10 @@ components: type: integer format: uint64 example: 32 + optimal_amount: + type: integer + format: uint64 + example: 32 buy_limit: type: integer format: uint64 @@ -3978,7 +3986,7 @@ components: required: - prices - amount_left - - buy_limit + - optimal_amount - category_id - name - picture @@ -4007,6 +4015,10 @@ components: type: integer format: uint64 example: 32 + optimal_amount: + type: integer + format: uint64 + example: 32 buy_limit: type: integer format: uint64 @@ -4030,7 +4042,7 @@ components: - id - prices - amount_left - - buy_limit + - optimal_amount - category_id - name - picture_uri diff --git a/frontend/src/lib/api/api.ts b/frontend/src/lib/api/api.ts index c4f7c02..c72d0b4 100644 --- a/frontend/src/lib/api/api.ts +++ b/frontend/src/lib/api/api.ts @@ -52,13 +52,13 @@ export interface Account { * @type {string} * @memberof Account */ - 'google_id': string; + 'google_id'?: string; /** * * @type {string} * @memberof Account */ - 'google_picture': string; + 'google_picture'?: string; /** * * @type {string} @@ -888,7 +888,13 @@ export interface Item { * @type {number} * @memberof Item */ - 'buy_limit': number; + 'optimal_amount': number; + /** + * + * @type {number} + * @memberof Item + */ + 'buy_limit'?: number; /** * * @type {string} @@ -1112,7 +1118,13 @@ export interface NewItem { * @type {number} * @memberof NewItem */ - 'buy_limit': number; + 'optimal_amount': number; + /** + * + * @type {number} + * @memberof NewItem + */ + 'buy_limit'?: number; /** * Name of the current item * @type {string} @@ -1526,6 +1538,12 @@ export interface UpdateItem { * @memberof UpdateItem */ 'buy_limit'?: number; + /** + * + * @type {number} + * @memberof UpdateItem + */ + 'optimal_amount'?: number; /** * * @type {string} diff --git a/frontend/src/routes/admin/produits/+page.svelte b/frontend/src/routes/admin/produits/+page.svelte index f1e0e90..4aec59b 100644 --- a/frontend/src/routes/admin/produits/+page.svelte +++ b/frontend/src/routes/admin/produits/+page.svelte @@ -20,7 +20,8 @@ vip: 0 } as ItemPrices, amount_left: 0, - buy_limit: 0, + buy_limit: undefined, + optimal_amount: 0, state: 'buyable' }; let newItemPriceRole: AccountPriceRole = 'normal'; @@ -245,11 +246,47 @@ type="number" id="max" name="max" - placeholder="Max par commande" + placeholder="Pas de max par commande" class="py-3 px-4 block w-full border-gray-200 border-2 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" required aria-describedby="text-error" bind:value={newItem.buy_limit} + on:input={(e) => { + // @ts-ignore + if (e.target?.value === '') { + newItem.buy_limit = undefined; + return; + } + // @ts-ignore + let buy_limit = parseInt(e.target?.value); + newItem.buy_limit = buy_limit; + }} + /> + + + +
+ { + // @ts-ignore + if (e.target?.value === '') { + newItem.buy_limit = undefined; + return; + } + // @ts-ignore + let buy_limit = parseInt(e.target?.value); + newItem.buy_limit = buy_limit; + }} />
@@ -434,76 +471,71 @@ - - - - - - + @@ -516,7 +548,7 @@
{ // @ts-ignore @@ -555,7 +587,7 @@
+
-
- - Nom - -
+
+ + Nom + -
- - Image - -
+
+ + Image + -
- - Etat - -
+
+

+ Etat +

-
- - En stock - -
+
+ + En stock + -
- - Limite d'achat - -
+
+ + Limite d'achat + -
- -
+
+ + Montant optimal en stock + + +
-
+
-
+
{ // @ts-ignore @@ -588,16 +620,35 @@
{ // @ts-ignore let buy_limit = parseInt(e.target?.value); + // @ts-ignore + if (e.target?.value === '') { + editItem(item.id, { buy_limit: -1 }); + return; + } editItem(item.id, { buy_limit: buy_limit }); }} />
+
+ { + // @ts-ignore + let optimal_amount = parseInt(e.target?.value); + editItem(item.id, { optimal_amount: optimal_amount }); + }} + /> +
+
{