entity

package
v0.0.0-...-592584e Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID    int    `json:"id"`
	Cpf   int    `json:"cpf"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type ExternalPayment

type ExternalPayment struct {
	ID      *uuid.UUID       `json:"id"`
	OrderID int              `json:"-"`
	Type    enum.PaymentType `json:"type"`
	Amount  float32          `json:"amount"`
}

type Order

type Order struct {
	ID          int              `json:"id" gorm:"primaryKey;autoIncrement"`
	ClientId    *int             `json:"client_id"`
	StatusOrder enum.StatusOrder `json:"status_order"`
	Amount      float32          `json:"amount"`
	CreatedAt   time.Time        `json:"created_at,omitempty"`
}

func (*Order) SetAmount

func (o *Order) SetAmount(amount float32)

type Payment

type Payment struct {
	PaymentID    string             `json:"paymentId"`
	OrderID      string             `json:"orderId"`
	Type         enum.PaymentType   `json:"type"`
	CurrentState enum.PaymentStatus `json:"status"`
	Amount       float32            `json:"amount"`
	CreatedAt    *time.Time         `json:"created_at,omitempty"`
	UpdatedAt    *time.Time         `json:"updated_at,omitempty"`
	DeletedAt    *time.Time         `json:"deleted_at,omitempty"`
}

func (*Payment) GetJSONValue

func (p *Payment) GetJSONValue() (string, error)

type PaymentInterface

type PaymentInterface interface {
	GETJSONValue() string
}

Jump to

Keyboard shortcuts

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