// Code generated by ent, DO NOT EDIT.

package api

import (
	"time"
)

const (
	// Label holds the string label denoting the api type in the database.
	Label = "api"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldURL holds the string denoting the url field in the database.
	FieldURL = "url"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldHeaders holds the string denoting the headers field in the database.
	FieldHeaders = "headers"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// FieldLabel holds the string denoting the label field in the database.
	FieldLabel = "label"
	// FieldQueryParams holds the string denoting the query_params field in the database.
	FieldQueryParams = "query_params"
	// FieldResponse holds the string denoting the response field in the database.
	FieldResponse = "response"
	// FieldModule holds the string denoting the module field in the database.
	FieldModule = "module"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldIncludeFiles holds the string denoting the include_files field in the database.
	FieldIncludeFiles = "include_files"
	// FieldUpdateAt holds the string denoting the update_at field in the database.
	FieldUpdateAt = "update_at"
	// FieldUpdateBy holds the string denoting the update_by field in the database.
	FieldUpdateBy = "update_by"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldDeletedBy holds the string denoting the deleted_by field in the database.
	FieldDeletedBy = "deleted_by"
	// Table holds the table name of the api in the database.
	Table = "api"
)

// Columns holds all SQL columns for api fields.
var Columns = []string{
	FieldID,
	FieldName,
	FieldURL,
	FieldType,
	FieldStatus,
	FieldHeaders,
	FieldBody,
	FieldLabel,
	FieldQueryParams,
	FieldResponse,
	FieldModule,
	FieldDescription,
	FieldCreatedAt,
	FieldCreatedBy,
	FieldIncludeFiles,
	FieldUpdateAt,
	FieldUpdateBy,
	FieldDeletedAt,
	FieldDeletedBy,
}

// 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 (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// URLValidator is a validator for the "url" field. It is called by the builders before save.
	URLValidator func(string) error
	// TypeValidator is a validator for the "type" field. It is called by the builders before save.
	TypeValidator func(int8) error
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus int8
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// UpdateDefaultUpdateAt holds the default value on update for the "update_at" field.
	UpdateDefaultUpdateAt func() time.Time
)
