model

package
v0.0.0-...-3143a31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderStatusNew        = "NEW"
	OrderStatusRegistered = "REGISTERED"
	OrderStatusProcessing = "PROCESSING"
	OrderStatusInvalid    = "INVALID"
	OrderStatusProcessed  = "PROCESSED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceWithdrawn

type BalanceWithdrawn struct {
	Balance   decimal.Decimal `json:"current"`
	Withdrawn decimal.Decimal `json:"withdrawn"`
}

type LoginInput

type LoginInput struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

type Order

type Order struct {
	ID         int             `json:"ID"`
	Number     string          `json:"number"`
	UserID     int             `json:"userID"`
	Accrual    decimal.Decimal `json:"accrual"`
	Status     string          `json:"status"`
	UploadedAt time.Time       `json:"uploadedAt"`
}

type OrderOutput

type OrderOutput struct {
	Number     string          `json:"number"`
	Status     string          `json:"status"`
	Accrual    decimal.Decimal `json:"accrual"`
	UploadedAt time.Time       `json:"uploadedAt"`
}

type User

type User struct {
	ID       int
	Login    string
	Password string
	Balance  decimal.Decimal
}

type Withdraw

type Withdraw struct {
	ID          int             `json:"ID"`
	OrderNumber string          `json:"orderNumber"`
	UserID      int             `json:"userID"`
	Amount      decimal.Decimal `json:"amount"`
	ProcessedAt time.Time       `json:"processedAt"`
}

type WithdrawInput

type WithdrawInput struct {
	OrderNumber string          `json:"order"`
	Sum         decimal.Decimal `json:"sum"`
}

type WithdrawOutput

type WithdrawOutput struct {
	OrderNumber string          `json:"order"`
	Sum         decimal.Decimal `json:"sum"`
	ProcessedAt time.Time       `json:"processedAt"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL