// Code generated by ent, DO NOT EDIT. package image import ( "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the image type in the database. Label = "image" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldURL holds the string denoting the url field in the database. FieldURL = "url" // FieldMimeType holds the string denoting the mimetype field in the database. FieldMimeType = "mime_type" // Table holds the table name of the image in the database. Table = "images" ) // Columns holds all SQL columns for image fields. var Columns = []string{ FieldID, FieldURL, FieldMimeType, } // 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 } // OrderOption defines the ordering options for the Image 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() } // ByURL orders the results by the url field. func ByURL(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldURL, opts...).ToFunc() } // ByMimeType orders the results by the mimeType field. func ByMimeType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMimeType, opts...).ToFunc() }