chat

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the chat type in the database.
	Label = "chat"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldAgentID holds the string denoting the agent_id field in the database.
	FieldAgentID = "agent_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeCreator holds the string denoting the creator edge name in mutations.
	EdgeCreator = "creator"
	// EdgeMembers holds the string denoting the members edge name in mutations.
	EdgeMembers = "members"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// EdgeAgent holds the string denoting the agent edge name in mutations.
	EdgeAgent = "agent"
	// Table holds the table name of the chat in the database.
	Table = "chats"
	// CreatorTable is the table that holds the creator relation/edge.
	CreatorTable = "chats"
	// CreatorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CreatorInverseTable = "users"
	// CreatorColumn is the table column denoting the creator relation/edge.
	CreatorColumn = "created_by"
	// MembersTable is the table that holds the members relation/edge.
	MembersTable = "chat_members"
	// MembersInverseTable is the table name for the ChatMember entity.
	// It exists in this package in order to avoid circular dependency with the "chatmember" package.
	MembersInverseTable = "chat_members"
	// MembersColumn is the table column denoting the members relation/edge.
	MembersColumn = "chat_id"
	// 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 = "chat_id"
	// AgentTable is the table that holds the agent relation/edge.
	AgentTable = "chats"
	// AgentInverseTable is the table name for the Agent entity.
	// It exists in this package in order to avoid circular dependency with the "agent" package.
	AgentInverseTable = "agents"
	// AgentColumn is the table column denoting the agent relation/edge.
	AgentColumn = "agent_id"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for chat fields.

Functions

func AgentID

func AgentID(v uuid.UUID) predicate.Chat

AgentID applies equality check predicate on the "agent_id" field. It's identical to AgentIDEQ.

func AgentIDEQ

func AgentIDEQ(v uuid.UUID) predicate.Chat

AgentIDEQ applies the EQ predicate on the "agent_id" field.

func AgentIDIn

func AgentIDIn(vs ...uuid.UUID) predicate.Chat

AgentIDIn applies the In predicate on the "agent_id" field.

func AgentIDIsNil

func AgentIDIsNil() predicate.Chat

AgentIDIsNil applies the IsNil predicate on the "agent_id" field.

func AgentIDNEQ

func AgentIDNEQ(v uuid.UUID) predicate.Chat

AgentIDNEQ applies the NEQ predicate on the "agent_id" field.

func AgentIDNotIn

func AgentIDNotIn(vs ...uuid.UUID) predicate.Chat

AgentIDNotIn applies the NotIn predicate on the "agent_id" field.

func AgentIDNotNil

func AgentIDNotNil() predicate.Chat

AgentIDNotNil applies the NotNil predicate on the "agent_id" field.

func And

func And(predicates ...predicate.Chat) predicate.Chat

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Chat

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Chat

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Chat

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Chat

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Chat

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Chat

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Chat

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v uuid.UUID) predicate.Chat

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

func CreatedByEQ

func CreatedByEQ(v uuid.UUID) predicate.Chat

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

func CreatedByIn

func CreatedByIn(vs ...uuid.UUID) predicate.Chat

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

func CreatedByNEQ

func CreatedByNEQ(v uuid.UUID) predicate.Chat

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

func CreatedByNotIn

func CreatedByNotIn(vs ...uuid.UUID) predicate.Chat

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

func HasAgent

func HasAgent() predicate.Chat

HasAgent applies the HasEdge predicate on the "agent" edge.

func HasAgentWith

func HasAgentWith(preds ...predicate.Agent) predicate.Chat

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

func HasCreator

func HasCreator() predicate.Chat

HasCreator applies the HasEdge predicate on the "creator" edge.

func HasCreatorWith

func HasCreatorWith(preds ...predicate.User) predicate.Chat

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

func HasMembers

func HasMembers() predicate.Chat

HasMembers applies the HasEdge predicate on the "members" edge.

func HasMembersWith

func HasMembersWith(preds ...predicate.ChatMember) predicate.Chat

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

func HasMessages

func HasMessages() predicate.Chat

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

func HasMessagesWith

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

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

func ID

func ID(id uuid.UUID) predicate.Chat

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Chat

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Chat

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Chat

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Chat

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Chat

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Chat

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Chat

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

func NameContains

func NameContains(v string) predicate.Chat

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

func NameContainsFold

func NameContainsFold(v string) predicate.Chat

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

func NameEQ

func NameEQ(v string) predicate.Chat

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

func NameEqualFold

func NameEqualFold(v string) predicate.Chat

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

func NameGT

func NameGT(v string) predicate.Chat

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

func NameGTE

func NameGTE(v string) predicate.Chat

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Chat

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Chat

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

func NameIn

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

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

func NameIsNil

func NameIsNil() predicate.Chat

NameIsNil applies the IsNil predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Chat

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

func NameLTE

func NameLTE(v string) predicate.Chat

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

func NameNEQ

func NameNEQ(v string) predicate.Chat

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

func NameNotIn

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

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

func NameNotNil

func NameNotNil() predicate.Chat

NameNotNil applies the NotNil predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Chat) predicate.Chat

Or groups predicates with the OR operator between them.

func TypeEQ

func TypeEQ(v Type) predicate.Chat

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.Chat

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

func TypeNotIn

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

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 Chat queries.

func ByAgentField

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

ByAgentField orders the results by agent field.

func ByAgentID

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

ByAgentID orders the results by the agent_id field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByCreatorField

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

ByCreatorField orders the results by creator field.

func ByID

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

ByID orders the results by the id field.

func ByMembers

func ByMembers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMembers orders the results by members terms.

func ByMembersCount

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

ByMembersCount orders the results by members count.

func ByMessages

func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMessages orders the results by messages terms.

func ByMessagesCount

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

ByMessagesCount orders the results by messages count.

func ByName

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

ByName orders the results by the name field.

func ByType

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

ByType orders the results by the type field.

type Type

type Type string

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

const (
	TypePrivate Type = "private"
	TypeGroup   Type = "group"
)

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