mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-12-15 10:04:01 +08:00
feat(fs): fs change event notification via SSE / show panic stack trace in task queue
This commit is contained in:
130
ent/fsevent/fsevent.go
Normal file
130
ent/fsevent/fsevent.go
Normal file
@@ -0,0 +1,130 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package fsevent
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the fsevent type in the database.
|
||||
Label = "fs_event"
|
||||
// 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"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// FieldEvent holds the string denoting the event field in the database.
|
||||
FieldEvent = "event"
|
||||
// FieldSubscriber holds the string denoting the subscriber field in the database.
|
||||
FieldSubscriber = "subscriber"
|
||||
// FieldUserFsevent holds the string denoting the user_fsevent field in the database.
|
||||
FieldUserFsevent = "user_fsevent"
|
||||
// EdgeUser holds the string denoting the user edge name in mutations.
|
||||
EdgeUser = "user"
|
||||
// Table holds the table name of the fsevent in the database.
|
||||
Table = "fs_events"
|
||||
// UserTable is the table that holds the user relation/edge.
|
||||
UserTable = "fs_events"
|
||||
// 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_fsevent"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for fsevent fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldEvent,
|
||||
FieldSubscriber,
|
||||
FieldUserFsevent,
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Note that the variables below are initialized by the runtime
|
||||
// package on the initialization of the application. Therefore,
|
||||
// it should be imported in the main as follows:
|
||||
//
|
||||
// import _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"
|
||||
var (
|
||||
Hooks [1]ent.Hook
|
||||
Interceptors [1]ent.Interceptor
|
||||
// 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
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the FsEvent 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()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEvent orders the results by the event field.
|
||||
func ByEvent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEvent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySubscriber orders the results by the subscriber field.
|
||||
func BySubscriber(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSubscriber, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserFsevent orders the results by the user_fsevent field.
|
||||
func ByUserFsevent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserFsevent, 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),
|
||||
)
|
||||
}
|
||||
390
ent/fsevent/where.go
Normal file
390
ent/fsevent/where.go
Normal file
@@ -0,0 +1,390 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package fsevent
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/cloudreve/Cloudreve/v4/ent/predicate"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.FsEvent {
|
||||
return predicate.FsEvent(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.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// Event applies equality check predicate on the "event" field. It's identical to EventEQ.
|
||||
func Event(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldEvent, v))
|
||||
}
|
||||
|
||||
// Subscriber applies equality check predicate on the "subscriber" field. It's identical to SubscriberEQ.
|
||||
func Subscriber(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// UserFsevent applies equality check predicate on the "user_fsevent" field. It's identical to UserFseventEQ.
|
||||
func UserFsevent(v int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldUserFsevent, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// EventEQ applies the EQ predicate on the "event" field.
|
||||
func EventEQ(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventNEQ applies the NEQ predicate on the "event" field.
|
||||
func EventNEQ(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventIn applies the In predicate on the "event" field.
|
||||
func EventIn(vs ...string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldEvent, vs...))
|
||||
}
|
||||
|
||||
// EventNotIn applies the NotIn predicate on the "event" field.
|
||||
func EventNotIn(vs ...string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldEvent, vs...))
|
||||
}
|
||||
|
||||
// EventGT applies the GT predicate on the "event" field.
|
||||
func EventGT(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventGTE applies the GTE predicate on the "event" field.
|
||||
func EventGTE(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventLT applies the LT predicate on the "event" field.
|
||||
func EventLT(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventLTE applies the LTE predicate on the "event" field.
|
||||
func EventLTE(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLTE(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventContains applies the Contains predicate on the "event" field.
|
||||
func EventContains(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldContains(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventHasPrefix applies the HasPrefix predicate on the "event" field.
|
||||
func EventHasPrefix(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldHasPrefix(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventHasSuffix applies the HasSuffix predicate on the "event" field.
|
||||
func EventHasSuffix(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldHasSuffix(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventEqualFold applies the EqualFold predicate on the "event" field.
|
||||
func EventEqualFold(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEqualFold(FieldEvent, v))
|
||||
}
|
||||
|
||||
// EventContainsFold applies the ContainsFold predicate on the "event" field.
|
||||
func EventContainsFold(v string) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldContainsFold(FieldEvent, v))
|
||||
}
|
||||
|
||||
// SubscriberEQ applies the EQ predicate on the "subscriber" field.
|
||||
func SubscriberEQ(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// SubscriberNEQ applies the NEQ predicate on the "subscriber" field.
|
||||
func SubscriberNEQ(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// SubscriberIn applies the In predicate on the "subscriber" field.
|
||||
func SubscriberIn(vs ...uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldSubscriber, vs...))
|
||||
}
|
||||
|
||||
// SubscriberNotIn applies the NotIn predicate on the "subscriber" field.
|
||||
func SubscriberNotIn(vs ...uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldSubscriber, vs...))
|
||||
}
|
||||
|
||||
// SubscriberGT applies the GT predicate on the "subscriber" field.
|
||||
func SubscriberGT(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGT(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// SubscriberGTE applies the GTE predicate on the "subscriber" field.
|
||||
func SubscriberGTE(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldGTE(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// SubscriberLT applies the LT predicate on the "subscriber" field.
|
||||
func SubscriberLT(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLT(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// SubscriberLTE applies the LTE predicate on the "subscriber" field.
|
||||
func SubscriberLTE(v uuid.UUID) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldLTE(FieldSubscriber, v))
|
||||
}
|
||||
|
||||
// UserFseventEQ applies the EQ predicate on the "user_fsevent" field.
|
||||
func UserFseventEQ(v int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldEQ(FieldUserFsevent, v))
|
||||
}
|
||||
|
||||
// UserFseventNEQ applies the NEQ predicate on the "user_fsevent" field.
|
||||
func UserFseventNEQ(v int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNEQ(FieldUserFsevent, v))
|
||||
}
|
||||
|
||||
// UserFseventIn applies the In predicate on the "user_fsevent" field.
|
||||
func UserFseventIn(vs ...int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIn(FieldUserFsevent, vs...))
|
||||
}
|
||||
|
||||
// UserFseventNotIn applies the NotIn predicate on the "user_fsevent" field.
|
||||
func UserFseventNotIn(vs ...int) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotIn(FieldUserFsevent, vs...))
|
||||
}
|
||||
|
||||
// UserFseventIsNil applies the IsNil predicate on the "user_fsevent" field.
|
||||
func UserFseventIsNil() predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldIsNull(FieldUserFsevent))
|
||||
}
|
||||
|
||||
// UserFseventNotNil applies the NotNil predicate on the "user_fsevent" field.
|
||||
func UserFseventNotNil() predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.FieldNotNull(FieldUserFsevent))
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.FsEvent {
|
||||
return predicate.FsEvent(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.FsEvent {
|
||||
return predicate.FsEvent(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.FsEvent) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.FsEvent) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.FsEvent) predicate.FsEvent {
|
||||
return predicate.FsEvent(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user