// Code generated by ent, DO NOT EDIT. package labellog import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the labellog type in the database. Label = "label_log" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldLabelName holds the string denoting the label_name field in the database. FieldLabelName = "label_name" // FieldLabelID holds the string denoting the label_id field in the database. FieldLabelID = "label_id" // FieldWxID holds the string denoting the wx_id field in the database. FieldWxID = "wx_id" // FieldOrganizationID holds the string denoting the organization_id field in the database. FieldOrganizationID = "organization_id" // Table holds the table name of the labellog in the database. Table = "label_log" ) // Columns holds all SQL columns for labellog fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldLabelName, FieldLabelID, FieldWxID, FieldOrganizationID, } // 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 // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultLabelName holds the default value on creation for the "label_name" field. DefaultLabelName string // DefaultLabelID holds the default value on creation for the "label_id" field. DefaultLabelID int // DefaultWxID holds the default value on creation for the "wx_id" field. DefaultWxID string // DefaultOrganizationID holds the default value on creation for the "organization_id" field. DefaultOrganizationID uint64 ) // OrderOption defines the ordering options for the LabelLog 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() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() } // ByUpdatedAt orders the results by the updated_at field. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() } // ByLabelName orders the results by the label_name field. func ByLabelName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLabelName, opts...).ToFunc() } // ByLabelID orders the results by the label_id field. func ByLabelID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLabelID, opts...).ToFunc() } // ByWxID orders the results by the wx_id field. func ByWxID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldWxID, opts...).ToFunc() } // ByOrganizationID orders the results by the organization_id field. func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOrganizationID, opts...).ToFunc() }