// Code generated by ent, DO NOT EDIT.

package task

import (
	"time"
)

const (
	// Label holds the string label denoting the task type in the database.
	Label = "task"
	// 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"
	// 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"
	// FieldAssignee holds the string denoting the assignee field in the database.
	FieldAssignee = "assignee"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldFrequency holds the string denoting the frequency field in the database.
	FieldFrequency = "frequency"
	// FieldScheduleTime holds the string denoting the schedule_time field in the database.
	FieldScheduleTime = "schedule_time"
	// FieldRank holds the string denoting the rank field in the database.
	FieldRank = "rank"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldStartTime holds the string denoting the start_time field in the database.
	FieldStartTime = "start_time"
	// FieldCompletedAt holds the string denoting the completed_at field in the database.
	FieldCompletedAt = "completed_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldStatusUpdatedAt holds the string denoting the status_updated_at field in the database.
	FieldStatusUpdatedAt = "status_updated_at"
	// FieldDeadline holds the string denoting the deadline field in the database.
	FieldDeadline = "deadline"
	// 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"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldTestplanID holds the string denoting the testplan_id field in the database.
	FieldTestplanID = "testplan_id"
	// FieldTestcaseSuite holds the string denoting the testcase_suite field in the database.
	FieldTestcaseSuite = "testcase_suite"
	// Table holds the table name of the task in the database.
	Table = "task"
)

// Columns holds all SQL columns for task fields.
var Columns = []string{
	FieldID,
	FieldName,
	FieldCreatedAt,
	FieldCreatedBy,
	FieldAssignee,
	FieldType,
	FieldFrequency,
	FieldScheduleTime,
	FieldRank,
	FieldStatus,
	FieldStartTime,
	FieldCompletedAt,
	FieldUpdatedAt,
	FieldUpdatedBy,
	FieldStatusUpdatedAt,
	FieldDeadline,
	FieldDeletedAt,
	FieldDeletedBy,
	FieldDescription,
	FieldTestplanID,
	FieldTestcaseSuite,
}

// 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
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultType holds the default value on creation for the "type" field.
	DefaultType int8
	// DefaultRank holds the default value on creation for the "rank" field.
	DefaultRank int8
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus int8
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
)
