171 lines
6.4 KiB
Go
171 lines
6.4 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package epicartifactinfo
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the epicartifactinfo type in the database.
|
|
Label = "epic_artifact_info"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldArtifactName holds the string denoting the artifact_name field in the database.
|
|
FieldArtifactName = "artifact_name"
|
|
// FieldArtifactCode holds the string denoting the artifact_code field in the database.
|
|
FieldArtifactCode = "artifact_code"
|
|
// FieldCreator holds the string denoting the creator field in the database.
|
|
FieldCreator = "creator"
|
|
// FieldCreateTime holds the string denoting the create_time field in the database.
|
|
FieldCreateTime = "create_time"
|
|
// FieldUpdater holds the string denoting the updater field in the database.
|
|
FieldUpdater = "updater"
|
|
// FieldUpdateTime holds the string denoting the update_time field in the database.
|
|
FieldUpdateTime = "update_time"
|
|
// FieldDeleted holds the string denoting the deleted field in the database.
|
|
FieldDeleted = "deleted"
|
|
// FieldStatsHealth holds the string denoting the stats_health field in the database.
|
|
FieldStatsHealth = "stats_health"
|
|
// FieldStatsAttack holds the string denoting the stats_attack field in the database.
|
|
FieldStatsAttack = "stats_attack"
|
|
// FieldStatsDefense holds the string denoting the stats_defense field in the database.
|
|
FieldStatsDefense = "stats_defense"
|
|
// FieldRarity holds the string denoting the rarity field in the database.
|
|
FieldRarity = "rarity"
|
|
// FieldRole holds the string denoting the role field in the database.
|
|
FieldRole = "role"
|
|
// FieldArtifactNameEn holds the string denoting the artifact_name_en field in the database.
|
|
FieldArtifactNameEn = "artifact_name_en"
|
|
// FieldImageURL holds the string denoting the image_url field in the database.
|
|
FieldImageURL = "image_url"
|
|
// Table holds the table name of the epicartifactinfo in the database.
|
|
Table = "epic_artifact_info"
|
|
)
|
|
|
|
// Columns holds all SQL columns for epicartifactinfo fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldArtifactName,
|
|
FieldArtifactCode,
|
|
FieldCreator,
|
|
FieldCreateTime,
|
|
FieldUpdater,
|
|
FieldUpdateTime,
|
|
FieldDeleted,
|
|
FieldStatsHealth,
|
|
FieldStatsAttack,
|
|
FieldStatsDefense,
|
|
FieldRarity,
|
|
FieldRole,
|
|
FieldArtifactNameEn,
|
|
FieldImageURL,
|
|
}
|
|
|
|
// 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 (
|
|
// ArtifactNameValidator is a validator for the "artifact_name" field. It is called by the builders before save.
|
|
ArtifactNameValidator func(string) error
|
|
// ArtifactCodeValidator is a validator for the "artifact_code" field. It is called by the builders before save.
|
|
ArtifactCodeValidator func(string) error
|
|
// CreatorValidator is a validator for the "creator" field. It is called by the builders before save.
|
|
CreatorValidator func(string) error
|
|
// UpdaterValidator is a validator for the "updater" field. It is called by the builders before save.
|
|
UpdaterValidator func(string) error
|
|
// RarityValidator is a validator for the "rarity" field. It is called by the builders before save.
|
|
RarityValidator func(string) error
|
|
// RoleValidator is a validator for the "role" field. It is called by the builders before save.
|
|
RoleValidator func(string) error
|
|
// ArtifactNameEnValidator is a validator for the "artifact_name_en" field. It is called by the builders before save.
|
|
ArtifactNameEnValidator func(string) error
|
|
// ImageURLValidator is a validator for the "image_url" field. It is called by the builders before save.
|
|
ImageURLValidator func(string) error
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the EpicArtifactInfo 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()
|
|
}
|
|
|
|
// ByArtifactName orders the results by the artifact_name field.
|
|
func ByArtifactName(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldArtifactName, opts...).ToFunc()
|
|
}
|
|
|
|
// ByArtifactCode orders the results by the artifact_code field.
|
|
func ByArtifactCode(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldArtifactCode, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreator orders the results by the creator field.
|
|
func ByCreator(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreator, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreateTime orders the results by the create_time field.
|
|
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreateTime, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdater orders the results by the updater field.
|
|
func ByUpdater(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdater, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdateTime orders the results by the update_time field.
|
|
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdateTime, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDeleted orders the results by the deleted field.
|
|
func ByDeleted(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDeleted, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatsHealth orders the results by the stats_health field.
|
|
func ByStatsHealth(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatsHealth, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatsAttack orders the results by the stats_attack field.
|
|
func ByStatsAttack(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatsAttack, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatsDefense orders the results by the stats_defense field.
|
|
func ByStatsDefense(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatsDefense, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRarity orders the results by the rarity field.
|
|
func ByRarity(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRarity, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRole orders the results by the role field.
|
|
func ByRole(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRole, opts...).ToFunc()
|
|
}
|
|
|
|
// ByArtifactNameEn orders the results by the artifact_name_en field.
|
|
func ByArtifactNameEn(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldArtifactNameEn, opts...).ToFunc()
|
|
}
|
|
|
|
// ByImageURL orders the results by the image_url field.
|
|
func ByImageURL(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldImageURL, opts...).ToFunc()
|
|
}
|