notification

package
v0.0.0-...-e438b21 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the notification type in the database.
	Label = "notification"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldReadAt holds the string denoting the read_at field in the database.
	FieldReadAt = "read_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeRelatedTweet holds the string denoting the related_tweet edge name in mutations.
	EdgeRelatedTweet = "related_tweet"
	// EdgeRelatedUser holds the string denoting the related_user edge name in mutations.
	EdgeRelatedUser = "related_user"
	// Table holds the table name of the notification in the database.
	Table = "notifications"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "notifications"
	// 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_notifications"
	// RelatedTweetTable is the table that holds the related_tweet relation/edge.
	RelatedTweetTable = "notifications"
	// RelatedTweetInverseTable is the table name for the Tweet entity.
	// It exists in this package in order to avoid circular dependency with the "tweet" package.
	RelatedTweetInverseTable = "tweets"
	// RelatedTweetColumn is the table column denoting the related_tweet relation/edge.
	RelatedTweetColumn = "notification_related_tweet"
	// RelatedUserTable is the table that holds the related_user relation/edge.
	RelatedUserTable = "notifications"
	// RelatedUserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	RelatedUserInverseTable = "users"
	// RelatedUserColumn is the table column denoting the related_user relation/edge.
	RelatedUserColumn = "notification_related_user"
)

Variables

Columns holds all SQL columns for notification fields.

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)
View Source
var ForeignKeys = []string{
	"notification_related_tweet",
	"notification_related_user",
	"user_notifications",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "notifications" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Notification) predicate.Notification

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Notification

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Notification

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Notification

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Notification

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Notification

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Notification

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Notification

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

func CreatedAtNotIn

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

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

func HasRelatedTweet

func HasRelatedTweet() predicate.Notification

HasRelatedTweet applies the HasEdge predicate on the "related_tweet" edge.

func HasRelatedTweetWith

func HasRelatedTweetWith(preds ...predicate.Tweet) predicate.Notification

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

func HasRelatedUser

func HasRelatedUser() predicate.Notification

HasRelatedUser applies the HasEdge predicate on the "related_user" edge.

func HasRelatedUserWith

func HasRelatedUserWith(preds ...predicate.User) predicate.Notification

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

func HasUser

func HasUser() predicate.Notification

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Notification

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

func ID

func ID(id int) predicate.Notification

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Notification

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Notification

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Notification

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Notification

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Notification

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Notification

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Notification

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Notification

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Notification) predicate.Notification

Or groups predicates with the OR operator between them.

func ReadAt

func ReadAt(v time.Time) predicate.Notification

ReadAt applies equality check predicate on the "read_at" field. It's identical to ReadAtEQ.

func ReadAtEQ

func ReadAtEQ(v time.Time) predicate.Notification

ReadAtEQ applies the EQ predicate on the "read_at" field.

func ReadAtGT

func ReadAtGT(v time.Time) predicate.Notification

ReadAtGT applies the GT predicate on the "read_at" field.

func ReadAtGTE

func ReadAtGTE(v time.Time) predicate.Notification

ReadAtGTE applies the GTE predicate on the "read_at" field.

func ReadAtIn

func ReadAtIn(vs ...time.Time) predicate.Notification

ReadAtIn applies the In predicate on the "read_at" field.

func ReadAtIsNil

func ReadAtIsNil() predicate.Notification

ReadAtIsNil applies the IsNil predicate on the "read_at" field.

func ReadAtLT

func ReadAtLT(v time.Time) predicate.Notification

ReadAtLT applies the LT predicate on the "read_at" field.

func ReadAtLTE

func ReadAtLTE(v time.Time) predicate.Notification

ReadAtLTE applies the LTE predicate on the "read_at" field.

func ReadAtNEQ

func ReadAtNEQ(v time.Time) predicate.Notification

ReadAtNEQ applies the NEQ predicate on the "read_at" field.

func ReadAtNotIn

func ReadAtNotIn(vs ...time.Time) predicate.Notification

ReadAtNotIn applies the NotIn predicate on the "read_at" field.

func ReadAtNotNil

func ReadAtNotNil() predicate.Notification

ReadAtNotNil applies the NotNil predicate on the "read_at" field.

func TypeEQ

func TypeEQ(v Type) predicate.Notification

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.Notification

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

func TypeNotIn

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

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 ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Notification 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 ByReadAt

func ByReadAt(opts ...sql.OrderTermOption) OrderOption

ByReadAt orders the results by the read_at field.

func ByRelatedTweetField

func ByRelatedTweetField(field string, opts ...sql.OrderTermOption) OrderOption

ByRelatedTweetField orders the results by related_tweet field.

func ByRelatedUserField

func ByRelatedUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByRelatedUserField orders the results by related_user field.

func ByType

func ByType(opts ...sql.OrderTermOption) OrderOption

ByType orders the results by the type field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

type Type

type Type string

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

const (
	TypeLike    Type = "like"
	TypeFollow  Type = "follow"
	TypeMention Type = "mention"
	TypeRetweet Type = "retweet"
)

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