ent seteup

This commit is contained in:
2024-11-10 14:52:33 +05:30
parent 45c318b897
commit b0db98452a
78 changed files with 21469 additions and 36 deletions

174
db/ent/audit/audit.go Normal file
View File

@@ -0,0 +1,174 @@
// Code generated by ent, DO NOT EDIT.
package audit
import (
"fmt"
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the audit type in the database.
Label = "audit"
// 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"
// FieldEntName holds the string denoting the ent_name field in the database.
FieldEntName = "ent_name"
// FieldEntID holds the string denoting the ent_id field in the database.
FieldEntID = "ent_id"
// FieldOperation holds the string denoting the operation field in the database.
FieldOperation = "operation"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldIP holds the string denoting the ip field in the database.
FieldIP = "ip"
// FieldUserName holds the string denoting the user_name field in the database.
FieldUserName = "user_name"
// EdgeUser holds the string denoting the user edge name in mutations.
EdgeUser = "user"
// Table holds the table name of the audit in the database.
Table = "audits"
// UserTable is the table that holds the user relation/edge.
UserTable = "audits"
// UserInverseTable is the table name for the User entity.
// It exists in this package in order to avoid circular dependency with the "user" package.
UserInverseTable = "users"
// UserColumn is the table column denoting the user relation/edge.
UserColumn = "user_id"
)
// Columns holds all SQL columns for audit fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldEntName,
FieldEntID,
FieldOperation,
FieldDescription,
FieldIP,
FieldUserName,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "audits"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"user_id",
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}
var (
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// EntNameValidator is a validator for the "ent_name" field. It is called by the builders before save.
EntNameValidator func(string) error
// EntIDValidator is a validator for the "ent_id" field. It is called by the builders before save.
EntIDValidator func(int64) error
// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
DescriptionValidator func(string) error
// IPValidator is a validator for the "ip" field. It is called by the builders before save.
IPValidator func(string) error
// UserNameValidator is a validator for the "user_name" field. It is called by the builders before save.
UserNameValidator func(string) error
)
// Operation defines the type for the "operation" enum field.
type Operation string
// Operation values.
const (
OperationCreate Operation = "Create"
OperationUpdate Operation = "Update"
OperationUpdateOne Operation = "UpdateOne"
OperationDelete Operation = "Delete"
OperationDeleteOne Operation = "DeleteOne"
)
func (o Operation) String() string {
return string(o)
}
// OperationValidator is a validator for the "operation" field enum values. It is called by the builders before save.
func OperationValidator(o Operation) error {
switch o {
case OperationCreate, OperationUpdate, OperationUpdateOne, OperationDelete, OperationDeleteOne:
return nil
default:
return fmt.Errorf("audit: invalid enum value for operation field: %q", o)
}
}
// OrderOption defines the ordering options for the Audit queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByEntName orders the results by the ent_name field.
func ByEntName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntName, opts...).ToFunc()
}
// ByEntID orders the results by the ent_id field.
func ByEntID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntID, opts...).ToFunc()
}
// ByOperation orders the results by the operation field.
func ByOperation(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperation, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByIP orders the results by the ip field.
func ByIP(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIP, opts...).ToFunc()
}
// ByUserName orders the results by the user_name field.
func ByUserName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserName, opts...).ToFunc()
}
// ByUserField orders the results by user field.
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
}
}
func newUserStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(UserInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
)
}

504
db/ent/audit/where.go Normal file
View File

@@ -0,0 +1,504 @@
// Code generated by ent, DO NOT EDIT.
package audit
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"gitserver.in/patialtech/rano/db/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldID, id))
}
// 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))
}
// EntName applies equality check predicate on the "ent_name" field. It's identical to EntNameEQ.
func EntName(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldEntName, v))
}
// EntID applies equality check predicate on the "ent_id" field. It's identical to EntIDEQ.
func EntID(v int64) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldEntID, v))
}
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func Description(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldDescription, v))
}
// IP applies equality check predicate on the "ip" field. It's identical to IPEQ.
func IP(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldIP, v))
}
// UserName applies equality check predicate on the "user_name" field. It's identical to UserNameEQ.
func UserName(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserName, 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))
}
// EntNameEQ applies the EQ predicate on the "ent_name" field.
func EntNameEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldEntName, v))
}
// EntNameNEQ applies the NEQ predicate on the "ent_name" field.
func EntNameNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldEntName, v))
}
// EntNameIn applies the In predicate on the "ent_name" field.
func EntNameIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldEntName, vs...))
}
// EntNameNotIn applies the NotIn predicate on the "ent_name" field.
func EntNameNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldEntName, vs...))
}
// EntNameGT applies the GT predicate on the "ent_name" field.
func EntNameGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldEntName, v))
}
// EntNameGTE applies the GTE predicate on the "ent_name" field.
func EntNameGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldEntName, v))
}
// EntNameLT applies the LT predicate on the "ent_name" field.
func EntNameLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldEntName, v))
}
// EntNameLTE applies the LTE predicate on the "ent_name" field.
func EntNameLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldEntName, v))
}
// EntNameContains applies the Contains predicate on the "ent_name" field.
func EntNameContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldEntName, v))
}
// EntNameHasPrefix applies the HasPrefix predicate on the "ent_name" field.
func EntNameHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldEntName, v))
}
// EntNameHasSuffix applies the HasSuffix predicate on the "ent_name" field.
func EntNameHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldEntName, v))
}
// EntNameEqualFold applies the EqualFold predicate on the "ent_name" field.
func EntNameEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldEntName, v))
}
// EntNameContainsFold applies the ContainsFold predicate on the "ent_name" field.
func EntNameContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldEntName, v))
}
// EntIDEQ applies the EQ predicate on the "ent_id" field.
func EntIDEQ(v int64) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldEntID, v))
}
// EntIDNEQ applies the NEQ predicate on the "ent_id" field.
func EntIDNEQ(v int64) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldEntID, v))
}
// EntIDIn applies the In predicate on the "ent_id" field.
func EntIDIn(vs ...int64) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldEntID, vs...))
}
// EntIDNotIn applies the NotIn predicate on the "ent_id" field.
func EntIDNotIn(vs ...int64) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldEntID, vs...))
}
// EntIDGT applies the GT predicate on the "ent_id" field.
func EntIDGT(v int64) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldEntID, v))
}
// EntIDGTE applies the GTE predicate on the "ent_id" field.
func EntIDGTE(v int64) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldEntID, v))
}
// EntIDLT applies the LT predicate on the "ent_id" field.
func EntIDLT(v int64) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldEntID, v))
}
// EntIDLTE applies the LTE predicate on the "ent_id" field.
func EntIDLTE(v int64) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldEntID, v))
}
// OperationEQ applies the EQ predicate on the "operation" field.
func OperationEQ(v Operation) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldOperation, v))
}
// OperationNEQ applies the NEQ predicate on the "operation" field.
func OperationNEQ(v Operation) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldOperation, v))
}
// OperationIn applies the In predicate on the "operation" field.
func OperationIn(vs ...Operation) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldOperation, vs...))
}
// OperationNotIn applies the NotIn predicate on the "operation" field.
func OperationNotIn(vs ...Operation) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldOperation, vs...))
}
// DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldDescription, v))
}
// DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldDescription, v))
}
// DescriptionIn applies the In predicate on the "description" field.
func DescriptionIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldDescription, vs...))
}
// DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldDescription, vs...))
}
// DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldDescription, v))
}
// DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldDescription, v))
}
// DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldDescription, v))
}
// DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldDescription, v))
}
// DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldDescription, v))
}
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldDescription, v))
}
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldDescription, v))
}
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldDescription, v))
}
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldDescription, v))
}
// IPEQ applies the EQ predicate on the "ip" field.
func IPEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldIP, v))
}
// IPNEQ applies the NEQ predicate on the "ip" field.
func IPNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldIP, v))
}
// IPIn applies the In predicate on the "ip" field.
func IPIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldIP, vs...))
}
// IPNotIn applies the NotIn predicate on the "ip" field.
func IPNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldIP, vs...))
}
// IPGT applies the GT predicate on the "ip" field.
func IPGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldIP, v))
}
// IPGTE applies the GTE predicate on the "ip" field.
func IPGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldIP, v))
}
// IPLT applies the LT predicate on the "ip" field.
func IPLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldIP, v))
}
// IPLTE applies the LTE predicate on the "ip" field.
func IPLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldIP, v))
}
// IPContains applies the Contains predicate on the "ip" field.
func IPContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldIP, v))
}
// IPHasPrefix applies the HasPrefix predicate on the "ip" field.
func IPHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldIP, v))
}
// IPHasSuffix applies the HasSuffix predicate on the "ip" field.
func IPHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldIP, v))
}
// IPIsNil applies the IsNil predicate on the "ip" field.
func IPIsNil() predicate.Audit {
return predicate.Audit(sql.FieldIsNull(FieldIP))
}
// IPNotNil applies the NotNil predicate on the "ip" field.
func IPNotNil() predicate.Audit {
return predicate.Audit(sql.FieldNotNull(FieldIP))
}
// IPEqualFold applies the EqualFold predicate on the "ip" field.
func IPEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldIP, v))
}
// IPContainsFold applies the ContainsFold predicate on the "ip" field.
func IPContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldIP, v))
}
// UserNameEQ applies the EQ predicate on the "user_name" field.
func UserNameEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldEQ(FieldUserName, v))
}
// UserNameNEQ applies the NEQ predicate on the "user_name" field.
func UserNameNEQ(v string) predicate.Audit {
return predicate.Audit(sql.FieldNEQ(FieldUserName, v))
}
// UserNameIn applies the In predicate on the "user_name" field.
func UserNameIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldIn(FieldUserName, vs...))
}
// UserNameNotIn applies the NotIn predicate on the "user_name" field.
func UserNameNotIn(vs ...string) predicate.Audit {
return predicate.Audit(sql.FieldNotIn(FieldUserName, vs...))
}
// UserNameGT applies the GT predicate on the "user_name" field.
func UserNameGT(v string) predicate.Audit {
return predicate.Audit(sql.FieldGT(FieldUserName, v))
}
// UserNameGTE applies the GTE predicate on the "user_name" field.
func UserNameGTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldGTE(FieldUserName, v))
}
// UserNameLT applies the LT predicate on the "user_name" field.
func UserNameLT(v string) predicate.Audit {
return predicate.Audit(sql.FieldLT(FieldUserName, v))
}
// UserNameLTE applies the LTE predicate on the "user_name" field.
func UserNameLTE(v string) predicate.Audit {
return predicate.Audit(sql.FieldLTE(FieldUserName, v))
}
// UserNameContains applies the Contains predicate on the "user_name" field.
func UserNameContains(v string) predicate.Audit {
return predicate.Audit(sql.FieldContains(FieldUserName, v))
}
// UserNameHasPrefix applies the HasPrefix predicate on the "user_name" field.
func UserNameHasPrefix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasPrefix(FieldUserName, v))
}
// UserNameHasSuffix applies the HasSuffix predicate on the "user_name" field.
func UserNameHasSuffix(v string) predicate.Audit {
return predicate.Audit(sql.FieldHasSuffix(FieldUserName, v))
}
// UserNameIsNil applies the IsNil predicate on the "user_name" field.
func UserNameIsNil() predicate.Audit {
return predicate.Audit(sql.FieldIsNull(FieldUserName))
}
// UserNameNotNil applies the NotNil predicate on the "user_name" field.
func UserNameNotNil() predicate.Audit {
return predicate.Audit(sql.FieldNotNull(FieldUserName))
}
// UserNameEqualFold applies the EqualFold predicate on the "user_name" field.
func UserNameEqualFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldEqualFold(FieldUserName, v))
}
// UserNameContainsFold applies the ContainsFold predicate on the "user_name" field.
func UserNameContainsFold(v string) predicate.Audit {
return predicate.Audit(sql.FieldContainsFold(FieldUserName, 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))
}