// Code generated by ent, DO NOT EDIT. package operation import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the operation type in the database. Label = "operation" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldDid holds the string denoting the did field in the database. FieldDid = "did" // FieldOperation holds the string denoting the operation field in the database. FieldOperation = "operation" // FieldCid holds the string denoting the cid field in the database. FieldCid = "cid" // FieldNullified holds the string denoting the nullified field in the database. FieldNullified = "nullified" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // Table holds the table name of the operation in the database. Table = "operations" ) // Columns holds all SQL columns for operation fields. var Columns = []string{ FieldID, FieldDid, FieldOperation, FieldCid, FieldNullified, 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 ( // DidValidator is a validator for the "did" field. It is called by the builders before save. DidValidator func(string) error // CidValidator is a validator for the "cid" field. It is called by the builders before save. CidValidator func(string) error // DefaultNullified holds the default value on creation for the "nullified" field. DefaultNullified bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time ) // OrderOption defines the ordering options for the Operation 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() } // ByDid orders the results by the did field. func ByDid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDid, opts...).ToFunc() } // ByCid orders the results by the cid field. func ByCid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCid, opts...).ToFunc() } // ByNullified orders the results by the nullified field. func ByNullified(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNullified, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() }