first draft version

This commit is contained in:
Simon Ding
2024-06-22 17:15:24 +08:00
parent be0dc4a466
commit ab8e653c5b
63 changed files with 15137 additions and 17 deletions

View File

@@ -0,0 +1,103 @@
// Code generated by ent, DO NOT EDIT.
package downloadclients
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the downloadclients type in the database.
Label = "download_clients"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldEnable holds the string denoting the enable field in the database.
FieldEnable = "enable"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldImplementation holds the string denoting the implementation field in the database.
FieldImplementation = "implementation"
// FieldSettings holds the string denoting the settings field in the database.
FieldSettings = "settings"
// FieldPriority holds the string denoting the priority field in the database.
FieldPriority = "priority"
// FieldRemoveCompletedDownloads holds the string denoting the remove_completed_downloads field in the database.
FieldRemoveCompletedDownloads = "remove_completed_downloads"
// FieldRemoveFailedDownloads holds the string denoting the remove_failed_downloads field in the database.
FieldRemoveFailedDownloads = "remove_failed_downloads"
// FieldTags holds the string denoting the tags field in the database.
FieldTags = "tags"
// Table holds the table name of the downloadclients in the database.
Table = "download_clients"
)
// Columns holds all SQL columns for downloadclients fields.
var Columns = []string{
FieldID,
FieldEnable,
FieldName,
FieldImplementation,
FieldSettings,
FieldPriority,
FieldRemoveCompletedDownloads,
FieldRemoveFailedDownloads,
FieldTags,
}
// 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
}
// OrderOption defines the ordering options for the DownloadClients 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()
}
// ByEnable orders the results by the enable field.
func ByEnable(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEnable, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByImplementation orders the results by the implementation field.
func ByImplementation(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldImplementation, opts...).ToFunc()
}
// BySettings orders the results by the settings field.
func BySettings(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSettings, opts...).ToFunc()
}
// ByPriority orders the results by the priority field.
func ByPriority(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPriority, opts...).ToFunc()
}
// ByRemoveCompletedDownloads orders the results by the remove_completed_downloads field.
func ByRemoveCompletedDownloads(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemoveCompletedDownloads, opts...).ToFunc()
}
// ByRemoveFailedDownloads orders the results by the remove_failed_downloads field.
func ByRemoveFailedDownloads(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemoveFailedDownloads, opts...).ToFunc()
}
// ByTags orders the results by the tags field.
func ByTags(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTags, opts...).ToFunc()
}

View File

@@ -0,0 +1,464 @@
// Code generated by ent, DO NOT EDIT.
package downloadclients
import (
"polaris/ent/predicate"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldID, id))
}
// Enable applies equality check predicate on the "enable" field. It's identical to EnableEQ.
func Enable(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldEnable, v))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldName, v))
}
// Implementation applies equality check predicate on the "implementation" field. It's identical to ImplementationEQ.
func Implementation(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldImplementation, v))
}
// Settings applies equality check predicate on the "settings" field. It's identical to SettingsEQ.
func Settings(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldSettings, v))
}
// Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.
func Priority(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldPriority, v))
}
// RemoveCompletedDownloads applies equality check predicate on the "remove_completed_downloads" field. It's identical to RemoveCompletedDownloadsEQ.
func RemoveCompletedDownloads(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldRemoveCompletedDownloads, v))
}
// RemoveFailedDownloads applies equality check predicate on the "remove_failed_downloads" field. It's identical to RemoveFailedDownloadsEQ.
func RemoveFailedDownloads(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldRemoveFailedDownloads, v))
}
// Tags applies equality check predicate on the "tags" field. It's identical to TagsEQ.
func Tags(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldTags, v))
}
// EnableEQ applies the EQ predicate on the "enable" field.
func EnableEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldEnable, v))
}
// EnableNEQ applies the NEQ predicate on the "enable" field.
func EnableNEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldEnable, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContainsFold(FieldName, v))
}
// ImplementationEQ applies the EQ predicate on the "implementation" field.
func ImplementationEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldImplementation, v))
}
// ImplementationNEQ applies the NEQ predicate on the "implementation" field.
func ImplementationNEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldImplementation, v))
}
// ImplementationIn applies the In predicate on the "implementation" field.
func ImplementationIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldImplementation, vs...))
}
// ImplementationNotIn applies the NotIn predicate on the "implementation" field.
func ImplementationNotIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldImplementation, vs...))
}
// ImplementationGT applies the GT predicate on the "implementation" field.
func ImplementationGT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldImplementation, v))
}
// ImplementationGTE applies the GTE predicate on the "implementation" field.
func ImplementationGTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldImplementation, v))
}
// ImplementationLT applies the LT predicate on the "implementation" field.
func ImplementationLT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldImplementation, v))
}
// ImplementationLTE applies the LTE predicate on the "implementation" field.
func ImplementationLTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldImplementation, v))
}
// ImplementationContains applies the Contains predicate on the "implementation" field.
func ImplementationContains(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContains(FieldImplementation, v))
}
// ImplementationHasPrefix applies the HasPrefix predicate on the "implementation" field.
func ImplementationHasPrefix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasPrefix(FieldImplementation, v))
}
// ImplementationHasSuffix applies the HasSuffix predicate on the "implementation" field.
func ImplementationHasSuffix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasSuffix(FieldImplementation, v))
}
// ImplementationEqualFold applies the EqualFold predicate on the "implementation" field.
func ImplementationEqualFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEqualFold(FieldImplementation, v))
}
// ImplementationContainsFold applies the ContainsFold predicate on the "implementation" field.
func ImplementationContainsFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContainsFold(FieldImplementation, v))
}
// SettingsEQ applies the EQ predicate on the "settings" field.
func SettingsEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldSettings, v))
}
// SettingsNEQ applies the NEQ predicate on the "settings" field.
func SettingsNEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldSettings, v))
}
// SettingsIn applies the In predicate on the "settings" field.
func SettingsIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldSettings, vs...))
}
// SettingsNotIn applies the NotIn predicate on the "settings" field.
func SettingsNotIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldSettings, vs...))
}
// SettingsGT applies the GT predicate on the "settings" field.
func SettingsGT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldSettings, v))
}
// SettingsGTE applies the GTE predicate on the "settings" field.
func SettingsGTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldSettings, v))
}
// SettingsLT applies the LT predicate on the "settings" field.
func SettingsLT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldSettings, v))
}
// SettingsLTE applies the LTE predicate on the "settings" field.
func SettingsLTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldSettings, v))
}
// SettingsContains applies the Contains predicate on the "settings" field.
func SettingsContains(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContains(FieldSettings, v))
}
// SettingsHasPrefix applies the HasPrefix predicate on the "settings" field.
func SettingsHasPrefix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasPrefix(FieldSettings, v))
}
// SettingsHasSuffix applies the HasSuffix predicate on the "settings" field.
func SettingsHasSuffix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasSuffix(FieldSettings, v))
}
// SettingsEqualFold applies the EqualFold predicate on the "settings" field.
func SettingsEqualFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEqualFold(FieldSettings, v))
}
// SettingsContainsFold applies the ContainsFold predicate on the "settings" field.
func SettingsContainsFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContainsFold(FieldSettings, v))
}
// PriorityEQ applies the EQ predicate on the "priority" field.
func PriorityEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldPriority, v))
}
// PriorityNEQ applies the NEQ predicate on the "priority" field.
func PriorityNEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldPriority, v))
}
// PriorityIn applies the In predicate on the "priority" field.
func PriorityIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldPriority, vs...))
}
// PriorityNotIn applies the NotIn predicate on the "priority" field.
func PriorityNotIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldPriority, vs...))
}
// PriorityGT applies the GT predicate on the "priority" field.
func PriorityGT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldPriority, v))
}
// PriorityGTE applies the GTE predicate on the "priority" field.
func PriorityGTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldPriority, v))
}
// PriorityLT applies the LT predicate on the "priority" field.
func PriorityLT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldPriority, v))
}
// PriorityLTE applies the LTE predicate on the "priority" field.
func PriorityLTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldPriority, v))
}
// PriorityContains applies the Contains predicate on the "priority" field.
func PriorityContains(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContains(FieldPriority, v))
}
// PriorityHasPrefix applies the HasPrefix predicate on the "priority" field.
func PriorityHasPrefix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasPrefix(FieldPriority, v))
}
// PriorityHasSuffix applies the HasSuffix predicate on the "priority" field.
func PriorityHasSuffix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasSuffix(FieldPriority, v))
}
// PriorityEqualFold applies the EqualFold predicate on the "priority" field.
func PriorityEqualFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEqualFold(FieldPriority, v))
}
// PriorityContainsFold applies the ContainsFold predicate on the "priority" field.
func PriorityContainsFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContainsFold(FieldPriority, v))
}
// RemoveCompletedDownloadsEQ applies the EQ predicate on the "remove_completed_downloads" field.
func RemoveCompletedDownloadsEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldRemoveCompletedDownloads, v))
}
// RemoveCompletedDownloadsNEQ applies the NEQ predicate on the "remove_completed_downloads" field.
func RemoveCompletedDownloadsNEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldRemoveCompletedDownloads, v))
}
// RemoveFailedDownloadsEQ applies the EQ predicate on the "remove_failed_downloads" field.
func RemoveFailedDownloadsEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldRemoveFailedDownloads, v))
}
// RemoveFailedDownloadsNEQ applies the NEQ predicate on the "remove_failed_downloads" field.
func RemoveFailedDownloadsNEQ(v bool) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldRemoveFailedDownloads, v))
}
// TagsEQ applies the EQ predicate on the "tags" field.
func TagsEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEQ(FieldTags, v))
}
// TagsNEQ applies the NEQ predicate on the "tags" field.
func TagsNEQ(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNEQ(FieldTags, v))
}
// TagsIn applies the In predicate on the "tags" field.
func TagsIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldIn(FieldTags, vs...))
}
// TagsNotIn applies the NotIn predicate on the "tags" field.
func TagsNotIn(vs ...string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldNotIn(FieldTags, vs...))
}
// TagsGT applies the GT predicate on the "tags" field.
func TagsGT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGT(FieldTags, v))
}
// TagsGTE applies the GTE predicate on the "tags" field.
func TagsGTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldGTE(FieldTags, v))
}
// TagsLT applies the LT predicate on the "tags" field.
func TagsLT(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLT(FieldTags, v))
}
// TagsLTE applies the LTE predicate on the "tags" field.
func TagsLTE(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldLTE(FieldTags, v))
}
// TagsContains applies the Contains predicate on the "tags" field.
func TagsContains(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContains(FieldTags, v))
}
// TagsHasPrefix applies the HasPrefix predicate on the "tags" field.
func TagsHasPrefix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasPrefix(FieldTags, v))
}
// TagsHasSuffix applies the HasSuffix predicate on the "tags" field.
func TagsHasSuffix(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldHasSuffix(FieldTags, v))
}
// TagsEqualFold applies the EqualFold predicate on the "tags" field.
func TagsEqualFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldEqualFold(FieldTags, v))
}
// TagsContainsFold applies the ContainsFold predicate on the "tags" field.
func TagsContainsFold(v string) predicate.DownloadClients {
return predicate.DownloadClients(sql.FieldContainsFold(FieldTags, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.DownloadClients) predicate.DownloadClients {
return predicate.DownloadClients(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.DownloadClients) predicate.DownloadClients {
return predicate.DownloadClients(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.DownloadClients) predicate.DownloadClients {
return predicate.DownloadClients(sql.NotPredicates(p))
}