user

package
v0.0.0-...-d2e3589 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// 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"
	// FieldState holds the string denoting the state field in the database.
	FieldState = "state"
	// FieldStateAt holds the string denoting the state_at field in the database.
	FieldStateAt = "state_at"
	// FieldLastSeen holds the string denoting the last_seen field in the database.
	FieldLastSeen = "last_seen"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// EdgeRecipientMessages holds the string denoting the recipient_messages edge name in mutations.
	EdgeRecipientMessages = "recipient_messages"
	// EdgeDevices holds the string denoting the devices edge name in mutations.
	EdgeDevices = "devices"
	// EdgeChannels holds the string denoting the channels edge name in mutations.
	EdgeChannels = "channels"
	// EdgeRecipients holds the string denoting the recipients edge name in mutations.
	EdgeRecipients = "recipients"
	// EdgeSubscriptions holds the string denoting the subscriptions edge name in mutations.
	EdgeSubscriptions = "subscriptions"
	// Table holds the table name of the user in the database.
	Table = "users"
	// MessagesTable is the table that holds the messages relation/edge.
	MessagesTable = "messages"
	// MessagesInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	MessagesInverseTable = "messages"
	// MessagesColumn is the table column denoting the messages relation/edge.
	MessagesColumn = "user_messages"
	// RecipientMessagesTable is the table that holds the recipient_messages relation/edge. The primary key declared below.
	RecipientMessagesTable = "recipients"
	// RecipientMessagesInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	RecipientMessagesInverseTable = "messages"
	// DevicesTable is the table that holds the devices relation/edge.
	DevicesTable = "devices"
	// DevicesInverseTable is the table name for the Device entity.
	// It exists in this package in order to avoid circular dependency with the "device" package.
	DevicesInverseTable = "devices"
	// DevicesColumn is the table column denoting the devices relation/edge.
	DevicesColumn = "user_devices"
	// ChannelsTable is the table that holds the channels relation/edge. The primary key declared below.
	ChannelsTable = "subscriptions"
	// ChannelsInverseTable is the table name for the Channel entity.
	// It exists in this package in order to avoid circular dependency with the "channel" package.
	ChannelsInverseTable = "channels"
	// RecipientsTable is the table that holds the recipients relation/edge.
	RecipientsTable = "recipients"
	// RecipientsInverseTable is the table name for the Recipient entity.
	// It exists in this package in order to avoid circular dependency with the "recipient" package.
	RecipientsInverseTable = "recipients"
	// RecipientsColumn is the table column denoting the recipients relation/edge.
	RecipientsColumn = "user_id"
	// SubscriptionsTable is the table that holds the subscriptions relation/edge.
	SubscriptionsTable = "subscriptions"
	// SubscriptionsInverseTable is the table name for the Subscription entity.
	// It exists in this package in order to avoid circular dependency with the "subscription" package.
	SubscriptionsInverseTable = "subscriptions"
	// SubscriptionsColumn is the table column denoting the subscriptions relation/edge.
	SubscriptionsColumn = "user_id"
)

Variables

View Source
var (
	// RecipientMessagesPrimaryKey and RecipientMessagesColumn2 are the table columns denoting the
	// primary key for the recipient_messages relation (M2M).
	RecipientMessagesPrimaryKey = []string{"user_id", "message_id"}
	// ChannelsPrimaryKey and ChannelsColumn2 are the table columns denoting the
	// primary key for the channels relation (M2M).
	ChannelsPrimaryKey = []string{"user_id", "channel_id"}
)
View Source
var (
	// 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 time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
)

Columns holds all SQL columns for user fields.

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

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

func CreatedAtNotIn

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

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

func HasChannels

func HasChannels() predicate.User

HasChannels applies the HasEdge predicate on the "channels" edge.

func HasChannelsWith

func HasChannelsWith(preds ...predicate.Channel) predicate.User

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

func HasDevices

func HasDevices() predicate.User

HasDevices applies the HasEdge predicate on the "devices" edge.

func HasDevicesWith

func HasDevicesWith(preds ...predicate.Device) predicate.User

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

func HasMessages

func HasMessages() predicate.User

HasMessages applies the HasEdge predicate on the "messages" edge.

func HasMessagesWith

func HasMessagesWith(preds ...predicate.Message) predicate.User

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

func HasRecipientMessages

func HasRecipientMessages() predicate.User

HasRecipientMessages applies the HasEdge predicate on the "recipient_messages" edge.

func HasRecipientMessagesWith

func HasRecipientMessagesWith(preds ...predicate.Message) predicate.User

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

func HasRecipients

func HasRecipients() predicate.User

HasRecipients applies the HasEdge predicate on the "recipients" edge.

func HasRecipientsWith

func HasRecipientsWith(preds ...predicate.Recipient) predicate.User

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

func HasSubscriptions

func HasSubscriptions() predicate.User

HasSubscriptions applies the HasEdge predicate on the "subscriptions" edge.

func HasSubscriptionsWith

func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.User

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

func ID

func ID(id uuid.UUID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func LastSeen

func LastSeen(v time.Time) predicate.User

LastSeen applies equality check predicate on the "last_seen" field. It's identical to LastSeenEQ.

func LastSeenEQ

func LastSeenEQ(v time.Time) predicate.User

LastSeenEQ applies the EQ predicate on the "last_seen" field.

func LastSeenGT

func LastSeenGT(v time.Time) predicate.User

LastSeenGT applies the GT predicate on the "last_seen" field.

func LastSeenGTE

func LastSeenGTE(v time.Time) predicate.User

LastSeenGTE applies the GTE predicate on the "last_seen" field.

func LastSeenIn

func LastSeenIn(vs ...time.Time) predicate.User

LastSeenIn applies the In predicate on the "last_seen" field.

func LastSeenIsNil

func LastSeenIsNil() predicate.User

LastSeenIsNil applies the IsNil predicate on the "last_seen" field.

func LastSeenLT

func LastSeenLT(v time.Time) predicate.User

LastSeenLT applies the LT predicate on the "last_seen" field.

func LastSeenLTE

func LastSeenLTE(v time.Time) predicate.User

LastSeenLTE applies the LTE predicate on the "last_seen" field.

func LastSeenNEQ

func LastSeenNEQ(v time.Time) predicate.User

LastSeenNEQ applies the NEQ predicate on the "last_seen" field.

func LastSeenNotIn

func LastSeenNotIn(vs ...time.Time) predicate.User

LastSeenNotIn applies the NotIn predicate on the "last_seen" field.

func LastSeenNotNil

func LastSeenNotNil() predicate.User

LastSeenNotNil applies the NotNil predicate on the "last_seen" field.

func Name

func Name(v string) predicate.User

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.User

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.User

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.User

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.User

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.User

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.User

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.User

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.User

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.User

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.User

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.User

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func State

func State(v string) predicate.User

State applies equality check predicate on the "state" field. It's identical to StateEQ.

func StateAt

func StateAt(v time.Time) predicate.User

StateAt applies equality check predicate on the "state_at" field. It's identical to StateAtEQ.

func StateAtEQ

func StateAtEQ(v time.Time) predicate.User

StateAtEQ applies the EQ predicate on the "state_at" field.

func StateAtGT

func StateAtGT(v time.Time) predicate.User

StateAtGT applies the GT predicate on the "state_at" field.

func StateAtGTE

func StateAtGTE(v time.Time) predicate.User

StateAtGTE applies the GTE predicate on the "state_at" field.

func StateAtIn

func StateAtIn(vs ...time.Time) predicate.User

StateAtIn applies the In predicate on the "state_at" field.

func StateAtLT

func StateAtLT(v time.Time) predicate.User

StateAtLT applies the LT predicate on the "state_at" field.

func StateAtLTE

func StateAtLTE(v time.Time) predicate.User

StateAtLTE applies the LTE predicate on the "state_at" field.

func StateAtNEQ

func StateAtNEQ(v time.Time) predicate.User

StateAtNEQ applies the NEQ predicate on the "state_at" field.

func StateAtNotIn

func StateAtNotIn(vs ...time.Time) predicate.User

StateAtNotIn applies the NotIn predicate on the "state_at" field.

func StateContains

func StateContains(v string) predicate.User

StateContains applies the Contains predicate on the "state" field.

func StateContainsFold

func StateContainsFold(v string) predicate.User

StateContainsFold applies the ContainsFold predicate on the "state" field.

func StateEQ

func StateEQ(v string) predicate.User

StateEQ applies the EQ predicate on the "state" field.

func StateEqualFold

func StateEqualFold(v string) predicate.User

StateEqualFold applies the EqualFold predicate on the "state" field.

func StateGT

func StateGT(v string) predicate.User

StateGT applies the GT predicate on the "state" field.

func StateGTE

func StateGTE(v string) predicate.User

StateGTE applies the GTE predicate on the "state" field.

func StateHasPrefix

func StateHasPrefix(v string) predicate.User

StateHasPrefix applies the HasPrefix predicate on the "state" field.

func StateHasSuffix

func StateHasSuffix(v string) predicate.User

StateHasSuffix applies the HasSuffix predicate on the "state" field.

func StateIn

func StateIn(vs ...string) predicate.User

StateIn applies the In predicate on the "state" field.

func StateLT

func StateLT(v string) predicate.User

StateLT applies the LT predicate on the "state" field.

func StateLTE

func StateLTE(v string) predicate.User

StateLTE applies the LTE predicate on the "state" field.

func StateNEQ

func StateNEQ(v string) predicate.User

StateNEQ applies the NEQ predicate on the "state" field.

func StateNotIn

func StateNotIn(vs ...string) predicate.User

StateNotIn applies the NotIn predicate on the "state" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

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

func UpdatedAtNotIn

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

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

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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