Files
2026-01-28 13:25:18 +08:00

165 lines
5.8 KiB
Go

// Code generated by ent, DO NOT EDIT.
package siteconfig
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the siteconfig type in the database.
Label = "site_config"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldSiteName holds the string denoting the site_name field in the database.
FieldSiteName = "site_name"
// FieldSiteURL holds the string denoting the site_url field in the database.
FieldSiteURL = "site_url"
// FieldSiteIcon holds the string denoting the site_icon field in the database.
FieldSiteIcon = "site_icon"
// FieldSiteDescription holds the string denoting the site_description field in the database.
FieldSiteDescription = "site_description"
// FieldSiteKeywords holds the string denoting the site_keywords field in the database.
FieldSiteKeywords = "site_keywords"
// FieldUserName holds the string denoting the user_name field in the database.
FieldUserName = "user_name"
// FieldProfileImageURL holds the string denoting the profile_image_url field in the database.
FieldProfileImageURL = "profile_image_url"
// FieldIcpNumber holds the string denoting the icp_number field in the database.
FieldIcpNumber = "icp_number"
// FieldPoliceNumber holds the string denoting the police_number field in the database.
FieldPoliceNumber = "police_number"
// FieldPageTitle holds the string denoting the page_title field in the database.
FieldPageTitle = "page_title"
// FieldFavicon holds the string denoting the favicon field in the database.
FieldFavicon = "favicon"
// FieldUmamiScript holds the string denoting the umami_script field in the database.
FieldUmamiScript = "umami_script"
// FieldUmamiWebsiteID holds the string denoting the umami_website_id field in the database.
FieldUmamiWebsiteID = "umami_website_id"
// FieldIconLibrary holds the string denoting the icon_library field in the database.
FieldIconLibrary = "icon_library"
// FieldFontLibrary holds the string denoting the font_library field in the database.
FieldFontLibrary = "font_library"
// Table holds the table name of the siteconfig in the database.
Table = "site_configs"
)
// Columns holds all SQL columns for siteconfig fields.
var Columns = []string{
FieldID,
FieldSiteName,
FieldSiteURL,
FieldSiteIcon,
FieldSiteDescription,
FieldSiteKeywords,
FieldUserName,
FieldProfileImageURL,
FieldIcpNumber,
FieldPoliceNumber,
FieldPageTitle,
FieldFavicon,
FieldUmamiScript,
FieldUmamiWebsiteID,
FieldIconLibrary,
FieldFontLibrary,
}
// 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
}
var (
// DefaultID holds the default value on creation for the "id" field.
DefaultID int
)
// OrderOption defines the ordering options for the SiteConfig 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()
}
// BySiteName orders the results by the site_name field.
func BySiteName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSiteName, opts...).ToFunc()
}
// BySiteURL orders the results by the site_url field.
func BySiteURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSiteURL, opts...).ToFunc()
}
// BySiteIcon orders the results by the site_icon field.
func BySiteIcon(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSiteIcon, opts...).ToFunc()
}
// BySiteDescription orders the results by the site_description field.
func BySiteDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSiteDescription, opts...).ToFunc()
}
// BySiteKeywords orders the results by the site_keywords field.
func BySiteKeywords(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSiteKeywords, opts...).ToFunc()
}
// ByUserName orders the results by the user_name field.
func ByUserName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserName, opts...).ToFunc()
}
// ByProfileImageURL orders the results by the profile_image_url field.
func ByProfileImageURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProfileImageURL, opts...).ToFunc()
}
// ByIcpNumber orders the results by the icp_number field.
func ByIcpNumber(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIcpNumber, opts...).ToFunc()
}
// ByPoliceNumber orders the results by the police_number field.
func ByPoliceNumber(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPoliceNumber, opts...).ToFunc()
}
// ByPageTitle orders the results by the page_title field.
func ByPageTitle(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPageTitle, opts...).ToFunc()
}
// ByFavicon orders the results by the favicon field.
func ByFavicon(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFavicon, opts...).ToFunc()
}
// ByUmamiScript orders the results by the umami_script field.
func ByUmamiScript(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUmamiScript, opts...).ToFunc()
}
// ByUmamiWebsiteID orders the results by the umami_website_id field.
func ByUmamiWebsiteID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUmamiWebsiteID, opts...).ToFunc()
}
// ByIconLibrary orders the results by the icon_library field.
func ByIconLibrary(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIconLibrary, opts...).ToFunc()
}
// ByFontLibrary orders the results by the font_library field.
func ByFontLibrary(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFontLibrary, opts...).ToFunc()
}