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

215 lines
8.3 KiB
Go

// Code generated by ent, DO NOT EDIT.
package epicheroinfo
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the epicheroinfo type in the database.
Label = "epic_hero_info"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldHeroName holds the string denoting the hero_name field in the database.
FieldHeroName = "hero_name"
// FieldHeroCode holds the string denoting the hero_code field in the database.
FieldHeroCode = "hero_code"
// FieldHeroAttrLv60 holds the string denoting the hero_attr_lv60 field in the database.
FieldHeroAttrLv60 = "hero_attr_lv60"
// 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"
// FieldNickName holds the string denoting the nick_name field in the database.
FieldNickName = "nick_name"
// 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"
// FieldZodiac holds the string denoting the zodiac field in the database.
FieldZodiac = "zodiac"
// FieldHeadImgURL holds the string denoting the head_img_url field in the database.
FieldHeadImgURL = "head_img_url"
// FieldAttribute holds the string denoting the attribute field in the database.
FieldAttribute = "attribute"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldRawJSON holds the string denoting the raw_json field in the database.
FieldRawJSON = "raw_json"
// FieldContentJSONSet holds the string denoting the content_json_set field in the database.
FieldContentJSONSet = "content_json_set"
// FieldUpdateTimeSet holds the string denoting the update_time_set field in the database.
FieldUpdateTimeSet = "update_time_set"
// Table holds the table name of the epicheroinfo in the database.
Table = "epic_hero_info"
)
// Columns holds all SQL columns for epicheroinfo fields.
var Columns = []string{
FieldID,
FieldHeroName,
FieldHeroCode,
FieldHeroAttrLv60,
FieldCreator,
FieldCreateTime,
FieldUpdater,
FieldUpdateTime,
FieldDeleted,
FieldNickName,
FieldRarity,
FieldRole,
FieldZodiac,
FieldHeadImgURL,
FieldAttribute,
FieldRemark,
FieldRawJSON,
FieldContentJSONSet,
FieldUpdateTimeSet,
}
// 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 (
// HeroNameValidator is a validator for the "hero_name" field. It is called by the builders before save.
HeroNameValidator func(string) error
// HeroCodeValidator is a validator for the "hero_code" field. It is called by the builders before save.
HeroCodeValidator func(string) error
// HeroAttrLv60Validator is a validator for the "hero_attr_lv60" field. It is called by the builders before save.
HeroAttrLv60Validator 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
// NickNameValidator is a validator for the "nick_name" field. It is called by the builders before save.
NickNameValidator 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
// ZodiacValidator is a validator for the "zodiac" field. It is called by the builders before save.
ZodiacValidator func(string) error
// HeadImgURLValidator is a validator for the "head_img_url" field. It is called by the builders before save.
HeadImgURLValidator func(string) error
// AttributeValidator is a validator for the "attribute" field. It is called by the builders before save.
AttributeValidator func(string) error
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// RawJSONValidator is a validator for the "raw_json" field. It is called by the builders before save.
RawJSONValidator func(string) error
// ContentJSONSetValidator is a validator for the "content_json_set" field. It is called by the builders before save.
ContentJSONSetValidator func(string) error
)
// OrderOption defines the ordering options for the EpicHeroInfo 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()
}
// ByHeroName orders the results by the hero_name field.
func ByHeroName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroName, opts...).ToFunc()
}
// ByHeroCode orders the results by the hero_code field.
func ByHeroCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroCode, opts...).ToFunc()
}
// ByHeroAttrLv60 orders the results by the hero_attr_lv60 field.
func ByHeroAttrLv60(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeroAttrLv60, 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()
}
// ByNickName orders the results by the nick_name field.
func ByNickName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNickName, 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()
}
// ByZodiac orders the results by the zodiac field.
func ByZodiac(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldZodiac, opts...).ToFunc()
}
// ByHeadImgURL orders the results by the head_img_url field.
func ByHeadImgURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeadImgURL, opts...).ToFunc()
}
// ByAttribute orders the results by the attribute field.
func ByAttribute(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAttribute, opts...).ToFunc()
}
// ByRemark orders the results by the remark field.
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByRawJSON orders the results by the raw_json field.
func ByRawJSON(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRawJSON, opts...).ToFunc()
}
// ByContentJSONSet orders the results by the content_json_set field.
func ByContentJSONSet(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContentJSONSet, opts...).ToFunc()
}
// ByUpdateTimeSet orders the results by the update_time_set field.
func ByUpdateTimeSet(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdateTimeSet, opts...).ToFunc()
}