chatroom

package
v0.0.0-...-9d82fa0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the chatroom type in the database.
	Label = "chat_room"
	// 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"
	// FieldIsPublic holds the string denoting the is_public field in the database.
	FieldIsPublic = "is_public"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// EdgeBans holds the string denoting the bans edge name in mutations.
	EdgeBans = "bans"
	// Table holds the table name of the chatroom in the database.
	Table = "chat_rooms"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "chat_rooms"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_owned_chat_rooms"
	// MessagesTable is the table that holds the messages relation/edge.
	MessagesTable = "chat_messages"
	// MessagesInverseTable is the table name for the ChatMessage entity.
	// It exists in this package in order to avoid circular dependency with the "chatmessage" package.
	MessagesInverseTable = "chat_messages"
	// MessagesColumn is the table column denoting the messages relation/edge.
	MessagesColumn = "chat_room_messages"
	// BansTable is the table that holds the bans relation/edge.
	BansTable = "chat_bans"
	// BansInverseTable is the table name for the ChatBan entity.
	// It exists in this package in order to avoid circular dependency with the "chatban" package.
	BansInverseTable = "chat_bans"
	// BansColumn is the table column denoting the bans relation/edge.
	BansColumn = "chat_room_bans"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultIsPublic holds the default value on creation for the "is_public" field.
	DefaultIsPublic bool
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Columns holds all SQL columns for chatroom fields.

View Source
var ForeignKeys = []string{
	"user_owned_chat_rooms",
}

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

Functions

func And

func And(predicates ...predicate.ChatRoom) predicate.ChatRoom

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.ChatRoom

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.ChatRoom

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.ChatRoom

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.ChatRoom

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.ChatRoom

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.ChatRoom

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.ChatRoom

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

func CreatedAtNotIn

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

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

func HasBans

func HasBans() predicate.ChatRoom

HasBans applies the HasEdge predicate on the "bans" edge.

func HasBansWith

func HasBansWith(preds ...predicate.ChatBan) predicate.ChatRoom

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

func HasMessages

func HasMessages() predicate.ChatRoom

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

func HasMessagesWith

func HasMessagesWith(preds ...predicate.ChatMessage) predicate.ChatRoom

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

func HasOwner

func HasOwner() predicate.ChatRoom

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.ChatRoom

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

func ID

func ID(id int) predicate.ChatRoom

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.ChatRoom

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.ChatRoom

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.ChatRoom

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.ChatRoom

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.ChatRoom

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.ChatRoom

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsPublic

func IsPublic(v bool) predicate.ChatRoom

IsPublic applies equality check predicate on the "is_public" field. It's identical to IsPublicEQ.

func IsPublicEQ

func IsPublicEQ(v bool) predicate.ChatRoom

IsPublicEQ applies the EQ predicate on the "is_public" field.

func IsPublicNEQ

func IsPublicNEQ(v bool) predicate.ChatRoom

IsPublicNEQ applies the NEQ predicate on the "is_public" field.

func Name

func Name(v string) predicate.ChatRoom

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

func NameContains

func NameContains(v string) predicate.ChatRoom

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

func NameContainsFold

func NameContainsFold(v string) predicate.ChatRoom

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

func NameEQ

func NameEQ(v string) predicate.ChatRoom

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

func NameEqualFold

func NameEqualFold(v string) predicate.ChatRoom

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

func NameGT

func NameGT(v string) predicate.ChatRoom

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

func NameGTE

func NameGTE(v string) predicate.ChatRoom

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.ChatRoom

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.ChatRoom

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.ChatRoom

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

func NameLTE

func NameLTE(v string) predicate.ChatRoom

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

func NameNEQ

func NameNEQ(v string) predicate.ChatRoom

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

func NameNotIn

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

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.ChatRoom) predicate.ChatRoom

Or groups predicates with the OR operator between them.

func PasswordHash

func PasswordHash(v string) predicate.ChatRoom

PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.

func PasswordHashContains

func PasswordHashContains(v string) predicate.ChatRoom

PasswordHashContains applies the Contains predicate on the "password_hash" field.

func PasswordHashContainsFold

func PasswordHashContainsFold(v string) predicate.ChatRoom

PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.

func PasswordHashEQ

func PasswordHashEQ(v string) predicate.ChatRoom

PasswordHashEQ applies the EQ predicate on the "password_hash" field.

func PasswordHashEqualFold

func PasswordHashEqualFold(v string) predicate.ChatRoom

PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.

func PasswordHashGT

func PasswordHashGT(v string) predicate.ChatRoom

PasswordHashGT applies the GT predicate on the "password_hash" field.

func PasswordHashGTE

func PasswordHashGTE(v string) predicate.ChatRoom

PasswordHashGTE applies the GTE predicate on the "password_hash" field.

func PasswordHashHasPrefix

func PasswordHashHasPrefix(v string) predicate.ChatRoom

PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.

func PasswordHashHasSuffix

func PasswordHashHasSuffix(v string) predicate.ChatRoom

PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.

func PasswordHashIn

func PasswordHashIn(vs ...string) predicate.ChatRoom

PasswordHashIn applies the In predicate on the "password_hash" field.

func PasswordHashIsNil

func PasswordHashIsNil() predicate.ChatRoom

PasswordHashIsNil applies the IsNil predicate on the "password_hash" field.

func PasswordHashLT

func PasswordHashLT(v string) predicate.ChatRoom

PasswordHashLT applies the LT predicate on the "password_hash" field.

func PasswordHashLTE

func PasswordHashLTE(v string) predicate.ChatRoom

PasswordHashLTE applies the LTE predicate on the "password_hash" field.

func PasswordHashNEQ

func PasswordHashNEQ(v string) predicate.ChatRoom

PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.

func PasswordHashNotIn

func PasswordHashNotIn(vs ...string) predicate.ChatRoom

PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.

func PasswordHashNotNil

func PasswordHashNotNil() predicate.ChatRoom

PasswordHashNotNil applies the NotNil predicate on the "password_hash" field.

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

func ByBans

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

ByBans orders the results by bans terms.

func ByBansCount

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

ByBansCount orders the results by bans count.

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 ByIsPublic

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

ByIsPublic orders the results by the is_public field.

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 ByOwnerField

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

ByOwnerField orders the results by owner field.

func ByPasswordHash

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

ByPasswordHash orders the results by the password_hash field.

Jump to

Keyboard shortcuts

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