msgtype

package
v0.0.0-...-ce64a08 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the msgtype type in the database.
	Label = "msg_type"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldAppID holds the string denoting the app_id field in the database.
	FieldAppID = "app_id"
	// FieldCategory holds the string denoting the category field in the database.
	FieldCategory = "category"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldComments holds the string denoting the comments field in the database.
	FieldComments = "comments"
	// FieldCanSubs holds the string denoting the can_subs field in the database.
	FieldCanSubs = "can_subs"
	// FieldCanCustom holds the string denoting the can_custom field in the database.
	FieldCanCustom = "can_custom"
	// EdgeEvents holds the string denoting the events edge name in mutations.
	EdgeEvents = "events"
	// EdgeSubscribers holds the string denoting the subscribers edge name in mutations.
	EdgeSubscribers = "subscribers"
	// Table holds the table name of the msgtype in the database.
	Table = "msg_type"
	// EventsTable is the table that holds the events relation/edge.
	EventsTable = "msg_event"
	// EventsInverseTable is the table name for the MsgEvent entity.
	// It exists in this package in order to avoid circular dependency with the "msgevent" package.
	EventsInverseTable = "msg_event"
	// EventsColumn is the table column denoting the events relation/edge.
	EventsColumn = "msg_type_id"
	// SubscribersTable is the table that holds the subscribers relation/edge.
	SubscribersTable = "msg_subscriber"
	// SubscribersInverseTable is the table name for the MsgSubscriber entity.
	// It exists in this package in order to avoid circular dependency with the "msgsubscriber" package.
	SubscribersInverseTable = "msg_subscriber"
	// SubscribersColumn is the table column denoting the subscribers relation/edge.
	SubscribersColumn = "msg_type_id"
)
View Source
const DefaultStatus typex.SimpleStatus = "active"

Variables

View Source
var (
	Hooks [3]ent.Hook
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// CategoryValidator is a validator for the "category" field. It is called by the builders before save.
	CategoryValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultCanSubs holds the default value on creation for the "can_subs" field.
	DefaultCanSubs bool
	// DefaultCanCustom holds the default value on creation for the "can_custom" field.
	DefaultCanCustom bool
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/woocoos/msgcenter/ent/runtime"

Columns holds all SQL columns for msgtype fields.

Functions

func And

func And(predicates ...predicate.MsgType) predicate.MsgType

And groups predicates with the AND operator between them.

func AppID

func AppID(v int) predicate.MsgType

AppID applies equality check predicate on the "app_id" field. It's identical to AppIDEQ.

func AppIDEQ

func AppIDEQ(v int) predicate.MsgType

AppIDEQ applies the EQ predicate on the "app_id" field.

func AppIDGT

func AppIDGT(v int) predicate.MsgType

AppIDGT applies the GT predicate on the "app_id" field.

func AppIDGTE

func AppIDGTE(v int) predicate.MsgType

AppIDGTE applies the GTE predicate on the "app_id" field.

func AppIDIn

func AppIDIn(vs ...int) predicate.MsgType

AppIDIn applies the In predicate on the "app_id" field.

func AppIDIsNil

func AppIDIsNil() predicate.MsgType

AppIDIsNil applies the IsNil predicate on the "app_id" field.

func AppIDLT

func AppIDLT(v int) predicate.MsgType

AppIDLT applies the LT predicate on the "app_id" field.

func AppIDLTE

func AppIDLTE(v int) predicate.MsgType

AppIDLTE applies the LTE predicate on the "app_id" field.

func AppIDNEQ

func AppIDNEQ(v int) predicate.MsgType

AppIDNEQ applies the NEQ predicate on the "app_id" field.

func AppIDNotIn

func AppIDNotIn(vs ...int) predicate.MsgType

AppIDNotIn applies the NotIn predicate on the "app_id" field.

func AppIDNotNil

func AppIDNotNil() predicate.MsgType

AppIDNotNil applies the NotNil predicate on the "app_id" field.

func CanCustom

func CanCustom(v bool) predicate.MsgType

CanCustom applies equality check predicate on the "can_custom" field. It's identical to CanCustomEQ.

func CanCustomEQ

func CanCustomEQ(v bool) predicate.MsgType

CanCustomEQ applies the EQ predicate on the "can_custom" field.

func CanCustomIsNil

func CanCustomIsNil() predicate.MsgType

CanCustomIsNil applies the IsNil predicate on the "can_custom" field.

func CanCustomNEQ

func CanCustomNEQ(v bool) predicate.MsgType

CanCustomNEQ applies the NEQ predicate on the "can_custom" field.

func CanCustomNotNil

func CanCustomNotNil() predicate.MsgType

CanCustomNotNil applies the NotNil predicate on the "can_custom" field.

func CanSubs

func CanSubs(v bool) predicate.MsgType

CanSubs applies equality check predicate on the "can_subs" field. It's identical to CanSubsEQ.

func CanSubsEQ

func CanSubsEQ(v bool) predicate.MsgType

CanSubsEQ applies the EQ predicate on the "can_subs" field.

func CanSubsIsNil

func CanSubsIsNil() predicate.MsgType

CanSubsIsNil applies the IsNil predicate on the "can_subs" field.

func CanSubsNEQ

func CanSubsNEQ(v bool) predicate.MsgType

CanSubsNEQ applies the NEQ predicate on the "can_subs" field.

func CanSubsNotNil

func CanSubsNotNil() predicate.MsgType

CanSubsNotNil applies the NotNil predicate on the "can_subs" field.

func Category

func Category(v string) predicate.MsgType

Category applies equality check predicate on the "category" field. It's identical to CategoryEQ.

func CategoryContains

func CategoryContains(v string) predicate.MsgType

CategoryContains applies the Contains predicate on the "category" field.

func CategoryContainsFold

func CategoryContainsFold(v string) predicate.MsgType

CategoryContainsFold applies the ContainsFold predicate on the "category" field.

func CategoryEQ

func CategoryEQ(v string) predicate.MsgType

CategoryEQ applies the EQ predicate on the "category" field.

func CategoryEqualFold

func CategoryEqualFold(v string) predicate.MsgType

CategoryEqualFold applies the EqualFold predicate on the "category" field.

func CategoryGT

func CategoryGT(v string) predicate.MsgType

CategoryGT applies the GT predicate on the "category" field.

func CategoryGTE

func CategoryGTE(v string) predicate.MsgType

CategoryGTE applies the GTE predicate on the "category" field.

func CategoryHasPrefix

func CategoryHasPrefix(v string) predicate.MsgType

CategoryHasPrefix applies the HasPrefix predicate on the "category" field.

func CategoryHasSuffix

func CategoryHasSuffix(v string) predicate.MsgType

CategoryHasSuffix applies the HasSuffix predicate on the "category" field.

func CategoryIn

func CategoryIn(vs ...string) predicate.MsgType

CategoryIn applies the In predicate on the "category" field.

func CategoryLT

func CategoryLT(v string) predicate.MsgType

CategoryLT applies the LT predicate on the "category" field.

func CategoryLTE

func CategoryLTE(v string) predicate.MsgType

CategoryLTE applies the LTE predicate on the "category" field.

func CategoryNEQ

func CategoryNEQ(v string) predicate.MsgType

CategoryNEQ applies the NEQ predicate on the "category" field.

func CategoryNotIn

func CategoryNotIn(vs ...string) predicate.MsgType

CategoryNotIn applies the NotIn predicate on the "category" field.

func Comments

func Comments(v string) predicate.MsgType

Comments applies equality check predicate on the "comments" field. It's identical to CommentsEQ.

func CommentsContains

func CommentsContains(v string) predicate.MsgType

CommentsContains applies the Contains predicate on the "comments" field.

func CommentsContainsFold

func CommentsContainsFold(v string) predicate.MsgType

CommentsContainsFold applies the ContainsFold predicate on the "comments" field.

func CommentsEQ

func CommentsEQ(v string) predicate.MsgType

CommentsEQ applies the EQ predicate on the "comments" field.

func CommentsEqualFold

func CommentsEqualFold(v string) predicate.MsgType

CommentsEqualFold applies the EqualFold predicate on the "comments" field.

func CommentsGT

func CommentsGT(v string) predicate.MsgType

CommentsGT applies the GT predicate on the "comments" field.

func CommentsGTE

func CommentsGTE(v string) predicate.MsgType

CommentsGTE applies the GTE predicate on the "comments" field.

func CommentsHasPrefix

func CommentsHasPrefix(v string) predicate.MsgType

CommentsHasPrefix applies the HasPrefix predicate on the "comments" field.

func CommentsHasSuffix

func CommentsHasSuffix(v string) predicate.MsgType

CommentsHasSuffix applies the HasSuffix predicate on the "comments" field.

func CommentsIn

func CommentsIn(vs ...string) predicate.MsgType

CommentsIn applies the In predicate on the "comments" field.

func CommentsIsNil

func CommentsIsNil() predicate.MsgType

CommentsIsNil applies the IsNil predicate on the "comments" field.

func CommentsLT

func CommentsLT(v string) predicate.MsgType

CommentsLT applies the LT predicate on the "comments" field.

func CommentsLTE

func CommentsLTE(v string) predicate.MsgType

CommentsLTE applies the LTE predicate on the "comments" field.

func CommentsNEQ

func CommentsNEQ(v string) predicate.MsgType

CommentsNEQ applies the NEQ predicate on the "comments" field.

func CommentsNotIn

func CommentsNotIn(vs ...string) predicate.MsgType

CommentsNotIn applies the NotIn predicate on the "comments" field.

func CommentsNotNil

func CommentsNotNil() predicate.MsgType

CommentsNotNil applies the NotNil predicate on the "comments" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.MsgType

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.MsgType

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.MsgType

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.MsgType

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.MsgType

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.MsgType

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.MsgType

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v int) predicate.MsgType

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

func CreatedByEQ

func CreatedByEQ(v int) predicate.MsgType

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

func CreatedByGT

func CreatedByGT(v int) predicate.MsgType

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int) predicate.MsgType

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int) predicate.MsgType

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

func CreatedByLT

func CreatedByLT(v int) predicate.MsgType

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int) predicate.MsgType

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int) predicate.MsgType

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

func CreatedByNotIn

func CreatedByNotIn(vs ...int) predicate.MsgType

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

func HasEvents

func HasEvents() predicate.MsgType

HasEvents applies the HasEdge predicate on the "events" edge.

func HasEventsWith

func HasEventsWith(preds ...predicate.MsgEvent) predicate.MsgType

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

func HasSubscribers

func HasSubscribers() predicate.MsgType

HasSubscribers applies the HasEdge predicate on the "subscribers" edge.

func HasSubscribersWith

func HasSubscribersWith(preds ...predicate.MsgSubscriber) predicate.MsgType

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

func ID

func ID(id int) predicate.MsgType

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.MsgType

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.MsgType

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.MsgType

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.MsgType

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.MsgType

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.MsgType

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.MsgType

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

func NameContains

func NameContains(v string) predicate.MsgType

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

func NameContainsFold

func NameContainsFold(v string) predicate.MsgType

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

func NameEQ

func NameEQ(v string) predicate.MsgType

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

func NameEqualFold

func NameEqualFold(v string) predicate.MsgType

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

func NameGT

func NameGT(v string) predicate.MsgType

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

func NameGTE

func NameGTE(v string) predicate.MsgType

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.MsgType

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.MsgType

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.MsgType

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

func NameLTE

func NameLTE(v string) predicate.MsgType

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

func NameNEQ

func NameNEQ(v string) predicate.MsgType

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v typex.SimpleStatus) predicate.MsgType

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...typex.SimpleStatus) predicate.MsgType

StatusIn applies the In predicate on the "status" field.

func StatusIsNil

func StatusIsNil() predicate.MsgType

StatusIsNil applies the IsNil predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v typex.SimpleStatus) predicate.MsgType

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...typex.SimpleStatus) predicate.MsgType

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusNotNil

func StatusNotNil() predicate.MsgType

StatusNotNil applies the NotNil predicate on the "status" field.

func StatusValidator

func StatusValidator(s typex.SimpleStatus) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.MsgType

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.MsgType

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.MsgType

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.MsgType

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

func UpdatedAtIn

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

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

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.MsgType

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.MsgType

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.MsgType

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.MsgType

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

func UpdatedAtNotIn

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

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

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.MsgType

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

func UpdatedBy

func UpdatedBy(v int) predicate.MsgType

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int) predicate.MsgType

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int) predicate.MsgType

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int) predicate.MsgType

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int) predicate.MsgType

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.MsgType

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int) predicate.MsgType

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int) predicate.MsgType

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int) predicate.MsgType

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int) predicate.MsgType

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.MsgType

UpdatedByNotNil applies the NotNil predicate on the "updated_by" 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 MsgType queries.

func ByAppID

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

ByAppID orders the results by the app_id field.

func ByCanCustom

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

ByCanCustom orders the results by the can_custom field.

func ByCanSubs

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

ByCanSubs orders the results by the can_subs field.

func ByCategory

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

ByCategory orders the results by the category field.

func ByComments

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

ByComments orders the results by the comments 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 ByEvents

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

ByEvents orders the results by events terms.

func ByEventsCount

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

ByEventsCount orders the results by events count.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByStatus

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

ByStatus orders the results by the status field.

func BySubscribers

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

BySubscribers orders the results by subscribers terms.

func BySubscribersCount

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

BySubscribersCount orders the results by subscribers count.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

Jump to

Keyboard shortcuts

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