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

153 lines
5.9 KiB
Go

// Code generated by ent, DO NOT EDIT.
package epicgvgdefenseattackmapping
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the epicgvgdefenseattackmapping type in the database.
Label = "epic_gvg_defense_attack_mapping"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldDefenseID holds the string denoting the defense_id field in the database.
FieldDefenseID = "defense_id"
// FieldAttackID holds the string denoting the attack_id field in the database.
FieldAttackID = "attack_id"
// FieldEquipmentInfo holds the string denoting the equipment_info field in the database.
FieldEquipmentInfo = "equipment_info"
// FieldArtifacts holds the string denoting the artifacts field in the database.
FieldArtifacts = "artifacts"
// FieldBattleStrategy holds the string denoting the battle_strategy field in the database.
FieldBattleStrategy = "battle_strategy"
// FieldPrerequisites holds the string denoting the prerequisites field in the database.
FieldPrerequisites = "prerequisites"
// FieldImportantNotes holds the string denoting the important_notes field in the database.
FieldImportantNotes = "important_notes"
// 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 epicgvgdefenseattackmapping in the database.
Table = "epic_gvg_defense_attack_mapping"
)
// Columns holds all SQL columns for epicgvgdefenseattackmapping fields.
var Columns = []string{
FieldID,
FieldDefenseID,
FieldAttackID,
FieldEquipmentInfo,
FieldArtifacts,
FieldBattleStrategy,
FieldPrerequisites,
FieldImportantNotes,
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 (
// EquipmentInfoValidator is a validator for the "equipment_info" field. It is called by the builders before save.
EquipmentInfoValidator func(string) error
// ArtifactsValidator is a validator for the "artifacts" field. It is called by the builders before save.
ArtifactsValidator func(string) error
// BattleStrategyValidator is a validator for the "battle_strategy" field. It is called by the builders before save.
BattleStrategyValidator func(string) error
// PrerequisitesValidator is a validator for the "prerequisites" field. It is called by the builders before save.
PrerequisitesValidator func(string) error
// ImportantNotesValidator is a validator for the "important_notes" field. It is called by the builders before save.
ImportantNotesValidator 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 EpicGvgDefenseAttackMapping 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()
}
// ByDefenseID orders the results by the defense_id field.
func ByDefenseID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDefenseID, opts...).ToFunc()
}
// ByAttackID orders the results by the attack_id field.
func ByAttackID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAttackID, opts...).ToFunc()
}
// ByEquipmentInfo orders the results by the equipment_info field.
func ByEquipmentInfo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEquipmentInfo, opts...).ToFunc()
}
// ByArtifacts orders the results by the artifacts field.
func ByArtifacts(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldArtifacts, opts...).ToFunc()
}
// ByBattleStrategy orders the results by the battle_strategy field.
func ByBattleStrategy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBattleStrategy, opts...).ToFunc()
}
// ByPrerequisites orders the results by the prerequisites field.
func ByPrerequisites(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPrerequisites, opts...).ToFunc()
}
// ByImportantNotes orders the results by the important_notes field.
func ByImportantNotes(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldImportantNotes, 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()
}