// Code generated by ent, DO NOT EDIT. package projecttask import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the projecttask type in the database. Label = "project_task" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldTaskID holds the string denoting the task_id field in the database. FieldTaskID = "task_id" // FieldModelID holds the string denoting the model_id field in the database. FieldModelID = "model_id" // FieldImageID holds the string denoting the image_id field in the database. FieldImageID = "image_id" // FieldGitIdentityID holds the string denoting the git_identity_id field in the database. FieldGitIdentityID = "git_identity_id" // FieldProjectID holds the string denoting the project_id field in the database. FieldProjectID = "project_id" // FieldIssueID holds the string denoting the issue_id field in the database. FieldIssueID = "issue_id" // FieldRepoURL holds the string denoting the repo_url field in the database. FieldRepoURL = "repo_url" // FieldRepoFilename holds the string denoting the repo_filename field in the database. FieldRepoFilename = "repo_filename" // FieldBranch holds the string denoting the branch field in the database. FieldBranch = "branch" // FieldCliName holds the string denoting the cli_name field in the database. FieldCliName = "cli_name" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeTask holds the string denoting the task edge name in mutations. EdgeTask = "task" // EdgeModel holds the string denoting the model edge name in mutations. EdgeModel = "model" // EdgeImage holds the string denoting the image edge name in mutations. EdgeImage = "image" // EdgeGitIdentity holds the string denoting the git_identity edge name in mutations. EdgeGitIdentity = "git_identity" // EdgeProject holds the string denoting the project edge name in mutations. EdgeProject = "project" // EdgeIssue holds the string denoting the issue edge name in mutations. EdgeIssue = "issue" // Table holds the table name of the projecttask in the database. Table = "project_tasks" // TaskTable is the table that holds the task relation/edge. TaskTable = "project_tasks" // TaskInverseTable is the table name for the Task entity. // It exists in this package in order to avoid circular dependency with the "task" package. TaskInverseTable = "tasks" // TaskColumn is the table column denoting the task relation/edge. TaskColumn = "task_id" // ModelTable is the table that holds the model relation/edge. ModelTable = "project_tasks" // ModelInverseTable is the table name for the Model entity. // It exists in this package in order to avoid circular dependency with the "model" package. ModelInverseTable = "models" // ModelColumn is the table column denoting the model relation/edge. ModelColumn = "model_id" // ImageTable is the table that holds the image relation/edge. ImageTable = "project_tasks" // ImageInverseTable is the table name for the Image entity. // It exists in this package in order to avoid circular dependency with the "image" package. ImageInverseTable = "images" // ImageColumn is the table column denoting the image relation/edge. ImageColumn = "image_id" // GitIdentityTable is the table that holds the git_identity relation/edge. GitIdentityTable = "project_tasks" // GitIdentityInverseTable is the table name for the GitIdentity entity. // It exists in this package in order to avoid circular dependency with the "gitidentity" package. GitIdentityInverseTable = "git_identities" // GitIdentityColumn is the table column denoting the git_identity relation/edge. GitIdentityColumn = "git_identity_id" // ProjectTable is the table that holds the project relation/edge. ProjectTable = "project_tasks" // ProjectInverseTable is the table name for the Project entity. // It exists in this package in order to avoid circular dependency with the "project" package. ProjectInverseTable = "projects" // ProjectColumn is the table column denoting the project relation/edge. ProjectColumn = "project_id" // IssueTable is the table that holds the issue relation/edge. IssueTable = "project_tasks" // IssueInverseTable is the table name for the ProjectIssue entity. // It exists in this package in order to avoid circular dependency with the "projectissue" package. IssueInverseTable = "project_issues" // IssueColumn is the table column denoting the issue relation/edge. IssueColumn = "issue_id" ) // Columns holds all SQL columns for projecttask fields. var Columns = []string{ FieldID, FieldTaskID, FieldModelID, FieldImageID, FieldGitIdentityID, FieldProjectID, FieldIssueID, FieldRepoURL, FieldRepoFilename, FieldBranch, FieldCliName, FieldCreatedAt, } // 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 ) // OrderOption defines the ordering options for the ProjectTask queries. type OrderOption func(*sql.Selector) // ByID orders the results by the id field. func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } // ByTaskID orders the results by the task_id field. func ByTaskID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTaskID, opts...).ToFunc() } // ByModelID orders the results by the model_id field. func ByModelID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldModelID, opts...).ToFunc() } // ByImageID orders the results by the image_id field. func ByImageID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldImageID, opts...).ToFunc() } // ByGitIdentityID orders the results by the git_identity_id field. func ByGitIdentityID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGitIdentityID, opts...).ToFunc() } // ByProjectID orders the results by the project_id field. func ByProjectID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldProjectID, opts...).ToFunc() } // ByIssueID orders the results by the issue_id field. func ByIssueID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldIssueID, opts...).ToFunc() } // ByRepoURL orders the results by the repo_url field. func ByRepoURL(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRepoURL, opts...).ToFunc() } // ByRepoFilename orders the results by the repo_filename field. func ByRepoFilename(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRepoFilename, opts...).ToFunc() } // ByBranch orders the results by the branch field. func ByBranch(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldBranch, opts...).ToFunc() } // ByCliName orders the results by the cli_name field. func ByCliName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCliName, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() } // ByTaskField orders the results by task field. func ByTaskField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newTaskStep(), sql.OrderByField(field, opts...)) } } // ByModelField orders the results by model field. func ByModelField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newModelStep(), sql.OrderByField(field, opts...)) } } // ByImageField orders the results by image field. func ByImageField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newImageStep(), sql.OrderByField(field, opts...)) } } // ByGitIdentityField orders the results by git_identity field. func ByGitIdentityField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newGitIdentityStep(), sql.OrderByField(field, opts...)) } } // ByProjectField orders the results by project field. func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newProjectStep(), sql.OrderByField(field, opts...)) } } // ByIssueField orders the results by issue field. func ByIssueField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newIssueStep(), sql.OrderByField(field, opts...)) } } func newTaskStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(TaskInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, TaskTable, TaskColumn), ) } func newModelStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(ModelInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ModelTable, ModelColumn), ) } func newImageStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(ImageInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ImageTable, ImageColumn), ) } func newGitIdentityStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(GitIdentityInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, GitIdentityTable, GitIdentityColumn), ) } func newProjectStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(ProjectInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ProjectTable, ProjectColumn), ) } func newIssueStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(IssueInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, IssueTable, IssueColumn), ) }