invoice

package
v0.0.0-...-05e3429 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the invoice type in the database.
	Label = "invoice"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldOrderID holds the string denoting the order_id field in the database.
	FieldOrderID = "order_id"
	// FieldTotal holds the string denoting the total field in the database.
	FieldTotal = "total"
	// FieldNote holds the string denoting the note field in the database.
	FieldNote = "note"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldStatusCode holds the string denoting the status_code field in the database.
	FieldStatusCode = "status_code"
	// FieldPaymentMethod holds the string denoting the payment_method field in the database.
	FieldPaymentMethod = "payment_method"
	// EdgeOrder holds the string denoting the order edge name in mutations.
	EdgeOrder = "order"
	// EdgeInvoiceStatus holds the string denoting the invoice_status edge name in mutations.
	EdgeInvoiceStatus = "invoice_status"
	// Table holds the table name of the invoice in the database.
	Table = "invoices"
	// OrderTable is the table that holds the order relation/edge.
	OrderTable = "invoices"
	// OrderInverseTable is the table name for the Order entity.
	// It exists in this package in order to avoid circular dependency with the "order" package.
	OrderInverseTable = "orders"
	// OrderColumn is the table column denoting the order relation/edge.
	OrderColumn = "order_id"
	// InvoiceStatusTable is the table that holds the invoice_status relation/edge.
	InvoiceStatusTable = "invoices"
	// InvoiceStatusInverseTable is the table name for the InvoiceStatusCode entity.
	// It exists in this package in order to avoid circular dependency with the "invoicestatuscode" package.
	InvoiceStatusInverseTable = "invoice_status_codes"
	// InvoiceStatusColumn is the table column denoting the invoice_status relation/edge.
	InvoiceStatusColumn = "status_code"
)
View Source
const DefaultPaymentMethod = PaymentMethodCash

PaymentMethodCash is the default value of the PaymentMethod enum.

View Source
const DefaultType = TypeProForma

TypeProForma is the default value of the Type 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
	// DefaultStatusCode holds the default value on creation for the "status_code" field.
	DefaultStatusCode int
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for invoice fields.

Functions

func And

func And(predicates ...predicate.Invoice) predicate.Invoice

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Invoice

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Invoice

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Invoice

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Invoice

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Invoice

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Invoice

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Invoice

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

func CreatedAtNotIn

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

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

func HasInvoiceStatus

func HasInvoiceStatus() predicate.Invoice

HasInvoiceStatus applies the HasEdge predicate on the "invoice_status" edge.

func HasInvoiceStatusWith

func HasInvoiceStatusWith(preds ...predicate.InvoiceStatusCode) predicate.Invoice

HasInvoiceStatusWith applies the HasEdge predicate on the "invoice_status" edge with a given conditions (other predicates).

func HasOrder

func HasOrder() predicate.Invoice

HasOrder applies the HasEdge predicate on the "order" edge.

func HasOrderWith

func HasOrderWith(preds ...predicate.Order) predicate.Invoice

HasOrderWith applies the HasEdge predicate on the "order" edge with a given conditions (other predicates).

func ID

func ID(id uuid.UUID) predicate.Invoice

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Invoice

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Invoice

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Invoice

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Invoice

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Invoice

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Invoice

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Note

func Note(v string) predicate.Invoice

Note applies equality check predicate on the "note" field. It's identical to NoteEQ.

func NoteContains

func NoteContains(v string) predicate.Invoice

NoteContains applies the Contains predicate on the "note" field.

func NoteContainsFold

func NoteContainsFold(v string) predicate.Invoice

NoteContainsFold applies the ContainsFold predicate on the "note" field.

func NoteEQ

func NoteEQ(v string) predicate.Invoice

NoteEQ applies the EQ predicate on the "note" field.

func NoteEqualFold

func NoteEqualFold(v string) predicate.Invoice

NoteEqualFold applies the EqualFold predicate on the "note" field.

func NoteGT

func NoteGT(v string) predicate.Invoice

NoteGT applies the GT predicate on the "note" field.

func NoteGTE

func NoteGTE(v string) predicate.Invoice

NoteGTE applies the GTE predicate on the "note" field.

func NoteHasPrefix

func NoteHasPrefix(v string) predicate.Invoice

NoteHasPrefix applies the HasPrefix predicate on the "note" field.

func NoteHasSuffix

func NoteHasSuffix(v string) predicate.Invoice

NoteHasSuffix applies the HasSuffix predicate on the "note" field.

func NoteIn

func NoteIn(vs ...string) predicate.Invoice

NoteIn applies the In predicate on the "note" field.

func NoteIsNil

func NoteIsNil() predicate.Invoice

NoteIsNil applies the IsNil predicate on the "note" field.

func NoteLT

func NoteLT(v string) predicate.Invoice

NoteLT applies the LT predicate on the "note" field.

func NoteLTE

func NoteLTE(v string) predicate.Invoice

NoteLTE applies the LTE predicate on the "note" field.

func NoteNEQ

func NoteNEQ(v string) predicate.Invoice

NoteNEQ applies the NEQ predicate on the "note" field.

func NoteNotIn

func NoteNotIn(vs ...string) predicate.Invoice

NoteNotIn applies the NotIn predicate on the "note" field.

func NoteNotNil

func NoteNotNil() predicate.Invoice

NoteNotNil applies the NotNil predicate on the "note" field.

func Or

func Or(predicates ...predicate.Invoice) predicate.Invoice

Or groups predicates with the OR operator between them.

func OrderID

func OrderID(v uuid.UUID) predicate.Invoice

OrderID applies equality check predicate on the "order_id" field. It's identical to OrderIDEQ.

func OrderIDEQ

func OrderIDEQ(v uuid.UUID) predicate.Invoice

OrderIDEQ applies the EQ predicate on the "order_id" field.

func OrderIDIn

func OrderIDIn(vs ...uuid.UUID) predicate.Invoice

OrderIDIn applies the In predicate on the "order_id" field.

func OrderIDNEQ

func OrderIDNEQ(v uuid.UUID) predicate.Invoice

OrderIDNEQ applies the NEQ predicate on the "order_id" field.

func OrderIDNotIn

func OrderIDNotIn(vs ...uuid.UUID) predicate.Invoice

OrderIDNotIn applies the NotIn predicate on the "order_id" field.

func PaymentMethodEQ

func PaymentMethodEQ(v PaymentMethod) predicate.Invoice

PaymentMethodEQ applies the EQ predicate on the "payment_method" field.

func PaymentMethodIn

func PaymentMethodIn(vs ...PaymentMethod) predicate.Invoice

PaymentMethodIn applies the In predicate on the "payment_method" field.

func PaymentMethodNEQ

func PaymentMethodNEQ(v PaymentMethod) predicate.Invoice

PaymentMethodNEQ applies the NEQ predicate on the "payment_method" field.

func PaymentMethodNotIn

func PaymentMethodNotIn(vs ...PaymentMethod) predicate.Invoice

PaymentMethodNotIn applies the NotIn predicate on the "payment_method" field.

func PaymentMethodValidator

func PaymentMethodValidator(pm PaymentMethod) error

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

func StatusCode

func StatusCode(v int) predicate.Invoice

StatusCode applies equality check predicate on the "status_code" field. It's identical to StatusCodeEQ.

func StatusCodeEQ

func StatusCodeEQ(v int) predicate.Invoice

StatusCodeEQ applies the EQ predicate on the "status_code" field.

func StatusCodeIn

func StatusCodeIn(vs ...int) predicate.Invoice

StatusCodeIn applies the In predicate on the "status_code" field.

func StatusCodeNEQ

func StatusCodeNEQ(v int) predicate.Invoice

StatusCodeNEQ applies the NEQ predicate on the "status_code" field.

func StatusCodeNotIn

func StatusCodeNotIn(vs ...int) predicate.Invoice

StatusCodeNotIn applies the NotIn predicate on the "status_code" field.

func Total

Total applies equality check predicate on the "total" field. It's identical to TotalEQ.

func TotalEQ

func TotalEQ(v decimal.Decimal) predicate.Invoice

TotalEQ applies the EQ predicate on the "total" field.

func TotalGT

func TotalGT(v decimal.Decimal) predicate.Invoice

TotalGT applies the GT predicate on the "total" field.

func TotalGTE

func TotalGTE(v decimal.Decimal) predicate.Invoice

TotalGTE applies the GTE predicate on the "total" field.

func TotalIn

func TotalIn(vs ...decimal.Decimal) predicate.Invoice

TotalIn applies the In predicate on the "total" field.

func TotalLT

func TotalLT(v decimal.Decimal) predicate.Invoice

TotalLT applies the LT predicate on the "total" field.

func TotalLTE

func TotalLTE(v decimal.Decimal) predicate.Invoice

TotalLTE applies the LTE predicate on the "total" field.

func TotalNEQ

func TotalNEQ(v decimal.Decimal) predicate.Invoice

TotalNEQ applies the NEQ predicate on the "total" field.

func TotalNotIn

func TotalNotIn(vs ...decimal.Decimal) predicate.Invoice

TotalNotIn applies the NotIn predicate on the "total" field.

func TypeEQ

func TypeEQ(v Type) predicate.Invoice

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Invoice

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Invoice

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Invoice

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Invoice

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Invoice

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Invoice

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Invoice

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Invoice

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Invoice

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Invoice

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

func UpdatedAtNotIn

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

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 OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Invoice queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByInvoiceStatusField

func ByInvoiceStatusField(field string, opts ...sql.OrderTermOption) OrderOption

ByInvoiceStatusField orders the results by invoice_status field.

func ByNote

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

ByNote orders the results by the note field.

func ByOrderField

func ByOrderField(field string, opts ...sql.OrderTermOption) OrderOption

ByOrderField orders the results by order field.

func ByOrderID

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

ByOrderID orders the results by the order_id field.

func ByPaymentMethod

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

ByPaymentMethod orders the results by the payment_method field.

func ByStatusCode

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

ByStatusCode orders the results by the status_code field.

func ByTotal

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

ByTotal orders the results by the total field.

func ByType

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

ByType orders the results by the type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type PaymentMethod

type PaymentMethod string

PaymentMethod defines the type for the "payment_method" enum field.

const (
	PaymentMethodCash        PaymentMethod = "CASH"
	PaymentMethodEFT         PaymentMethod = "ELECTRONIC_FUNDS_TRANSFER"
	PaymentMethodGiftCard    PaymentMethod = "GIFT_CARD"
	PaymentMethodCreditCard  PaymentMethod = "CREDIT_CARD"
	PaymentMethodDebitCard   PaymentMethod = "DEBIT_CARD"
	PaymentMethodPrepaidCard PaymentMethod = "PREPAID_CARD"
	PaymentMethodCheck       PaymentMethod = "CHECK"
	PaymentMethodOther       PaymentMethod = "OTHER"
)

PaymentMethod values.

func (PaymentMethod) String

func (pm PaymentMethod) String() string

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeProForma   Type = "PRO_FORMA"
	TypeRegular    Type = "REGULAR"
	TypePastDue    Type = "PAST_DUE"
	TypeInterim    Type = "INTERIM"
	TypeTimesheet  Type = "TIMESHEET"
	TypeFinal      Type = "FINAL"
	TypeCredit     Type = "CREDIT"
	TypeDebit      Type = "DEBIT"
	TypeMixed      Type = "MIXED"
	TypeCommercial Type = "COMMERCIAL"
	TypeRecurring  Type = "RECURRING"
	TypeOther      Type = "OTHER"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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