models

package
v0.0.0-...-74dec24 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	DocumentNumber       uint          `json:"documentNumber" binding:"required" gorm:"unique;not null"`
	AvailableCreditLimit float64       `json:"availableCreditLimit" binding:"required"`
	Transactions         []Transaction `json:"transactions" binding:"required"`
	core.Model
}

type OperationsType

type OperationsType struct {
	Description  string        `json:"description" binding:"required" gorm:"index;unique;not null"`
	Transactions []Transaction `json:"transactions" binding:"required" gorm:"index"`
	core.Model
}

type Transaction

type Transaction struct {
	AccountID        int            `json:"accountId" binding:"required" gorm:"index;not null"`
	OperationsTypeID int            `json:"operationsTypeId" binding:"required" gorm:"not null"`
	Amount           float64        `json:"amount" binding:"required" gorm:"not null"`
	EventDate        *time.Time     `json:"eventDate" binding:"required"`
	Account          Account        `json:"account" binding:"required"`
	OperationsType   OperationsType `json:"operationsType" binding:"required"`
	core.Model
}

Jump to

Keyboard shortcuts

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