// 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"
	// 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"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldAPIGroup holds the string denoting the api_group field in the database.
	FieldAPIGroup = "api_group"
	// FieldMethod holds the string denoting the method field in the database.
	FieldMethod = "method"
	// Table holds the table name of the api in the database.
	Table = "sys_apis"
)

// Columns holds all SQL columns for api fields.
var Columns = []string{
	FieldID,
	FieldCreatedAt,
	FieldUpdatedAt,
	FieldPath,
	FieldDescription,
	FieldAPIGroup,
	FieldMethod,
}

// 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 (
	// 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
	// DefaultMethod holds the default value on creation for the "method" field.
	DefaultMethod string
)
