bid

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the bid type in the database.
	Label = "bid"
	// 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"
	// FieldAmount holds the string denoting the amount field in the database.
	FieldAmount = "amount"
	// FieldAcceptedAmount holds the string denoting the accepted_amount field in the database.
	FieldAcceptedAmount = "accepted_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"
	// EdgeInvoice holds the string denoting the invoice edge name in mutations.
	EdgeInvoice = "invoice"
	// EdgeInvestor holds the string denoting the investor edge name in mutations.
	EdgeInvestor = "investor"
	// Table holds the table name of the bid in the database.
	Table = "bids"
	// InvoiceTable is the table that holds the invoice relation/edge.
	InvoiceTable = "bids"
	// InvoiceInverseTable is the table name for the Invoice entity.
	// It exists in this package in order to avoid circular dependency with the "invoice" package.
	InvoiceInverseTable = "invoices"
	// InvoiceColumn is the table column denoting the invoice relation/edge.
	InvoiceColumn = "invoice_bids"
	// InvestorTable is the table that holds the investor relation/edge.
	InvestorTable = "bids"
	// InvestorInverseTable is the table name for the Investor entity.
	// It exists in this package in order to avoid circular dependency with the "investor" package.
	InvestorInverseTable = "investors"
	// InvestorColumn is the table column denoting the investor relation/edge.
	InvestorColumn = "investor_bids"
)
View Source
const DefaultStatus = StatusPENDING

StatusPENDING is the default value of the Status enum.

Variables

View Source
var (
	// DefaultAcceptedAmount holds the default value on creation for the "accepted_amount" field.
	DefaultAcceptedAmount float64
	// 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 bid fields.

View Source
var ForeignKeys = []string{
	"investor_bids",
	"invoice_bids",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "bids" table and are not defined as standalone fields in the schema.

Functions

func AcceptedAmount

func AcceptedAmount(v float64) predicate.Bid

AcceptedAmount applies equality check predicate on the "accepted_amount" field. It's identical to AcceptedAmountEQ.

func AcceptedAmountEQ

func AcceptedAmountEQ(v float64) predicate.Bid

AcceptedAmountEQ applies the EQ predicate on the "accepted_amount" field.

func AcceptedAmountGT

func AcceptedAmountGT(v float64) predicate.Bid

AcceptedAmountGT applies the GT predicate on the "accepted_amount" field.

func AcceptedAmountGTE

func AcceptedAmountGTE(v float64) predicate.Bid

AcceptedAmountGTE applies the GTE predicate on the "accepted_amount" field.

func AcceptedAmountIn

func AcceptedAmountIn(vs ...float64) predicate.Bid

AcceptedAmountIn applies the In predicate on the "accepted_amount" field.

func AcceptedAmountLT

func AcceptedAmountLT(v float64) predicate.Bid

AcceptedAmountLT applies the LT predicate on the "accepted_amount" field.

func AcceptedAmountLTE

func AcceptedAmountLTE(v float64) predicate.Bid

AcceptedAmountLTE applies the LTE predicate on the "accepted_amount" field.

func AcceptedAmountNEQ

func AcceptedAmountNEQ(v float64) predicate.Bid

AcceptedAmountNEQ applies the NEQ predicate on the "accepted_amount" field.

func AcceptedAmountNotIn

func AcceptedAmountNotIn(vs ...float64) predicate.Bid

AcceptedAmountNotIn applies the NotIn predicate on the "accepted_amount" field.

func Amount

func Amount(v float64) predicate.Bid

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

func AmountEQ

func AmountEQ(v float64) predicate.Bid

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

func AmountGT

func AmountGT(v float64) predicate.Bid

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

func AmountGTE

func AmountGTE(v float64) predicate.Bid

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

func AmountIn

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

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

func AmountLT

func AmountLT(v float64) predicate.Bid

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

func AmountLTE

func AmountLTE(v float64) predicate.Bid

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

func AmountNEQ

func AmountNEQ(v float64) predicate.Bid

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

func AmountNotIn

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

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

func And

func And(predicates ...predicate.Bid) predicate.Bid

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Bid

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Bid

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Bid

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Bid

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Bid

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Bid

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Bid

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

func CreatedAtNotIn

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

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

func HasInvestor

func HasInvestor() predicate.Bid

HasInvestor applies the HasEdge predicate on the "investor" edge.

func HasInvestorWith

func HasInvestorWith(preds ...predicate.Investor) predicate.Bid

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

func HasInvoice

func HasInvoice() predicate.Bid

HasInvoice applies the HasEdge predicate on the "invoice" edge.

func HasInvoiceWith

func HasInvoiceWith(preds ...predicate.Invoice) predicate.Bid

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

func ID

func ID(id uuid.UUID) predicate.Bid

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Bid

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Bid

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Bid

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Bid

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Bid

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Bid

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

func Not(p predicate.Bid) predicate.Bid

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Bid) predicate.Bid

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Bid

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Bid

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

func StatusNotIn

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

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.Bid

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Bid

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Bid

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Bid

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Bid

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Bid

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Bid

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

func UpdatedAtNotIn

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

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 Bid queries.

func ByAcceptedAmount

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

ByAcceptedAmount orders the results by the accepted_amount field.

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 ByID

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

ByID orders the results by the id field.

func ByInvestorField

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

ByInvestorField orders the results by investor field.

func ByInvoiceField

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

ByInvoiceField orders the results by invoice 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"
	StatusACCEPTED Status = "ACCEPTED"
	StatusREJECTED Status = "REJECTED"
)

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