代码拉取完成,页面将自动刷新
// Code generated by ent, DO NOT EDIT.
package deviceupsterstatistics
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the deviceupsterstatistics type in the database.
Label = "device_upster_statistics"
// 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"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldSort holds the string denoting the sort field in the database.
FieldSort = "sort"
// FieldIotID holds the string denoting the iotid field in the database.
FieldIotID = "iot_id"
// FieldDeviceName holds the string denoting the devicename field in the database.
FieldDeviceName = "device_name"
// FieldProductKey holds the string denoting the productkey field in the database.
FieldProductKey = "product_key"
// FieldDate holds the string denoting the date field in the database.
FieldDate = "date"
// FieldTimestamp holds the string denoting the timestamp field in the database.
FieldTimestamp = "timestamp"
// FieldNumber1 holds the string denoting the number1 field in the database.
FieldNumber1 = "number1"
// FieldNumber2 holds the string denoting the number2 field in the database.
FieldNumber2 = "number2"
// FieldNumber3 holds the string denoting the number3 field in the database.
FieldNumber3 = "number3"
// FieldNumberCycles holds the string denoting the numbercycles field in the database.
FieldNumberCycles = "number_cycles"
// FieldHours holds the string denoting the hours field in the database.
FieldHours = "hours"
// FieldInitialize holds the string denoting the initialize field in the database.
FieldInitialize = "initialize"
// Table holds the table name of the deviceupsterstatistics in the database.
Table = "thing_upster_statistics"
)
// Columns holds all SQL columns for deviceupsterstatistics fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldStatus,
FieldSort,
FieldIotID,
FieldDeviceName,
FieldProductKey,
FieldDate,
FieldTimestamp,
FieldNumber1,
FieldNumber2,
FieldNumber3,
FieldNumberCycles,
FieldHours,
FieldInitialize,
}
// 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
// DefaultStatus holds the default value on creation for the "status" field.
DefaultStatus uint8
// DefaultSort holds the default value on creation for the "sort" field.
DefaultSort uint32
// DefaultInitialize holds the default value on creation for the "initialize" field.
DefaultInitialize bool
)
// OrderOption defines the ordering options for the DeviceUpsterStatistics 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()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// BySort orders the results by the sort field.
func BySort(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSort, opts...).ToFunc()
}
// ByIotID orders the results by the iotID field.
func ByIotID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIotID, opts...).ToFunc()
}
// ByDeviceName orders the results by the deviceName field.
func ByDeviceName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeviceName, opts...).ToFunc()
}
// ByProductKey orders the results by the productKey field.
func ByProductKey(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductKey, opts...).ToFunc()
}
// ByDate orders the results by the date field.
func ByDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDate, opts...).ToFunc()
}
// ByTimestamp orders the results by the timestamp field.
func ByTimestamp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTimestamp, opts...).ToFunc()
}
// ByNumber1 orders the results by the number1 field.
func ByNumber1(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNumber1, opts...).ToFunc()
}
// ByNumber2 orders the results by the number2 field.
func ByNumber2(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNumber2, opts...).ToFunc()
}
// ByNumber3 orders the results by the number3 field.
func ByNumber3(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNumber3, opts...).ToFunc()
}
// ByNumberCycles orders the results by the numberCycles field.
func ByNumberCycles(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNumberCycles, opts...).ToFunc()
}
// ByHours orders the results by the hours field.
func ByHours(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHours, opts...).ToFunc()
}
// ByInitialize orders the results by the initialize field.
func ByInitialize(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInitialize, opts...).ToFunc()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。