Files

526 lines
18 KiB
Go

// Code generated by ent, DO NOT EDIT.
package audit
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/chaitin/MonkeyCode/backend/db/predicate"
"github.com/google/uuid"
)
// ID filters vertices based on their ID field.
func ID(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldID, id))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserID, v))
}
// Operation applies equality check predicate on the "operation" field. It's identical to OperationEQ.
func Operation(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldOperation, v))
}
// SourceIP applies equality check predicate on the "source_ip" field. It's identical to SourceIPEQ.
func SourceIP(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldSourceIP, v))
}
// UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.
func UserAgent(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserAgent, v))
}
// Request applies equality check predicate on the "request" field. It's identical to RequestEQ.
func Request(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldRequest, v))
}
// Response applies equality check predicate on the "response" field. It's identical to ResponseEQ.
func Response(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldResponse, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldCreatedAt, v))
}
// UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEQ(v uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserID, v))
}
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNEQ(v uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldUserID, v))
}
// UserIDIn applies the In predicate on the "user_id" field.
func UserIDIn(vs ...uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldUserID, vs...))
}
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
func UserIDNotIn(vs ...uuid.UUID) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldUserID, vs...))
}
// OperationEQ applies the EQ predicate on the "operation" field.
func OperationEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldOperation, v))
}
// OperationNEQ applies the NEQ predicate on the "operation" field.
func OperationNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldOperation, v))
}
// OperationIn applies the In predicate on the "operation" field.
func OperationIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldOperation, vs...))
}
// OperationNotIn applies the NotIn predicate on the "operation" field.
func OperationNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldOperation, vs...))
}
// OperationGT applies the GT predicate on the "operation" field.
func OperationGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldOperation, v))
}
// OperationGTE applies the GTE predicate on the "operation" field.
func OperationGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldOperation, v))
}
// OperationLT applies the LT predicate on the "operation" field.
func OperationLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldOperation, v))
}
// OperationLTE applies the LTE predicate on the "operation" field.
func OperationLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldOperation, v))
}
// OperationContains applies the Contains predicate on the "operation" field.
func OperationContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldOperation, v))
}
// OperationHasPrefix applies the HasPrefix predicate on the "operation" field.
func OperationHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldOperation, v))
}
// OperationHasSuffix applies the HasSuffix predicate on the "operation" field.
func OperationHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldOperation, v))
}
// OperationEqualFold applies the EqualFold predicate on the "operation" field.
func OperationEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldOperation, v))
}
// OperationContainsFold applies the ContainsFold predicate on the "operation" field.
func OperationContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldOperation, v))
}
// SourceIPEQ applies the EQ predicate on the "source_ip" field.
func SourceIPEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldSourceIP, v))
}
// SourceIPNEQ applies the NEQ predicate on the "source_ip" field.
func SourceIPNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldSourceIP, v))
}
// SourceIPIn applies the In predicate on the "source_ip" field.
func SourceIPIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldSourceIP, vs...))
}
// SourceIPNotIn applies the NotIn predicate on the "source_ip" field.
func SourceIPNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldSourceIP, vs...))
}
// SourceIPGT applies the GT predicate on the "source_ip" field.
func SourceIPGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldSourceIP, v))
}
// SourceIPGTE applies the GTE predicate on the "source_ip" field.
func SourceIPGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldSourceIP, v))
}
// SourceIPLT applies the LT predicate on the "source_ip" field.
func SourceIPLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldSourceIP, v))
}
// SourceIPLTE applies the LTE predicate on the "source_ip" field.
func SourceIPLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldSourceIP, v))
}
// SourceIPContains applies the Contains predicate on the "source_ip" field.
func SourceIPContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldSourceIP, v))
}
// SourceIPHasPrefix applies the HasPrefix predicate on the "source_ip" field.
func SourceIPHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldSourceIP, v))
}
// SourceIPHasSuffix applies the HasSuffix predicate on the "source_ip" field.
func SourceIPHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldSourceIP, v))
}
// SourceIPEqualFold applies the EqualFold predicate on the "source_ip" field.
func SourceIPEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldSourceIP, v))
}
// SourceIPContainsFold applies the ContainsFold predicate on the "source_ip" field.
func SourceIPContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldSourceIP, v))
}
// UserAgentEQ applies the EQ predicate on the "user_agent" field.
func UserAgentEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserAgent, v))
}
// UserAgentNEQ applies the NEQ predicate on the "user_agent" field.
func UserAgentNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldUserAgent, v))
}
// UserAgentIn applies the In predicate on the "user_agent" field.
func UserAgentIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldUserAgent, vs...))
}
// UserAgentNotIn applies the NotIn predicate on the "user_agent" field.
func UserAgentNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldUserAgent, vs...))
}
// UserAgentGT applies the GT predicate on the "user_agent" field.
func UserAgentGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldUserAgent, v))
}
// UserAgentGTE applies the GTE predicate on the "user_agent" field.
func UserAgentGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldUserAgent, v))
}
// UserAgentLT applies the LT predicate on the "user_agent" field.
func UserAgentLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldUserAgent, v))
}
// UserAgentLTE applies the LTE predicate on the "user_agent" field.
func UserAgentLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldUserAgent, v))
}
// UserAgentContains applies the Contains predicate on the "user_agent" field.
func UserAgentContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldUserAgent, v))
}
// UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.
func UserAgentHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldUserAgent, v))
}
// UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.
func UserAgentHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldUserAgent, v))
}
// UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.
func UserAgentEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldUserAgent, v))
}
// UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.
func UserAgentContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldUserAgent, v))
}
// RequestEQ applies the EQ predicate on the "request" field.
func RequestEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldRequest, v))
}
// RequestNEQ applies the NEQ predicate on the "request" field.
func RequestNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldRequest, v))
}
// RequestIn applies the In predicate on the "request" field.
func RequestIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldRequest, vs...))
}
// RequestNotIn applies the NotIn predicate on the "request" field.
func RequestNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldRequest, vs...))
}
// RequestGT applies the GT predicate on the "request" field.
func RequestGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldRequest, v))
}
// RequestGTE applies the GTE predicate on the "request" field.
func RequestGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldRequest, v))
}
// RequestLT applies the LT predicate on the "request" field.
func RequestLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldRequest, v))
}
// RequestLTE applies the LTE predicate on the "request" field.
func RequestLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldRequest, v))
}
// RequestContains applies the Contains predicate on the "request" field.
func RequestContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldRequest, v))
}
// RequestHasPrefix applies the HasPrefix predicate on the "request" field.
func RequestHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldRequest, v))
}
// RequestHasSuffix applies the HasSuffix predicate on the "request" field.
func RequestHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldRequest, v))
}
// RequestEqualFold applies the EqualFold predicate on the "request" field.
func RequestEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldRequest, v))
}
// RequestContainsFold applies the ContainsFold predicate on the "request" field.
func RequestContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldRequest, v))
}
// ResponseEQ applies the EQ predicate on the "response" field.
func ResponseEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldResponse, v))
}
// ResponseNEQ applies the NEQ predicate on the "response" field.
func ResponseNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldResponse, v))
}
// ResponseIn applies the In predicate on the "response" field.
func ResponseIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldResponse, vs...))
}
// ResponseNotIn applies the NotIn predicate on the "response" field.
func ResponseNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldResponse, vs...))
}
// ResponseGT applies the GT predicate on the "response" field.
func ResponseGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldResponse, v))
}
// ResponseGTE applies the GTE predicate on the "response" field.
func ResponseGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldResponse, v))
}
// ResponseLT applies the LT predicate on the "response" field.
func ResponseLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldResponse, v))
}
// ResponseLTE applies the LTE predicate on the "response" field.
func ResponseLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldResponse, v))
}
// ResponseContains applies the Contains predicate on the "response" field.
func ResponseContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldResponse, v))
}
// ResponseHasPrefix applies the HasPrefix predicate on the "response" field.
func ResponseHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldResponse, v))
}
// ResponseHasSuffix applies the HasSuffix predicate on the "response" field.
func ResponseHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldResponse, v))
}
// ResponseIsNil applies the IsNil predicate on the "response" field.
func ResponseIsNil() predicate.Audit {
return predicate.Audit(sql.FieldIsNull(FieldResponse))
}
// ResponseNotNil applies the NotNil predicate on the "response" field.
func ResponseNotNil() predicate.Audit {
return predicate.Audit(sql.FieldNotNull(FieldResponse))
}
// ResponseEqualFold applies the EqualFold predicate on the "response" field.
func ResponseEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldResponse, v))
}
// ResponseContainsFold applies the ContainsFold predicate on the "response" field.
func ResponseContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldResponse, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldCreatedAt, v))
}
// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.Audit {
return predicate.Audit(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func HasUserWith(preds ...predicate.User) predicate.Audit {
return predicate.Audit(func(s *sql.Selector) {
step := newUserStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Audit) predicate.Audit {
return predicate.Audit(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Audit) predicate.Audit {
return predicate.Audit(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Audit) predicate.Audit {
return predicate.Audit(sql.NotPredicates(p))
}