Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Invoice) predicate.Invoice
- func CreatedAt(v time.Time) predicate.Invoice
- func CreatedAtEQ(v time.Time) predicate.Invoice
- func CreatedAtGT(v time.Time) predicate.Invoice
- func CreatedAtGTE(v time.Time) predicate.Invoice
- func CreatedAtIn(vs ...time.Time) predicate.Invoice
- func CreatedAtLT(v time.Time) predicate.Invoice
- func CreatedAtLTE(v time.Time) predicate.Invoice
- func CreatedAtNEQ(v time.Time) predicate.Invoice
- func CreatedAtNotIn(vs ...time.Time) predicate.Invoice
- func HasInvoiceStatus() predicate.Invoice
- func HasInvoiceStatusWith(preds ...predicate.InvoiceStatusCode) predicate.Invoice
- func HasOrder() predicate.Invoice
- func HasOrderWith(preds ...predicate.Order) predicate.Invoice
- func ID(id uuid.UUID) predicate.Invoice
- func IDEQ(id uuid.UUID) predicate.Invoice
- func IDGT(id uuid.UUID) predicate.Invoice
- func IDGTE(id uuid.UUID) predicate.Invoice
- func IDIn(ids ...uuid.UUID) predicate.Invoice
- func IDLT(id uuid.UUID) predicate.Invoice
- func IDLTE(id uuid.UUID) predicate.Invoice
- func IDNEQ(id uuid.UUID) predicate.Invoice
- func IDNotIn(ids ...uuid.UUID) predicate.Invoice
- func Not(p predicate.Invoice) predicate.Invoice
- func Note(v string) predicate.Invoice
- func NoteContains(v string) predicate.Invoice
- func NoteContainsFold(v string) predicate.Invoice
- func NoteEQ(v string) predicate.Invoice
- func NoteEqualFold(v string) predicate.Invoice
- func NoteGT(v string) predicate.Invoice
- func NoteGTE(v string) predicate.Invoice
- func NoteHasPrefix(v string) predicate.Invoice
- func NoteHasSuffix(v string) predicate.Invoice
- func NoteIn(vs ...string) predicate.Invoice
- func NoteIsNil() predicate.Invoice
- func NoteLT(v string) predicate.Invoice
- func NoteLTE(v string) predicate.Invoice
- func NoteNEQ(v string) predicate.Invoice
- func NoteNotIn(vs ...string) predicate.Invoice
- func NoteNotNil() predicate.Invoice
- func Or(predicates ...predicate.Invoice) predicate.Invoice
- func OrderID(v uuid.UUID) predicate.Invoice
- func OrderIDEQ(v uuid.UUID) predicate.Invoice
- func OrderIDIn(vs ...uuid.UUID) predicate.Invoice
- func OrderIDNEQ(v uuid.UUID) predicate.Invoice
- func OrderIDNotIn(vs ...uuid.UUID) predicate.Invoice
- func PaymentMethodEQ(v PaymentMethod) predicate.Invoice
- func PaymentMethodIn(vs ...PaymentMethod) predicate.Invoice
- func PaymentMethodNEQ(v PaymentMethod) predicate.Invoice
- func PaymentMethodNotIn(vs ...PaymentMethod) predicate.Invoice
- func PaymentMethodValidator(pm PaymentMethod) error
- func StatusCode(v int) predicate.Invoice
- func StatusCodeEQ(v int) predicate.Invoice
- func StatusCodeIn(vs ...int) predicate.Invoice
- func StatusCodeNEQ(v int) predicate.Invoice
- func StatusCodeNotIn(vs ...int) predicate.Invoice
- func Total(v decimal.Decimal) predicate.Invoice
- func TotalEQ(v decimal.Decimal) predicate.Invoice
- func TotalGT(v decimal.Decimal) predicate.Invoice
- func TotalGTE(v decimal.Decimal) predicate.Invoice
- func TotalIn(vs ...decimal.Decimal) predicate.Invoice
- func TotalLT(v decimal.Decimal) predicate.Invoice
- func TotalLTE(v decimal.Decimal) predicate.Invoice
- func TotalNEQ(v decimal.Decimal) predicate.Invoice
- func TotalNotIn(vs ...decimal.Decimal) predicate.Invoice
- func TypeEQ(v Type) predicate.Invoice
- func TypeIn(vs ...Type) predicate.Invoice
- func TypeNEQ(v Type) predicate.Invoice
- func TypeNotIn(vs ...Type) predicate.Invoice
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Invoice
- func UpdatedAtEQ(v time.Time) predicate.Invoice
- func UpdatedAtGT(v time.Time) predicate.Invoice
- func UpdatedAtGTE(v time.Time) predicate.Invoice
- func UpdatedAtIn(vs ...time.Time) predicate.Invoice
- func UpdatedAtLT(v time.Time) predicate.Invoice
- func UpdatedAtLTE(v time.Time) predicate.Invoice
- func UpdatedAtNEQ(v time.Time) predicate.Invoice
- func UpdatedAtNotIn(vs ...time.Time) predicate.Invoice
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByInvoiceStatusField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByNote(opts ...sql.OrderTermOption) OrderOption
- func ByOrderField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByOrderID(opts ...sql.OrderTermOption) OrderOption
- func ByPaymentMethod(opts ...sql.OrderTermOption) OrderOption
- func ByStatusCode(opts ...sql.OrderTermOption) OrderOption
- func ByTotal(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type PaymentMethod
- type Type
Constants ¶
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" )
const DefaultPaymentMethod = PaymentMethodCash
PaymentMethodCash is the default value of the PaymentMethod enum.
const DefaultType = TypeProForma
TypeProForma is the default value of the Type enum.
Variables ¶
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldOrderID, FieldTotal, FieldNote, FieldType, FieldStatusCode, FieldPaymentMethod, }
Columns holds all SQL columns for invoice fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasInvoiceStatus ¶
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 HasOrderWith ¶
HasOrderWith applies the HasEdge predicate on the "order" edge with a given conditions (other predicates).
func NoteContains ¶
NoteContains applies the Contains predicate on the "note" field.
func NoteContainsFold ¶
NoteContainsFold applies the ContainsFold predicate on the "note" field.
func NoteEqualFold ¶
NoteEqualFold applies the EqualFold predicate on the "note" field.
func NoteHasPrefix ¶
NoteHasPrefix applies the HasPrefix predicate on the "note" field.
func NoteHasSuffix ¶
NoteHasSuffix applies the HasSuffix predicate on the "note" field.
func NoteNotNil ¶
NoteNotNil applies the NotNil predicate on the "note" field.
func OrderID ¶
OrderID applies equality check predicate on the "order_id" field. It's identical to OrderIDEQ.
func OrderIDNEQ ¶
OrderIDNEQ applies the NEQ predicate on the "order_id" field.
func OrderIDNotIn ¶
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 ¶
StatusCode applies equality check predicate on the "status_code" field. It's identical to StatusCodeEQ.
func StatusCodeEQ ¶
StatusCodeEQ applies the EQ predicate on the "status_code" field.
func StatusCodeIn ¶
StatusCodeIn applies the In predicate on the "status_code" field.
func StatusCodeNEQ ¶
StatusCodeNEQ applies the NEQ predicate on the "status_code" field.
func StatusCodeNotIn ¶
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 TotalNotIn ¶
TotalNotIn applies the NotIn predicate on the "total" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.