// Code generated by ent, DO NOT EDIT. package compositemodelroute import ( "time" "entgo.io/ent" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the compositemodelroute type in the database. Label = "composite_model_route" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldGroupID holds the string denoting the group_id field in the database. FieldGroupID = "group_id" // FieldPublicModel holds the string denoting the public_model field in the database. FieldPublicModel = "public_model" // FieldMatchType holds the string denoting the match_type field in the database. FieldMatchType = "match_type" // FieldTargetPlatform holds the string denoting the target_platform field in the database. FieldTargetPlatform = "target_platform" // FieldUpstreamModel holds the string denoting the upstream_model field in the database. FieldUpstreamModel = "upstream_model" // FieldEndpoint holds the string denoting the endpoint field in the database. FieldEndpoint = "endpoint" // FieldPriority holds the string denoting the priority field in the database. FieldPriority = "priority" // FieldEnabled holds the string denoting the enabled field in the database. FieldEnabled = "enabled" // FieldNotes holds the string denoting the notes field in the database. FieldNotes = "notes" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // Table holds the table name of the compositemodelroute in the database. Table = "composite_model_routes" // GroupTable is the table that holds the group relation/edge. GroupTable = "composite_model_routes" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_id" ) // Columns holds all SQL columns for compositemodelroute fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldGroupID, FieldPublicModel, FieldMatchType, FieldTargetPlatform, FieldUpstreamModel, FieldEndpoint, FieldPriority, FieldEnabled, FieldNotes, } // ValidColumn reports if the column name is valid (part of the table columns). func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } return false } // 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/Wei-Shaw/sub2api/ent/runtime" var ( Hooks [1]ent.Hook Interceptors [1]ent.Interceptor // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // PublicModelValidator is a validator for the "public_model" field. It is called by the builders before save. PublicModelValidator func(string) error // DefaultMatchType holds the default value on creation for the "match_type" field. DefaultMatchType string // MatchTypeValidator is a validator for the "match_type" field. It is called by the builders before save. MatchTypeValidator func(string) error // DefaultTargetPlatform holds the default value on creation for the "target_platform" field. DefaultTargetPlatform string // TargetPlatformValidator is a validator for the "target_platform" field. It is called by the builders before save. TargetPlatformValidator func(string) error // DefaultUpstreamModel holds the default value on creation for the "upstream_model" field. DefaultUpstreamModel string // UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save. UpstreamModelValidator func(string) error // DefaultEndpoint holds the default value on creation for the "endpoint" field. DefaultEndpoint string // EndpointValidator is a validator for the "endpoint" field. It is called by the builders before save. EndpointValidator func(string) error // DefaultPriority holds the default value on creation for the "priority" field. DefaultPriority int // DefaultEnabled holds the default value on creation for the "enabled" field. DefaultEnabled bool ) // OrderOption defines the ordering options for the CompositeModelRoute queries. type OrderOption func(*sql.Selector) // ByID orders the results by the id field. func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() } // ByUpdatedAt orders the results by the updated_at field. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() } // ByDeletedAt orders the results by the deleted_at field. func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDeletedAt, opts...).ToFunc() } // ByGroupID orders the results by the group_id field. func ByGroupID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGroupID, opts...).ToFunc() } // ByPublicModel orders the results by the public_model field. func ByPublicModel(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPublicModel, opts...).ToFunc() } // ByMatchType orders the results by the match_type field. func ByMatchType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMatchType, opts...).ToFunc() } // ByTargetPlatform orders the results by the target_platform field. func ByTargetPlatform(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTargetPlatform, opts...).ToFunc() } // ByUpstreamModel orders the results by the upstream_model field. func ByUpstreamModel(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUpstreamModel, opts...).ToFunc() } // ByEndpoint orders the results by the endpoint field. func ByEndpoint(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEndpoint, opts...).ToFunc() } // ByPriority orders the results by the priority field. func ByPriority(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPriority, opts...).ToFunc() } // ByEnabled orders the results by the enabled field. func ByEnabled(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEnabled, opts...).ToFunc() } // ByNotes orders the results by the notes field. func ByNotes(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNotes, opts...).ToFunc() } // ByGroupField orders the results by group field. func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newGroupStep(), sql.OrderByField(field, opts...)) } } func newGroupStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(GroupInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn), ) }