customer/internal/swagger/models.gen.go
2023-05-22 15:43:15 +03:00

140 lines
4.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package swagger provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
package swagger
import (
"time"
)
const (
BearerScopes = "Bearer.Scopes"
)
// Defines values for HistoryType.
const (
BuyCart HistoryType = "buyCart"
DeclinedPayment HistoryType = "declinedPayment"
SubsriptionEnd HistoryType = "subsriptionEnd"
SuccessfulPayment HistoryType = "successfulPayment"
TimeoutPayment HistoryType = "timeoutPayment"
)
// Account defines model for Account.
type Account struct {
Id string `json:"_id"`
Cart []string `json:"cart"`
CreatedAt time.Time `json:"createdAt"`
Deleted bool `json:"deleted"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
UserId string `json:"userId"`
Wallet Wallet `json:"wallet"`
}
// Error defines model for Error.
type Error struct {
Message string `json:"message"`
StatusCode *int64 `json:"statusCode,omitempty"`
}
// History defines model for History.
type History struct {
Comment string `json:"comment"`
CreatedAt time.Time `json:"createdAt"`
Deleted bool `json:"deleted"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
Id string `json:"id"`
// Subject Я пока не могу предположить, какие будут фильтры по истории, поэтому предлагаю в это поле просто класть строку с json. Ибо для каждого типа записи она своя.
Subject string `json:"subject"`
Type HistoryType `json:"type"`
UpdatedAt time.Time `json:"updatedAt"`
UserId string `json:"userId"`
}
// HistoryType defines model for History.Type.
type HistoryType string
// Wallet defines model for Wallet.
type Wallet struct {
// Cash Сумма money переведённая на текущий курс
Cash float64 `json:"cash"`
// Currency Текущий курс валюты
Currency string `json:"currency"`
// Money Деньги на счету в копейках. Чтобы при перессчётах не возникало денег изниоткуда. фиксируемся к одной валюте, она будет внутренней, никому её не покажем
Money float64 `json:"money"`
}
// PaginationAccountsParams defines parameters for PaginationAccounts.
type PaginationAccountsParams struct {
// Page Номер страницы, начиная с 1
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit размер страницы
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
// RemoveFromCartParams defines parameters for RemoveFromCart.
type RemoveFromCartParams struct {
Id string `form:"id" json:"id"`
}
// Add2cartParams defines parameters for Add2cart.
type Add2cartParams struct {
Id string `form:"id" json:"id"`
}
// PayCartJSONBody defines parameters for PayCart.
type PayCartJSONBody struct {
// UserId ID для того, чтобы указать сервису оплаты, какой юзер оплатил
UserId string `json:"userId"`
}
// UpdateCurrenciesJSONBody defines parameters for UpdateCurrencies.
type UpdateCurrenciesJSONBody = []string
// GetHistoryParams defines parameters for GetHistory.
type GetHistoryParams struct {
// Page Номер страницы, начиная с 1
Page *int `form:"page,omitempty" json:"page,omitempty"`
// Limit Размер страницы
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
// RequestMoneyParams defines parameters for RequestMoney.
type RequestMoneyParams struct {
// Cash Количество денег
Cash int `form:"cash" json:"cash"`
}
// ChangeCurrencyJSONBody defines parameters for ChangeCurrency.
type ChangeCurrencyJSONBody struct {
Currency string `json:"currency"`
}
// PutMoneyJSONBody defines parameters for PutMoney.
type PutMoneyJSONBody struct {
Cash float64 `json:"cash"`
Currency string `json:"currency"`
UserId string `json:"userId"`
}
// PayCartJSONRequestBody defines body for PayCart for application/json ContentType.
type PayCartJSONRequestBody PayCartJSONBody
// UpdateCurrenciesJSONRequestBody defines body for UpdateCurrencies for application/json ContentType.
type UpdateCurrenciesJSONRequestBody = UpdateCurrenciesJSONBody
// Add2historyJSONRequestBody defines body for Add2history for application/json ContentType.
type Add2historyJSONRequestBody = History
// ChangeCurrencyJSONRequestBody defines body for ChangeCurrency for application/json ContentType.
type ChangeCurrencyJSONRequestBody ChangeCurrencyJSONBody
// PutMoneyJSONRequestBody defines body for PutMoney for application/json ContentType.
type PutMoneyJSONRequestBody PutMoneyJSONBody