// Code generated by ent, DO NOT EDIT.

package docservergetproject

import (
	"entgo.io/ent/dialect/sql"
)

const (
	// Label holds the string label denoting the docservergetproject type in the database.
	Label = "doc_server_get_project"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldServerProjectID holds the string denoting the server_project_id field in the database.
	FieldServerProjectID = "server_project_id"
	// FieldCurrNum holds the string denoting the curr_num field in the database.
	FieldCurrNum = "curr_num"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldAliResult holds the string denoting the ali_result field in the database.
	FieldAliResult = "ali_result"
	// 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"
	// Table holds the table name of the docservergetproject in the database.
	Table = "doc_server_get_project"
)

// Columns holds all SQL columns for docservergetproject fields.
var Columns = []string{
	FieldID,
	FieldServerProjectID,
	FieldCurrNum,
	FieldStatus,
	FieldAliResult,
	FieldCreatedAt,
	FieldUpdatedAt,
}

// 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 (
	// DefaultServerProjectID holds the default value on creation for the "server_project_id" field.
	DefaultServerProjectID int32
	// DefaultCurrNum holds the default value on creation for the "curr_num" field.
	DefaultCurrNum int32
	// AliResultValidator is a validator for the "ali_result" field. It is called by the builders before save.
	AliResultValidator func(string) error
)

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

// ByServerProjectID orders the results by the server_project_id field.
func ByServerProjectID(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldServerProjectID, opts...).ToFunc()
}

// ByCurrNum orders the results by the curr_num field.
func ByCurrNum(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCurrNum, opts...).ToFunc()
}

// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldStatus, opts...).ToFunc()
}

// ByAliResult orders the results by the ali_result field.
func ByAliResult(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldAliResult, 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()
}
