// Code generated by ent, DO NOT EDIT.

package category

const (
	// Label holds the string label denoting the category type in the database.
	Label = "category"
	// 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"
	// FieldReadonly holds the string denoting the readonly field in the database.
	FieldReadonly = "readonly"
	// EdgePets holds the string denoting the pets edge name in mutations.
	EdgePets = "pets"
	// Table holds the table name of the category in the database.
	Table = "categories"
	// PetsTable is the table that holds the pets relation/edge. The primary key declared below.
	PetsTable = "category_pets"
	// PetsInverseTable is the table name for the Pet entity.
	// It exists in this package in order to avoid circular dependency with the "pet" package.
	PetsInverseTable = "pets"
)

// Columns holds all SQL columns for category fields.
var Columns = []string{
	FieldID,
	FieldName,
	FieldReadonly,
}

var (
	// PetsPrimaryKey and PetsColumn2 are the table columns denoting the
	// primary key for the pets relation (M2M).
	PetsPrimaryKey = []string{"category_id", "pet_id"}
)

// 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
}
