// Code generated by ent, DO NOT EDIT.

package employee

import (
	"time"

	"entgo.io/ent"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
)

const (
	// Label holds the string label denoting the employee type in the database.
	Label = "employee"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldAvatar holds the string denoting the avatar field in the database.
	FieldAvatar = "avatar"
	// FieldTags holds the string denoting the tags field in the database.
	FieldTags = "tags"
	// FieldHireCount holds the string denoting the hire_count field in the database.
	FieldHireCount = "hire_count"
	// FieldServiceCount holds the string denoting the service_count field in the database.
	FieldServiceCount = "service_count"
	// FieldAchievementCount holds the string denoting the achievement_count field in the database.
	FieldAchievementCount = "achievement_count"
	// FieldIntro holds the string denoting the intro field in the database.
	FieldIntro = "intro"
	// FieldEstimate holds the string denoting the estimate field in the database.
	FieldEstimate = "estimate"
	// FieldSkill holds the string denoting the skill field in the database.
	FieldSkill = "skill"
	// FieldAbilityType holds the string denoting the ability_type field in the database.
	FieldAbilityType = "ability_type"
	// FieldScene holds the string denoting the scene field in the database.
	FieldScene = "scene"
	// FieldSwitchIn holds the string denoting the switch_in field in the database.
	FieldSwitchIn = "switch_in"
	// FieldVideoURL holds the string denoting the video_url field in the database.
	FieldVideoURL = "video_url"
	// FieldOrganizationID holds the string denoting the organization_id field in the database.
	FieldOrganizationID = "organization_id"
	// FieldCategoryID holds the string denoting the category_id field in the database.
	FieldCategoryID = "category_id"
	// FieldAPIBase holds the string denoting the api_base field in the database.
	FieldAPIBase = "api_base"
	// FieldAPIKey holds the string denoting the api_key field in the database.
	FieldAPIKey = "api_key"
	// FieldAiInfo holds the string denoting the ai_info field in the database.
	FieldAiInfo = "ai_info"
	// FieldIsVip holds the string denoting the is_vip field in the database.
	FieldIsVip = "is_vip"
	// FieldChatURL holds the string denoting the chat_url field in the database.
	FieldChatURL = "chat_url"
	// EdgeEmWorkExperiences holds the string denoting the em_work_experiences edge name in mutations.
	EdgeEmWorkExperiences = "em_work_experiences"
	// EdgeEmTutorial holds the string denoting the em_tutorial edge name in mutations.
	EdgeEmTutorial = "em_tutorial"
	// Table holds the table name of the employee in the database.
	Table = "employee"
	// EmWorkExperiencesTable is the table that holds the em_work_experiences relation/edge.
	EmWorkExperiencesTable = "work_experience"
	// EmWorkExperiencesInverseTable is the table name for the WorkExperience entity.
	// It exists in this package in order to avoid circular dependency with the "workexperience" package.
	EmWorkExperiencesInverseTable = "work_experience"
	// EmWorkExperiencesColumn is the table column denoting the em_work_experiences relation/edge.
	EmWorkExperiencesColumn = "employee_id"
	// EmTutorialTable is the table that holds the em_tutorial relation/edge.
	EmTutorialTable = "tutorial"
	// EmTutorialInverseTable is the table name for the Tutorial entity.
	// It exists in this package in order to avoid circular dependency with the "tutorial" package.
	EmTutorialInverseTable = "tutorial"
	// EmTutorialColumn is the table column denoting the em_tutorial relation/edge.
	EmTutorialColumn = "employee_id"
)

// Columns holds all SQL columns for employee fields.
var Columns = []string{
	FieldID,
	FieldCreatedAt,
	FieldUpdatedAt,
	FieldDeletedAt,
	FieldTitle,
	FieldAvatar,
	FieldTags,
	FieldHireCount,
	FieldServiceCount,
	FieldAchievementCount,
	FieldIntro,
	FieldEstimate,
	FieldSkill,
	FieldAbilityType,
	FieldScene,
	FieldSwitchIn,
	FieldVideoURL,
	FieldOrganizationID,
	FieldCategoryID,
	FieldAPIBase,
	FieldAPIKey,
	FieldAiInfo,
	FieldIsVip,
	FieldChatURL,
}

// 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
}

// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
//	import _ "wechat-api/ent/runtime"
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// DefaultHireCount holds the default value on creation for the "hire_count" field.
	DefaultHireCount int
	// HireCountValidator is a validator for the "hire_count" field. It is called by the builders before save.
	HireCountValidator func(int) error
	// DefaultServiceCount holds the default value on creation for the "service_count" field.
	DefaultServiceCount int
	// ServiceCountValidator is a validator for the "service_count" field. It is called by the builders before save.
	ServiceCountValidator func(int) error
	// DefaultAchievementCount holds the default value on creation for the "achievement_count" field.
	DefaultAchievementCount int
	// AchievementCountValidator is a validator for the "achievement_count" field. It is called by the builders before save.
	AchievementCountValidator func(int) error
	// DefaultIntro holds the default value on creation for the "intro" field.
	DefaultIntro string
	// DefaultEstimate holds the default value on creation for the "estimate" field.
	DefaultEstimate string
	// DefaultSkill holds the default value on creation for the "skill" field.
	DefaultSkill string
	// DefaultAbilityType holds the default value on creation for the "ability_type" field.
	DefaultAbilityType string
	// DefaultScene holds the default value on creation for the "scene" field.
	DefaultScene string
	// DefaultSwitchIn holds the default value on creation for the "switch_in" field.
	DefaultSwitchIn string
	// DefaultVideoURL holds the default value on creation for the "video_url" field.
	DefaultVideoURL string
	// OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
	OrganizationIDValidator func(uint64) error
	// CategoryIDValidator is a validator for the "category_id" field. It is called by the builders before save.
	CategoryIDValidator func(uint64) error
	// DefaultAPIBase holds the default value on creation for the "api_base" field.
	DefaultAPIBase string
	// DefaultAPIKey holds the default value on creation for the "api_key" field.
	DefaultAPIKey string
	// DefaultIsVip holds the default value on creation for the "is_vip" field.
	DefaultIsVip int
)

// OrderOption defines the ordering options for the Employee 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()
}

// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}

// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}

// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}

// ByTitle orders the results by the title field.
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldTitle, opts...).ToFunc()
}

// ByAvatar orders the results by the avatar field.
func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAvatar, opts...).ToFunc()
}

// ByTags orders the results by the tags field.
func ByTags(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldTags, opts...).ToFunc()
}

// ByHireCount orders the results by the hire_count field.
func ByHireCount(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldHireCount, opts...).ToFunc()
}

// ByServiceCount orders the results by the service_count field.
func ByServiceCount(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldServiceCount, opts...).ToFunc()
}

// ByAchievementCount orders the results by the achievement_count field.
func ByAchievementCount(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAchievementCount, opts...).ToFunc()
}

// ByIntro orders the results by the intro field.
func ByIntro(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldIntro, opts...).ToFunc()
}

// ByEstimate orders the results by the estimate field.
func ByEstimate(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldEstimate, opts...).ToFunc()
}

// BySkill orders the results by the skill field.
func BySkill(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldSkill, opts...).ToFunc()
}

// ByAbilityType orders the results by the ability_type field.
func ByAbilityType(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAbilityType, opts...).ToFunc()
}

// ByScene orders the results by the scene field.
func ByScene(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldScene, opts...).ToFunc()
}

// BySwitchIn orders the results by the switch_in field.
func BySwitchIn(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldSwitchIn, opts...).ToFunc()
}

// ByVideoURL orders the results by the video_url field.
func ByVideoURL(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldVideoURL, opts...).ToFunc()
}

// ByOrganizationID orders the results by the organization_id field.
func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldOrganizationID, opts...).ToFunc()
}

// ByCategoryID orders the results by the category_id field.
func ByCategoryID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCategoryID, opts...).ToFunc()
}

// ByAPIBase orders the results by the api_base field.
func ByAPIBase(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAPIBase, opts...).ToFunc()
}

// ByAPIKey orders the results by the api_key field.
func ByAPIKey(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAPIKey, opts...).ToFunc()
}

// ByAiInfo orders the results by the ai_info field.
func ByAiInfo(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAiInfo, opts...).ToFunc()
}

// ByIsVip orders the results by the is_vip field.
func ByIsVip(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldIsVip, opts...).ToFunc()
}

// ByChatURL orders the results by the chat_url field.
func ByChatURL(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldChatURL, opts...).ToFunc()
}

// ByEmWorkExperiencesCount orders the results by em_work_experiences count.
func ByEmWorkExperiencesCount(opts ...sql.OrderTermOption) OrderOption {
	return func(s *sql.Selector) {
		sqlgraph.OrderByNeighborsCount(s, newEmWorkExperiencesStep(), opts...)
	}
}

// ByEmWorkExperiences orders the results by em_work_experiences terms.
func ByEmWorkExperiences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
	return func(s *sql.Selector) {
		sqlgraph.OrderByNeighborTerms(s, newEmWorkExperiencesStep(), append([]sql.OrderTerm{term}, terms...)...)
	}
}

// ByEmTutorialCount orders the results by em_tutorial count.
func ByEmTutorialCount(opts ...sql.OrderTermOption) OrderOption {
	return func(s *sql.Selector) {
		sqlgraph.OrderByNeighborsCount(s, newEmTutorialStep(), opts...)
	}
}

// ByEmTutorial orders the results by em_tutorial terms.
func ByEmTutorial(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
	return func(s *sql.Selector) {
		sqlgraph.OrderByNeighborTerms(s, newEmTutorialStep(), append([]sql.OrderTerm{term}, terms...)...)
	}
}
func newEmWorkExperiencesStep() *sqlgraph.Step {
	return sqlgraph.NewStep(
		sqlgraph.From(Table, FieldID),
		sqlgraph.To(EmWorkExperiencesInverseTable, FieldID),
		sqlgraph.Edge(sqlgraph.O2M, false, EmWorkExperiencesTable, EmWorkExperiencesColumn),
	)
}
func newEmTutorialStep() *sqlgraph.Step {
	return sqlgraph.NewStep(
		sqlgraph.From(Table, FieldID),
		sqlgraph.To(EmTutorialInverseTable, FieldID),
		sqlgraph.Edge(sqlgraph.O2M, false, EmTutorialTable, EmTutorialColumn),
	)
}
