// Code generated by ent, DO NOT EDIT.

package docservercallback

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

const (
	// Label holds the string label denoting the docservercallback type in the database.
	Label = "doc_server_callback"
	// 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"
	// FieldCallbackURL holds the string denoting the callback_url field in the database.
	FieldCallbackURL = "callback_url"
	// FieldCallbackData holds the string denoting the callback_data field in the database.
	FieldCallbackData = "callback_data"
	// FieldCallbackType holds the string denoting the callback_type field in the database.
	FieldCallbackType = "callback_type"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldCurrNum holds the string denoting the curr_num field in the database.
	FieldCurrNum = "curr_num"
	// 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"
	// Table holds the table name of the docservercallback in the database.
	Table = "doc_server_callback"
)

// Columns holds all SQL columns for docservercallback fields.
var Columns = []string{
	FieldID,
	FieldServerProjectID,
	FieldCallbackURL,
	FieldCallbackData,
	FieldCallbackType,
	FieldStatus,
	FieldCurrNum,
	FieldCreatedAt,
	FieldUpdatedAt,
	FieldDeletedAt,
}

// 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 _ "convert-server/domain/entity/serversitemicros/runtime"
var (
	Hooks [2]ent.Hook
	// DefaultServerProjectID holds the default value on creation for the "server_project_id" field.
	DefaultServerProjectID int32
	// DefaultCallbackURL holds the default value on creation for the "callback_url" field.
	DefaultCallbackURL string
	// DefaultCallbackData holds the default value on creation for the "callback_data" field.
	DefaultCallbackData string
	// DefaultCallbackType holds the default value on creation for the "callback_type" field.
	DefaultCallbackType int8
	// DefaultCurrNum holds the default value on creation for the "curr_num" field.
	DefaultCurrNum int32
)

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

// ByCallbackURL orders the results by the callback_url field.
func ByCallbackURL(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCallbackURL, opts...).ToFunc()
}

// ByCallbackData orders the results by the callback_data field.
func ByCallbackData(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCallbackData, opts...).ToFunc()
}

// ByCallbackType orders the results by the callback_type field.
func ByCallbackType(opts ...sql.OrderTermOption) OrderOption {
	return sql.OrderByField(FieldCallbackType, opts...).ToFunc()
}

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

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