Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.MsgType) predicate.MsgType
- func AppID(v int) predicate.MsgType
- func AppIDEQ(v int) predicate.MsgType
- func AppIDGT(v int) predicate.MsgType
- func AppIDGTE(v int) predicate.MsgType
- func AppIDIn(vs ...int) predicate.MsgType
- func AppIDIsNil() predicate.MsgType
- func AppIDLT(v int) predicate.MsgType
- func AppIDLTE(v int) predicate.MsgType
- func AppIDNEQ(v int) predicate.MsgType
- func AppIDNotIn(vs ...int) predicate.MsgType
- func AppIDNotNil() predicate.MsgType
- func CanCustom(v bool) predicate.MsgType
- func CanCustomEQ(v bool) predicate.MsgType
- func CanCustomIsNil() predicate.MsgType
- func CanCustomNEQ(v bool) predicate.MsgType
- func CanCustomNotNil() predicate.MsgType
- func CanSubs(v bool) predicate.MsgType
- func CanSubsEQ(v bool) predicate.MsgType
- func CanSubsIsNil() predicate.MsgType
- func CanSubsNEQ(v bool) predicate.MsgType
- func CanSubsNotNil() predicate.MsgType
- func Category(v string) predicate.MsgType
- func CategoryContains(v string) predicate.MsgType
- func CategoryContainsFold(v string) predicate.MsgType
- func CategoryEQ(v string) predicate.MsgType
- func CategoryEqualFold(v string) predicate.MsgType
- func CategoryGT(v string) predicate.MsgType
- func CategoryGTE(v string) predicate.MsgType
- func CategoryHasPrefix(v string) predicate.MsgType
- func CategoryHasSuffix(v string) predicate.MsgType
- func CategoryIn(vs ...string) predicate.MsgType
- func CategoryLT(v string) predicate.MsgType
- func CategoryLTE(v string) predicate.MsgType
- func CategoryNEQ(v string) predicate.MsgType
- func CategoryNotIn(vs ...string) predicate.MsgType
- func Comments(v string) predicate.MsgType
- func CommentsContains(v string) predicate.MsgType
- func CommentsContainsFold(v string) predicate.MsgType
- func CommentsEQ(v string) predicate.MsgType
- func CommentsEqualFold(v string) predicate.MsgType
- func CommentsGT(v string) predicate.MsgType
- func CommentsGTE(v string) predicate.MsgType
- func CommentsHasPrefix(v string) predicate.MsgType
- func CommentsHasSuffix(v string) predicate.MsgType
- func CommentsIn(vs ...string) predicate.MsgType
- func CommentsIsNil() predicate.MsgType
- func CommentsLT(v string) predicate.MsgType
- func CommentsLTE(v string) predicate.MsgType
- func CommentsNEQ(v string) predicate.MsgType
- func CommentsNotIn(vs ...string) predicate.MsgType
- func CommentsNotNil() predicate.MsgType
- func CreatedAt(v time.Time) predicate.MsgType
- func CreatedAtEQ(v time.Time) predicate.MsgType
- func CreatedAtGT(v time.Time) predicate.MsgType
- func CreatedAtGTE(v time.Time) predicate.MsgType
- func CreatedAtIn(vs ...time.Time) predicate.MsgType
- func CreatedAtLT(v time.Time) predicate.MsgType
- func CreatedAtLTE(v time.Time) predicate.MsgType
- func CreatedAtNEQ(v time.Time) predicate.MsgType
- func CreatedAtNotIn(vs ...time.Time) predicate.MsgType
- func CreatedBy(v int) predicate.MsgType
- func CreatedByEQ(v int) predicate.MsgType
- func CreatedByGT(v int) predicate.MsgType
- func CreatedByGTE(v int) predicate.MsgType
- func CreatedByIn(vs ...int) predicate.MsgType
- func CreatedByLT(v int) predicate.MsgType
- func CreatedByLTE(v int) predicate.MsgType
- func CreatedByNEQ(v int) predicate.MsgType
- func CreatedByNotIn(vs ...int) predicate.MsgType
- func HasEvents() predicate.MsgType
- func HasEventsWith(preds ...predicate.MsgEvent) predicate.MsgType
- func HasSubscribers() predicate.MsgType
- func HasSubscribersWith(preds ...predicate.MsgSubscriber) predicate.MsgType
- func ID(id int) predicate.MsgType
- func IDEQ(id int) predicate.MsgType
- func IDGT(id int) predicate.MsgType
- func IDGTE(id int) predicate.MsgType
- func IDIn(ids ...int) predicate.MsgType
- func IDLT(id int) predicate.MsgType
- func IDLTE(id int) predicate.MsgType
- func IDNEQ(id int) predicate.MsgType
- func IDNotIn(ids ...int) predicate.MsgType
- func Name(v string) predicate.MsgType
- func NameContains(v string) predicate.MsgType
- func NameContainsFold(v string) predicate.MsgType
- func NameEQ(v string) predicate.MsgType
- func NameEqualFold(v string) predicate.MsgType
- func NameGT(v string) predicate.MsgType
- func NameGTE(v string) predicate.MsgType
- func NameHasPrefix(v string) predicate.MsgType
- func NameHasSuffix(v string) predicate.MsgType
- func NameIn(vs ...string) predicate.MsgType
- func NameLT(v string) predicate.MsgType
- func NameLTE(v string) predicate.MsgType
- func NameNEQ(v string) predicate.MsgType
- func NameNotIn(vs ...string) predicate.MsgType
- func Not(p predicate.MsgType) predicate.MsgType
- func Or(predicates ...predicate.MsgType) predicate.MsgType
- func StatusEQ(v typex.SimpleStatus) predicate.MsgType
- func StatusIn(vs ...typex.SimpleStatus) predicate.MsgType
- func StatusIsNil() predicate.MsgType
- func StatusNEQ(v typex.SimpleStatus) predicate.MsgType
- func StatusNotIn(vs ...typex.SimpleStatus) predicate.MsgType
- func StatusNotNil() predicate.MsgType
- func StatusValidator(s typex.SimpleStatus) error
- func UpdatedAt(v time.Time) predicate.MsgType
- func UpdatedAtEQ(v time.Time) predicate.MsgType
- func UpdatedAtGT(v time.Time) predicate.MsgType
- func UpdatedAtGTE(v time.Time) predicate.MsgType
- func UpdatedAtIn(vs ...time.Time) predicate.MsgType
- func UpdatedAtIsNil() predicate.MsgType
- func UpdatedAtLT(v time.Time) predicate.MsgType
- func UpdatedAtLTE(v time.Time) predicate.MsgType
- func UpdatedAtNEQ(v time.Time) predicate.MsgType
- func UpdatedAtNotIn(vs ...time.Time) predicate.MsgType
- func UpdatedAtNotNil() predicate.MsgType
- func UpdatedBy(v int) predicate.MsgType
- func UpdatedByEQ(v int) predicate.MsgType
- func UpdatedByGT(v int) predicate.MsgType
- func UpdatedByGTE(v int) predicate.MsgType
- func UpdatedByIn(vs ...int) predicate.MsgType
- func UpdatedByIsNil() predicate.MsgType
- func UpdatedByLT(v int) predicate.MsgType
- func UpdatedByLTE(v int) predicate.MsgType
- func UpdatedByNEQ(v int) predicate.MsgType
- func UpdatedByNotIn(vs ...int) predicate.MsgType
- func UpdatedByNotNil() predicate.MsgType
- func ValidColumn(column string) bool
- type OrderOption
- func ByAppID(opts ...sql.OrderTermOption) OrderOption
- func ByCanCustom(opts ...sql.OrderTermOption) OrderOption
- func ByCanSubs(opts ...sql.OrderTermOption) OrderOption
- func ByCategory(opts ...sql.OrderTermOption) OrderOption
- func ByComments(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByEventsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func BySubscribers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscribersCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" )
const DefaultStatus typex.SimpleStatus = "active"
Variables ¶
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"
var Columns = []string{ FieldID, FieldCreatedBy, FieldCreatedAt, FieldUpdatedBy, FieldUpdatedAt, FieldAppID, FieldCategory, FieldName, FieldStatus, FieldComments, FieldCanSubs, FieldCanCustom, }
Columns holds all SQL columns for msgtype fields.
Functions ¶
func AppID ¶
AppID applies equality check predicate on the "app_id" field. It's identical to AppIDEQ.
func AppIDIsNil ¶
AppIDIsNil applies the IsNil predicate on the "app_id" field.
func AppIDNotIn ¶
AppIDNotIn applies the NotIn predicate on the "app_id" field.
func AppIDNotNil ¶
AppIDNotNil applies the NotNil predicate on the "app_id" field.
func CanCustom ¶
CanCustom applies equality check predicate on the "can_custom" field. It's identical to CanCustomEQ.
func CanCustomEQ ¶
CanCustomEQ applies the EQ predicate on the "can_custom" field.
func CanCustomIsNil ¶
CanCustomIsNil applies the IsNil predicate on the "can_custom" field.
func CanCustomNEQ ¶
CanCustomNEQ applies the NEQ predicate on the "can_custom" field.
func CanCustomNotNil ¶
CanCustomNotNil applies the NotNil predicate on the "can_custom" field.
func CanSubs ¶
CanSubs applies equality check predicate on the "can_subs" field. It's identical to CanSubsEQ.
func CanSubsIsNil ¶
CanSubsIsNil applies the IsNil predicate on the "can_subs" field.
func CanSubsNEQ ¶
CanSubsNEQ applies the NEQ predicate on the "can_subs" field.
func CanSubsNotNil ¶
CanSubsNotNil applies the NotNil predicate on the "can_subs" field.
func Category ¶
Category applies equality check predicate on the "category" field. It's identical to CategoryEQ.
func CategoryContains ¶
CategoryContains applies the Contains predicate on the "category" field.
func CategoryContainsFold ¶
CategoryContainsFold applies the ContainsFold predicate on the "category" field.
func CategoryEQ ¶
CategoryEQ applies the EQ predicate on the "category" field.
func CategoryEqualFold ¶
CategoryEqualFold applies the EqualFold predicate on the "category" field.
func CategoryGT ¶
CategoryGT applies the GT predicate on the "category" field.
func CategoryGTE ¶
CategoryGTE applies the GTE predicate on the "category" field.
func CategoryHasPrefix ¶
CategoryHasPrefix applies the HasPrefix predicate on the "category" field.
func CategoryHasSuffix ¶
CategoryHasSuffix applies the HasSuffix predicate on the "category" field.
func CategoryIn ¶
CategoryIn applies the In predicate on the "category" field.
func CategoryLT ¶
CategoryLT applies the LT predicate on the "category" field.
func CategoryLTE ¶
CategoryLTE applies the LTE predicate on the "category" field.
func CategoryNEQ ¶
CategoryNEQ applies the NEQ predicate on the "category" field.
func CategoryNotIn ¶
CategoryNotIn applies the NotIn predicate on the "category" field.
func Comments ¶
Comments applies equality check predicate on the "comments" field. It's identical to CommentsEQ.
func CommentsContains ¶
CommentsContains applies the Contains predicate on the "comments" field.
func CommentsContainsFold ¶
CommentsContainsFold applies the ContainsFold predicate on the "comments" field.
func CommentsEQ ¶
CommentsEQ applies the EQ predicate on the "comments" field.
func CommentsEqualFold ¶
CommentsEqualFold applies the EqualFold predicate on the "comments" field.
func CommentsGT ¶
CommentsGT applies the GT predicate on the "comments" field.
func CommentsGTE ¶
CommentsGTE applies the GTE predicate on the "comments" field.
func CommentsHasPrefix ¶
CommentsHasPrefix applies the HasPrefix predicate on the "comments" field.
func CommentsHasSuffix ¶
CommentsHasSuffix applies the HasSuffix predicate on the "comments" field.
func CommentsIn ¶
CommentsIn applies the In predicate on the "comments" field.
func CommentsIsNil ¶
CommentsIsNil applies the IsNil predicate on the "comments" field.
func CommentsLT ¶
CommentsLT applies the LT predicate on the "comments" field.
func CommentsLTE ¶
CommentsLTE applies the LTE predicate on the "comments" field.
func CommentsNEQ ¶
CommentsNEQ applies the NEQ predicate on the "comments" field.
func CommentsNotIn ¶
CommentsNotIn applies the NotIn predicate on the "comments" field.
func CommentsNotNil ¶
CommentsNotNil applies the NotNil predicate on the "comments" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedBy ¶
CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
func CreatedByEQ ¶
CreatedByEQ applies the EQ predicate on the "created_by" field.
func CreatedByGT ¶
CreatedByGT applies the GT predicate on the "created_by" field.
func CreatedByGTE ¶
CreatedByGTE applies the GTE predicate on the "created_by" field.
func CreatedByIn ¶
CreatedByIn applies the In predicate on the "created_by" field.
func CreatedByLT ¶
CreatedByLT applies the LT predicate on the "created_by" field.
func CreatedByLTE ¶
CreatedByLTE applies the LTE predicate on the "created_by" field.
func CreatedByNEQ ¶
CreatedByNEQ applies the NEQ predicate on the "created_by" field.
func CreatedByNotIn ¶
CreatedByNotIn applies the NotIn predicate on the "created_by" field.
func HasEventsWith ¶
HasEventsWith applies the HasEdge predicate on the "events" edge with a given conditions (other predicates).
func HasSubscribers ¶
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 NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
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 ¶
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 ¶
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 ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
func UpdatedBy ¶
UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.
func UpdatedByEQ ¶
UpdatedByEQ applies the EQ predicate on the "updated_by" field.
func UpdatedByGT ¶
UpdatedByGT applies the GT predicate on the "updated_by" field.
func UpdatedByGTE ¶
UpdatedByGTE applies the GTE predicate on the "updated_by" field.
func UpdatedByIn ¶
UpdatedByIn applies the In predicate on the "updated_by" field.
func UpdatedByIsNil ¶
UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.
func UpdatedByLT ¶
UpdatedByLT applies the LT predicate on the "updated_by" field.
func UpdatedByLTE ¶
UpdatedByLTE applies the LTE predicate on the "updated_by" field.
func UpdatedByNEQ ¶
UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.
func UpdatedByNotIn ¶
UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.
func UpdatedByNotNil ¶
UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.