reaction

package
v0.0.0-...-34fc03e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the reaction type in the database.
	Label = "reaction"
	// 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"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldActorID holds the string denoting the actor_id field in the database.
	FieldActorID = "actor_id"
	// FieldStatusID holds the string denoting the status_id field in the database.
	FieldStatusID = "status_id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldDat holds the string denoting the dat field in the database.
	FieldDat = "dat"
	// EdgeActors holds the string denoting the actors edge name in mutations.
	EdgeActors = "actors"
	// EdgeStatus holds the string denoting the status edge name in mutations.
	EdgeStatus = "status"
	// ActorFieldID holds the string denoting the ID field of the Actor.
	ActorFieldID = "id"
	// StatusFieldID holds the string denoting the ID field of the Status.
	StatusFieldID = "id"
	// Table holds the table name of the reaction in the database.
	Table = "reactions"
	// ActorsTable is the table that holds the actors relation/edge.
	ActorsTable = "reactions"
	// ActorsInverseTable is the table name for the Actor entity.
	// It exists in this package in order to avoid circular dependency with the "actor" package.
	ActorsInverseTable = "actors"
	// ActorsColumn is the table column denoting the actors relation/edge.
	ActorsColumn = "actor_id"
	// StatusTable is the table that holds the status relation/edge.
	StatusTable = "reactions"
	// StatusInverseTable is the table name for the Status entity.
	// It exists in this package in order to avoid circular dependency with the "status" package.
	StatusInverseTable = "status"
	// StatusColumn is the table column denoting the status relation/edge.
	StatusColumn = "status_id"
)

Variables

View Source
var (
	Hooks  [2]ent.Hook
	Policy ent.Policy
	// 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
)

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/eriner/burr/internal/ent/runtime"

Columns holds all SQL columns for reaction fields.

Functions

func ActorID

func ActorID(v uint64) predicate.Reaction

ActorID applies equality check predicate on the "actor_id" field. It's identical to ActorIDEQ.

func ActorIDEQ

func ActorIDEQ(v uint64) predicate.Reaction

ActorIDEQ applies the EQ predicate on the "actor_id" field.

func ActorIDIn

func ActorIDIn(vs ...uint64) predicate.Reaction

ActorIDIn applies the In predicate on the "actor_id" field.

func ActorIDNEQ

func ActorIDNEQ(v uint64) predicate.Reaction

ActorIDNEQ applies the NEQ predicate on the "actor_id" field.

func ActorIDNotIn

func ActorIDNotIn(vs ...uint64) predicate.Reaction

ActorIDNotIn applies the NotIn predicate on the "actor_id" field.

func And

func And(predicates ...predicate.Reaction) predicate.Reaction

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Reaction

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Reaction

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Reaction

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Reaction

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Reaction

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Reaction

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Reaction

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v int) predicate.Reaction

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int) predicate.Reaction

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v int) predicate.Reaction

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int) predicate.Reaction

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int) predicate.Reaction

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByIsNil

func CreatedByIsNil() predicate.Reaction

CreatedByIsNil applies the IsNil predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v int) predicate.Reaction

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int) predicate.Reaction

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int) predicate.Reaction

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int) predicate.Reaction

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func CreatedByNotNil

func CreatedByNotNil() predicate.Reaction

CreatedByNotNil applies the NotNil predicate on the "created_by" field.

func Dat

func Dat(v uint64) predicate.Reaction

Dat applies equality check predicate on the "dat" field. It's identical to DatEQ.

func DatEQ

func DatEQ(v uint64) predicate.Reaction

DatEQ applies the EQ predicate on the "dat" field.

func DatGT

func DatGT(v uint64) predicate.Reaction

DatGT applies the GT predicate on the "dat" field.

func DatGTE

func DatGTE(v uint64) predicate.Reaction

DatGTE applies the GTE predicate on the "dat" field.

func DatIn

func DatIn(vs ...uint64) predicate.Reaction

DatIn applies the In predicate on the "dat" field.

func DatLT

func DatLT(v uint64) predicate.Reaction

DatLT applies the LT predicate on the "dat" field.

func DatLTE

func DatLTE(v uint64) predicate.Reaction

DatLTE applies the LTE predicate on the "dat" field.

func DatNEQ

func DatNEQ(v uint64) predicate.Reaction

DatNEQ applies the NEQ predicate on the "dat" field.

func DatNotIn

func DatNotIn(vs ...uint64) predicate.Reaction

DatNotIn applies the NotIn predicate on the "dat" field.

func HasActors

func HasActors() predicate.Reaction

HasActors applies the HasEdge predicate on the "actors" edge.

func HasActorsWith

func HasActorsWith(preds ...predicate.Actor) predicate.Reaction

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

func HasStatus

func HasStatus() predicate.Reaction

HasStatus applies the HasEdge predicate on the "status" edge.

func HasStatusWith

func HasStatusWith(preds ...predicate.Status) predicate.Reaction

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Reaction) predicate.Reaction

Or groups predicates with the OR operator between them.

func StatusID

func StatusID(v uint64) predicate.Reaction

StatusID applies equality check predicate on the "status_id" field. It's identical to StatusIDEQ.

func StatusIDEQ

func StatusIDEQ(v uint64) predicate.Reaction

StatusIDEQ applies the EQ predicate on the "status_id" field.

func StatusIDIn

func StatusIDIn(vs ...uint64) predicate.Reaction

StatusIDIn applies the In predicate on the "status_id" field.

func StatusIDNEQ

func StatusIDNEQ(v uint64) predicate.Reaction

StatusIDNEQ applies the NEQ predicate on the "status_id" field.

func StatusIDNotIn

func StatusIDNotIn(vs ...uint64) predicate.Reaction

StatusIDNotIn applies the NotIn predicate on the "status_id" field.

func TypeEQ

func TypeEQ(v Type) predicate.Reaction

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Reaction

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Reaction

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Reaction

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Reaction

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Reaction

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Reaction

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Reaction

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Reaction

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Reaction

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Reaction

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedBy

func UpdatedBy(v int) predicate.Reaction

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int) predicate.Reaction

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int) predicate.Reaction

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int) predicate.Reaction

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int) predicate.Reaction

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Reaction

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int) predicate.Reaction

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int) predicate.Reaction

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int) predicate.Reaction

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int) predicate.Reaction

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Reaction

UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeLike  Type = "like"
	TypeBoost Type = "boost"
	TypeEmote Type = "emote"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL