entities

package
v0.0.0-...-bf77178 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank struct {
	ID    string `json:"id" gorm:"primaryKey"`
	Name  string `json:"name"`
	Code  string `json:"code"`
	Cards []Card `json:"cards" gorm:"foreignKey:BankID"`
}

func (Bank) Validate

func (bank Bank) Validate() error

type Card

type Card struct {
	ID       string `json:"id" gorm:"primaryKey"`
	BankID   string `json:"bank_id"`
	Number   string `json:"number"`
	ExpireAt string `json:"expire_at"`
	Debts    []Debt `json:"debts"  gorm:"foreignKey:CardID"`
}

func (Card) Validate

func (card Card) Validate() error

type Debt

type Debt struct {
	ID           string        `json:"id" gorm:"primaryKey"`
	CardID       string        `json:"card_id"`
	TicketID     string        `json:"ticket_id"`
	Name         string        `json:"name"`
	Description  string        `json:"description"`
	Ticket       Ticket        `json:"ticket" gorm:"foreignKey:DebtID"`
	Installments []Installment `json:"installments" gorm:"foreignKey:DebtID"`
}

func (Debt) Validate

func (debt Debt) Validate() error

type Installment

type Installment struct {
	ID      string `json:"id" gorm:"primaryKey"`
	DebtID  string `json:"debt_id"`
	DueDate string `json:"due_date" gorm:"dueDate"`
	Paid    bool   `json:"paid" gorm:"paid"`
	Number  int    `json:"number" gorm:"number"`
}

type Ticket

type Ticket struct {
	ID       string `json:"id" gorm:"primaryKey"`
	DebtID   string `json:"debt_id"`
	CodeBars string `json:"code_bars"`
}

Jump to

Keyboard shortcuts

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