// Code generated by ent, DO NOT EDIT.

package apistatistics

const (
	// Label holds the string label denoting the apistatistics type in the database.
	Label = "api_statistics"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCallCount holds the string denoting the call_count field in the database.
	FieldCallCount = "call_count"
	// FieldSuccessCount holds the string denoting the success_count field in the database.
	FieldSuccessCount = "success_count"
	// FieldFailureCount holds the string denoting the failure_count field in the database.
	FieldFailureCount = "failure_count"
	// FieldAvgResponseTime holds the string denoting the avg_response_time field in the database.
	FieldAvgResponseTime = "avg_response_time"
	// FieldMaxResponseTime holds the string denoting the max_response_time field in the database.
	FieldMaxResponseTime = "max_response_time"
	// FieldMinResponseTime holds the string denoting the min_response_time field in the database.
	FieldMinResponseTime = "min_response_time"
	// FieldAvgTraffic holds the string denoting the avg_traffic field in the database.
	FieldAvgTraffic = "avg_traffic"
	// FieldMaxTraffic holds the string denoting the max_traffic field in the database.
	FieldMaxTraffic = "max_traffic"
	// FieldMinTraffic holds the string denoting the min_traffic field in the database.
	FieldMinTraffic = "min_traffic"
	// 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"
	// FieldUpdateAt holds the string denoting the update_at field in the database.
	FieldUpdateAt = "update_at"
	// FieldAPIID holds the string denoting the api_id field in the database.
	FieldAPIID = "api_id"
	// Table holds the table name of the apistatistics in the database.
	Table = "api_statistics"
)

// Columns holds all SQL columns for apistatistics fields.
var Columns = []string{
	FieldID,
	FieldCallCount,
	FieldSuccessCount,
	FieldFailureCount,
	FieldAvgResponseTime,
	FieldMaxResponseTime,
	FieldMinResponseTime,
	FieldAvgTraffic,
	FieldMaxTraffic,
	FieldMinTraffic,
	FieldDescription,
	FieldCreatedAt,
	FieldUpdateAt,
	FieldAPIID,
}

// 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 (
	// APIIDValidator is a validator for the "api_id" field. It is called by the builders before save.
	APIIDValidator func(int32) error
)
