chatban

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 chatban type in the database.
	Label = "chat_ban"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldIPHash holds the string denoting the ip_hash field in the database.
	FieldIPHash = "ip_hash"
	// FieldReason holds the string denoting the reason field in the database.
	FieldReason = "reason"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeRoom holds the string denoting the room edge name in mutations.
	EdgeRoom = "room"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeBannedByUser holds the string denoting the banned_by_user edge name in mutations.
	EdgeBannedByUser = "banned_by_user"
	// Table holds the table name of the chatban in the database.
	Table = "chat_bans"
	// RoomTable is the table that holds the room relation/edge.
	RoomTable = "chat_bans"
	// RoomInverseTable is the table name for the ChatRoom entity.
	// It exists in this package in order to avoid circular dependency with the "chatroom" package.
	RoomInverseTable = "chat_rooms"
	// RoomColumn is the table column denoting the room relation/edge.
	RoomColumn = "chat_room_bans"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "chat_bans"
	// 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_chat_bans"
	// BannedByUserTable is the table that holds the banned_by_user relation/edge.
	BannedByUserTable = "chat_bans"
	// BannedByUserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	BannedByUserInverseTable = "users"
	// BannedByUserColumn is the table column denoting the banned_by_user relation/edge.
	BannedByUserColumn = "user_chat_bans_issued"
)

Variables

View Source
var (
	// IPHashValidator is a validator for the "ip_hash" field. It is called by the builders before save.
	IPHashValidator func(string) error
	// ReasonValidator is a validator for the "reason" field. It is called by the builders before save.
	ReasonValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Columns holds all SQL columns for chatban fields.

View Source
var ForeignKeys = []string{
	"chat_room_bans",
	"user_chat_bans",
	"user_chat_bans_issued",
}

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

Functions

func And

func And(predicates ...predicate.ChatBan) predicate.ChatBan

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.ChatBan

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.ChatBan

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.ChatBan

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.ChatBan

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.ChatBan

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.ChatBan

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.ChatBan

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

func CreatedAtNotIn

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

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

func HasBannedByUser

func HasBannedByUser() predicate.ChatBan

HasBannedByUser applies the HasEdge predicate on the "banned_by_user" edge.

func HasBannedByUserWith

func HasBannedByUserWith(preds ...predicate.User) predicate.ChatBan

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

func HasRoom

func HasRoom() predicate.ChatBan

HasRoom applies the HasEdge predicate on the "room" edge.

func HasRoomWith

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

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

func HasUser

func HasUser() predicate.ChatBan

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.ChatBan

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.ChatBan

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.ChatBan

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.ChatBan

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.ChatBan

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.ChatBan

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.ChatBan

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IPHash

func IPHash(v string) predicate.ChatBan

IPHash applies equality check predicate on the "ip_hash" field. It's identical to IPHashEQ.

func IPHashContains

func IPHashContains(v string) predicate.ChatBan

IPHashContains applies the Contains predicate on the "ip_hash" field.

func IPHashContainsFold

func IPHashContainsFold(v string) predicate.ChatBan

IPHashContainsFold applies the ContainsFold predicate on the "ip_hash" field.

func IPHashEQ

func IPHashEQ(v string) predicate.ChatBan

IPHashEQ applies the EQ predicate on the "ip_hash" field.

func IPHashEqualFold

func IPHashEqualFold(v string) predicate.ChatBan

IPHashEqualFold applies the EqualFold predicate on the "ip_hash" field.

func IPHashGT

func IPHashGT(v string) predicate.ChatBan

IPHashGT applies the GT predicate on the "ip_hash" field.

func IPHashGTE

func IPHashGTE(v string) predicate.ChatBan

IPHashGTE applies the GTE predicate on the "ip_hash" field.

func IPHashHasPrefix

func IPHashHasPrefix(v string) predicate.ChatBan

IPHashHasPrefix applies the HasPrefix predicate on the "ip_hash" field.

func IPHashHasSuffix

func IPHashHasSuffix(v string) predicate.ChatBan

IPHashHasSuffix applies the HasSuffix predicate on the "ip_hash" field.

func IPHashIn

func IPHashIn(vs ...string) predicate.ChatBan

IPHashIn applies the In predicate on the "ip_hash" field.

func IPHashIsNil

func IPHashIsNil() predicate.ChatBan

IPHashIsNil applies the IsNil predicate on the "ip_hash" field.

func IPHashLT

func IPHashLT(v string) predicate.ChatBan

IPHashLT applies the LT predicate on the "ip_hash" field.

func IPHashLTE

func IPHashLTE(v string) predicate.ChatBan

IPHashLTE applies the LTE predicate on the "ip_hash" field.

func IPHashNEQ

func IPHashNEQ(v string) predicate.ChatBan

IPHashNEQ applies the NEQ predicate on the "ip_hash" field.

func IPHashNotIn

func IPHashNotIn(vs ...string) predicate.ChatBan

IPHashNotIn applies the NotIn predicate on the "ip_hash" field.

func IPHashNotNil

func IPHashNotNil() predicate.ChatBan

IPHashNotNil applies the NotNil predicate on the "ip_hash" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.ChatBan) predicate.ChatBan

Or groups predicates with the OR operator between them.

func Reason

func Reason(v string) predicate.ChatBan

Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.

func ReasonContains

func ReasonContains(v string) predicate.ChatBan

ReasonContains applies the Contains predicate on the "reason" field.

func ReasonContainsFold

func ReasonContainsFold(v string) predicate.ChatBan

ReasonContainsFold applies the ContainsFold predicate on the "reason" field.

func ReasonEQ

func ReasonEQ(v string) predicate.ChatBan

ReasonEQ applies the EQ predicate on the "reason" field.

func ReasonEqualFold

func ReasonEqualFold(v string) predicate.ChatBan

ReasonEqualFold applies the EqualFold predicate on the "reason" field.

func ReasonGT

func ReasonGT(v string) predicate.ChatBan

ReasonGT applies the GT predicate on the "reason" field.

func ReasonGTE

func ReasonGTE(v string) predicate.ChatBan

ReasonGTE applies the GTE predicate on the "reason" field.

func ReasonHasPrefix

func ReasonHasPrefix(v string) predicate.ChatBan

ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.

func ReasonHasSuffix

func ReasonHasSuffix(v string) predicate.ChatBan

ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.

func ReasonIn

func ReasonIn(vs ...string) predicate.ChatBan

ReasonIn applies the In predicate on the "reason" field.

func ReasonIsNil

func ReasonIsNil() predicate.ChatBan

ReasonIsNil applies the IsNil predicate on the "reason" field.

func ReasonLT

func ReasonLT(v string) predicate.ChatBan

ReasonLT applies the LT predicate on the "reason" field.

func ReasonLTE

func ReasonLTE(v string) predicate.ChatBan

ReasonLTE applies the LTE predicate on the "reason" field.

func ReasonNEQ

func ReasonNEQ(v string) predicate.ChatBan

ReasonNEQ applies the NEQ predicate on the "reason" field.

func ReasonNotIn

func ReasonNotIn(vs ...string) predicate.ChatBan

ReasonNotIn applies the NotIn predicate on the "reason" field.

func ReasonNotNil

func ReasonNotNil() predicate.ChatBan

ReasonNotNil applies the NotNil predicate on the "reason" 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 ChatBan queries.

func ByBannedByUserField

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

ByBannedByUserField orders the results by banned_by_user field.

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 ByIPHash

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

ByIPHash orders the results by the ip_hash field.

func ByReason

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

ByReason orders the results by the reason field.

func ByRoomField

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

ByRoomField orders the results by room field.

func ByUserField

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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