customer/internal/swagger/models.gen.go

192 lines
6.6 KiB
Go
Raw Normal View History

2023-05-17 03:39:29 +00:00
// 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"
)
2023-05-30 13:38:56 +00:00
// Defines values for AccountStatus.
const (
AccountStatusNko AccountStatus = "nko"
AccountStatusNo AccountStatus = "no"
AccountStatusOrg AccountStatus = "org"
)
2023-05-17 03:39:29 +00:00
// Defines values for HistoryType.
const (
BuyCart HistoryType = "buyCart"
DeclinedPayment HistoryType = "declinedPayment"
SubsriptionEnd HistoryType = "subsriptionEnd"
SuccessfulPayment HistoryType = "successfulPayment"
TimeoutPayment HistoryType = "timeoutPayment"
)
2023-05-30 13:38:56 +00:00
// Defines values for SetStatusJSONBodyStatus.
const (
SetStatusJSONBodyStatusNko SetStatusJSONBodyStatus = "nko"
SetStatusJSONBodyStatusNo SetStatusJSONBodyStatus = "no"
SetStatusJSONBodyStatusOrg SetStatusJSONBodyStatus = "org"
)
2023-05-17 03:39:29 +00:00
// Account defines model for Account.
type Account struct {
2023-05-30 13:38:56 +00:00
Id string `json:"_id"`
Cart []string `json:"cart"`
CreatedAt time.Time `json:"createdAt"`
Deleted bool `json:"deleted"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
Name *Name `json:"name,omitempty"`
Status *AccountStatus `json:"status,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
UserId string `json:"userId"`
Wallet Wallet `json:"wallet"`
2023-05-17 03:39:29 +00:00
}
2023-05-30 13:38:56 +00:00
// AccountStatus defines model for Account.Status.
type AccountStatus string
2023-05-17 03:39:29 +00:00
// 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 {
2023-05-17 20:27:09 +00:00
Comment string `json:"comment"`
CreatedAt time.Time `json:"createdAt"`
Deleted bool `json:"deleted"`
2023-05-17 03:39:29 +00:00
DeletedAt *time.Time `json:"deletedAt,omitempty"`
2023-05-17 20:27:09 +00:00
Id string `json:"id"`
2023-05-17 03:39:29 +00:00
2023-05-23 15:24:52 +00:00
// RawDetails Я пока не могу предположить, какие будут фильтры по истории, поэтому предлагаю в это поле просто класть строку с json. Ибо для каждого типа записи она своя.
RawDetails *string `json:"rawDetails,omitempty"`
Type HistoryType `json:"type"`
UpdatedAt time.Time `json:"updatedAt"`
UserId string `json:"userId"`
2023-05-17 03:39:29 +00:00
}
2023-05-23 15:24:52 +00:00
// HistoryType defines model for HistoryType.
2023-05-17 03:39:29 +00:00
type HistoryType string
2023-05-30 13:20:52 +00:00
// Name defines model for Name.
type Name struct {
Lastname *string `json:"lastname,omitempty"`
Name *string `json:"name,omitempty"`
Orgname *string `json:"orgname,omitempty"`
Secondname *string `json:"secondname,omitempty"`
}
2023-05-17 03:39:29 +00:00
// Wallet defines model for Wallet.
type Wallet struct {
2023-05-17 20:27:09 +00:00
// Cash Сумма money переведённая на текущий курс
2023-05-22 16:42:15 +00:00
Cash int64 `json:"cash"`
2023-05-17 20:27:09 +00:00
// Currency Текущий курс валюты
Currency string `json:"currency"`
2023-05-17 03:39:29 +00:00
2023-05-17 20:27:09 +00:00
// Money Деньги на счету в копейках. Чтобы при перессчётах не возникало денег изниоткуда. фиксируемся к одной валюте, она будет внутренней, никому её не покажем
2023-05-22 16:42:15 +00:00
Money int64 `json:"money"`
2023-05-30 13:38:56 +00:00
// Spent общая сумма потраченных денег за всё время существования аккаунта
Spent *int64 `json:"spent,omitempty"`
2023-05-17 03:39:29 +00:00
}
2023-05-30 13:38:56 +00:00
// SetStatusJSONBody defines parameters for SetStatus.
type SetStatusJSONBody struct {
Status *SetStatusJSONBodyStatus `json:"status,omitempty"`
}
// SetStatusJSONBodyStatus defines parameters for SetStatus.
type SetStatusJSONBodyStatus string
2023-05-17 03:39:29 +00:00
// 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"`
}
2023-05-19 09:08:15 +00:00
// Add2cartParams defines parameters for Add2cart.
type Add2cartParams struct {
Id string `form:"id" json:"id"`
2023-05-17 03:39:29 +00:00
}
// PayCartJSONBody defines parameters for PayCart.
type PayCartJSONBody struct {
// UserId ID для того, чтобы указать сервису оплаты, какой юзер оплатил
2023-05-17 20:27:09 +00:00
UserId string `json:"userId"`
2023-05-17 03:39:29 +00:00
}
// UpdateCurrenciesJSONBody defines parameters for UpdateCurrencies.
type UpdateCurrenciesJSONBody = []string
// GetHistoryParams defines parameters for GetHistory.
type GetHistoryParams struct {
2023-05-17 20:27:09 +00:00
// Page Номер страницы, начиная с 1
Page *int `form:"page,omitempty" json:"page,omitempty"`
2023-05-17 03:39:29 +00:00
2023-05-17 20:27:09 +00:00
// Limit Размер страницы
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
2023-05-17 03:39:29 +00:00
}
2023-05-23 15:24:52 +00:00
// Add2historyJSONBody defines parameters for Add2history.
type Add2historyJSONBody struct {
2023-05-24 11:20:35 +00:00
Comment string `json:"comment"`
RawDetails string `json:"rawDetails"`
Type HistoryType `json:"type"`
UserId string `json:"userId"`
2023-05-23 15:24:52 +00:00
}
2023-05-17 03:39:29 +00:00
// RequestMoneyParams defines parameters for RequestMoney.
type RequestMoneyParams struct {
2023-05-17 20:27:09 +00:00
// Cash Количество денег
2023-05-17 03:39:29 +00:00
Cash int `form:"cash" json:"cash"`
}
// ChangeCurrencyJSONBody defines parameters for ChangeCurrency.
type ChangeCurrencyJSONBody struct {
2023-05-17 20:27:09 +00:00
Currency string `json:"currency"`
2023-05-17 03:39:29 +00:00
}
// PutMoneyJSONBody defines parameters for PutMoney.
type PutMoneyJSONBody struct {
2023-05-22 16:42:15 +00:00
Cash int64 `json:"cash"`
Currency string `json:"currency"`
UserId string `json:"userId"`
2023-05-17 03:39:29 +00:00
}
2023-05-30 13:20:52 +00:00
// ChangeAccountJSONRequestBody defines body for ChangeAccount for application/json ContentType.
type ChangeAccountJSONRequestBody = Name
2023-05-30 13:38:56 +00:00
// SetStatusJSONRequestBody defines body for SetStatus for application/json ContentType.
type SetStatusJSONRequestBody SetStatusJSONBody
2023-05-17 03:39:29 +00:00
// 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.
2023-05-23 15:24:52 +00:00
type Add2historyJSONRequestBody Add2historyJSONBody
2023-05-17 03:39:29 +00:00
// ChangeCurrencyJSONRequestBody defines body for ChangeCurrency for application/json ContentType.
type ChangeCurrencyJSONRequestBody ChangeCurrencyJSONBody
// PutMoneyJSONRequestBody defines body for PutMoney for application/json ContentType.
type PutMoneyJSONRequestBody PutMoneyJSONBody