Files
epic-ent/internal/ent/epicherouserbuild/epicherouserbuild.go

131 lines
4.7 KiB
Go

// Code generated by ent, DO NOT EDIT.
package epicherouserbuild
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the epicherouserbuild type in the database.
Label = "epic_hero_user_build"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldArtifactCode holds the string denoting the artifact_code field in the database.
FieldArtifactCode = "artifact_code"
// FieldHeroCode holds the string denoting the hero_code field in the database.
FieldHeroCode = "hero_code"
// FieldHeroHeathBuild holds the string denoting the hero_heath_build field in the database.
FieldHeroHeathBuild = "hero_heath_build"
// FieldHeroAttackBuild holds the string denoting the hero_attack_build field in the database.
FieldHeroAttackBuild = "hero_attack_build"
// FieldHeroDefBuild holds the string denoting the hero_def_build field in the database.
FieldHeroDefBuild = "hero_def_build"
// 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"
// Table holds the table name of the epicherouserbuild in the database.
Table = "epic_hero_user_builds"
)
// Columns holds all SQL columns for epicherouserbuild fields.
var Columns = []string{
FieldID,
FieldArtifactCode,
FieldHeroCode,
FieldHeroHeathBuild,
FieldHeroAttackBuild,
FieldHeroDefBuild,
FieldCreator,
FieldCreateTime,
FieldUpdater,
FieldUpdateTime,
FieldDeleted,
}
// 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 (
// ArtifactCodeValidator is a validator for the "artifact_code" field. It is called by the builders before save.
ArtifactCodeValidator func(string) error
// HeroCodeValidator is a validator for the "hero_code" field. It is called by the builders before save.
HeroCodeValidator 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
)
// OrderOption defines the ordering options for the EpicHeroUserBuild 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()
}
// ByArtifactCode orders the results by the artifact_code field.
func ByArtifactCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldArtifactCode, opts...).ToFunc()
}
// ByHeroCode orders the results by the hero_code field.
func ByHeroCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroCode, opts...).ToFunc()
}
// ByHeroHeathBuild orders the results by the hero_heath_build field.
func ByHeroHeathBuild(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroHeathBuild, opts...).ToFunc()
}
// ByHeroAttackBuild orders the results by the hero_attack_build field.
func ByHeroAttackBuild(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroAttackBuild, opts...).ToFunc()
}
// ByHeroDefBuild orders the results by the hero_def_build field.
func ByHeroDefBuild(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroDefBuild, 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()
}