ledger

package
v0.0.0-...-fa32389 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the ledger type in the database.
	Label = "ledger"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldInvoiceID holds the string denoting the invoice_id field in the database.
	FieldInvoiceID = "invoice_id"
	// FieldEntity holds the string denoting the entity field in the database.
	FieldEntity = "entity"
	// FieldEntityID holds the string denoting the entity_id field in the database.
	FieldEntityID = "entity_id"
	// FieldAmount holds the string denoting the amount field in the database.
	FieldAmount = "amount"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// Table holds the table name of the ledger in the database.
	Table = "ledgers"
)
View Source
const DefaultStatus = StatusPending

StatusPending is the default value of the Status enum.

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for ledger fields.

Functions

func Amount

func Amount(v float64) predicate.Ledger

Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.

func AmountEQ

func AmountEQ(v float64) predicate.Ledger

AmountEQ applies the EQ predicate on the "amount" field.

func AmountGT

func AmountGT(v float64) predicate.Ledger

AmountGT applies the GT predicate on the "amount" field.

func AmountGTE

func AmountGTE(v float64) predicate.Ledger

AmountGTE applies the GTE predicate on the "amount" field.

func AmountIn

func AmountIn(vs ...float64) predicate.Ledger

AmountIn applies the In predicate on the "amount" field.

func AmountLT

func AmountLT(v float64) predicate.Ledger

AmountLT applies the LT predicate on the "amount" field.

func AmountLTE

func AmountLTE(v float64) predicate.Ledger

AmountLTE applies the LTE predicate on the "amount" field.

func AmountNEQ

func AmountNEQ(v float64) predicate.Ledger

AmountNEQ applies the NEQ predicate on the "amount" field.

func AmountNotIn

func AmountNotIn(vs ...float64) predicate.Ledger

AmountNotIn applies the NotIn predicate on the "amount" field.

func And

func And(predicates ...predicate.Ledger) predicate.Ledger

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Ledger

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Ledger

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Ledger

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Ledger

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Ledger

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Ledger

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Ledger

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Ledger

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Ledger

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func EntityEQ

func EntityEQ(v Entity) predicate.Ledger

EntityEQ applies the EQ predicate on the "entity" field.

func EntityID

func EntityID(v uuid.UUID) predicate.Ledger

EntityID applies equality check predicate on the "entity_id" field. It's identical to EntityIDEQ.

func EntityIDEQ

func EntityIDEQ(v uuid.UUID) predicate.Ledger

EntityIDEQ applies the EQ predicate on the "entity_id" field.

func EntityIDGT

func EntityIDGT(v uuid.UUID) predicate.Ledger

EntityIDGT applies the GT predicate on the "entity_id" field.

func EntityIDGTE

func EntityIDGTE(v uuid.UUID) predicate.Ledger

EntityIDGTE applies the GTE predicate on the "entity_id" field.

func EntityIDIn

func EntityIDIn(vs ...uuid.UUID) predicate.Ledger

EntityIDIn applies the In predicate on the "entity_id" field.

func EntityIDLT

func EntityIDLT(v uuid.UUID) predicate.Ledger

EntityIDLT applies the LT predicate on the "entity_id" field.

func EntityIDLTE

func EntityIDLTE(v uuid.UUID) predicate.Ledger

EntityIDLTE applies the LTE predicate on the "entity_id" field.

func EntityIDNEQ

func EntityIDNEQ(v uuid.UUID) predicate.Ledger

EntityIDNEQ applies the NEQ predicate on the "entity_id" field.

func EntityIDNotIn

func EntityIDNotIn(vs ...uuid.UUID) predicate.Ledger

EntityIDNotIn applies the NotIn predicate on the "entity_id" field.

func EntityIn

func EntityIn(vs ...Entity) predicate.Ledger

EntityIn applies the In predicate on the "entity" field.

func EntityNEQ

func EntityNEQ(v Entity) predicate.Ledger

EntityNEQ applies the NEQ predicate on the "entity" field.

func EntityNotIn

func EntityNotIn(vs ...Entity) predicate.Ledger

EntityNotIn applies the NotIn predicate on the "entity" field.

func EntityValidator

func EntityValidator(e Entity) error

EntityValidator is a validator for the "entity" field enum values. It is called by the builders before save.

func ID

func ID(id uuid.UUID) predicate.Ledger

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Ledger

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Ledger

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Ledger

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Ledger

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Ledger

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Ledger

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Ledger

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Ledger

IDNotIn applies the NotIn predicate on the ID field.

func InvoiceID

func InvoiceID(v uuid.UUID) predicate.Ledger

InvoiceID applies equality check predicate on the "invoice_id" field. It's identical to InvoiceIDEQ.

func InvoiceIDEQ

func InvoiceIDEQ(v uuid.UUID) predicate.Ledger

InvoiceIDEQ applies the EQ predicate on the "invoice_id" field.

func InvoiceIDGT

func InvoiceIDGT(v uuid.UUID) predicate.Ledger

InvoiceIDGT applies the GT predicate on the "invoice_id" field.

func InvoiceIDGTE

func InvoiceIDGTE(v uuid.UUID) predicate.Ledger

InvoiceIDGTE applies the GTE predicate on the "invoice_id" field.

func InvoiceIDIn

func InvoiceIDIn(vs ...uuid.UUID) predicate.Ledger

InvoiceIDIn applies the In predicate on the "invoice_id" field.

func InvoiceIDLT

func InvoiceIDLT(v uuid.UUID) predicate.Ledger

InvoiceIDLT applies the LT predicate on the "invoice_id" field.

func InvoiceIDLTE

func InvoiceIDLTE(v uuid.UUID) predicate.Ledger

InvoiceIDLTE applies the LTE predicate on the "invoice_id" field.

func InvoiceIDNEQ

func InvoiceIDNEQ(v uuid.UUID) predicate.Ledger

InvoiceIDNEQ applies the NEQ predicate on the "invoice_id" field.

func InvoiceIDNotIn

func InvoiceIDNotIn(vs ...uuid.UUID) predicate.Ledger

InvoiceIDNotIn applies the NotIn predicate on the "invoice_id" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Ledger) predicate.Ledger

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Ledger

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Ledger

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Ledger

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Ledger

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Ledger

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Ledger

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Ledger

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Ledger

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Ledger

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Ledger

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Ledger

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Ledger

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Ledger

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Entity

type Entity string

Entity defines the type for the "entity" enum field.

const (
	EntityIssuer   Entity = "issuer"
	EntityInvestor Entity = "investor"
)

Entity values.

func (Entity) String

func (e Entity) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Ledger queries.

func ByAmount

func ByAmount(opts ...sql.OrderTermOption) OrderOption

ByAmount orders the results by the amount field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByEntity

func ByEntity(opts ...sql.OrderTermOption) OrderOption

ByEntity orders the results by the entity field.

func ByEntityID

func ByEntityID(opts ...sql.OrderTermOption) OrderOption

ByEntityID orders the results by the entity_id field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByInvoiceID

func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption

ByInvoiceID orders the results by the invoice_id field.

func ByStatus

func ByStatus(opts ...sql.OrderTermOption) OrderOption

ByStatus orders the results by the status field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending  Status = "pending"
	StatusResolved Status = "resolved"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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