2 Star 0 Fork 0

广东宇凌网络科技有限公司/simple-iot-basic-rpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
productevent.go 6.93 KB
一键复制 编辑 原始数据 按行查看 历史
HienGee 提交于 2024-04-26 11:19 +08:00 . init
// Code generated by ent, DO NOT EDIT.
package productevent
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the productevent type in the database.
Label = "product_event"
// 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"
// FieldProductKey holds the string denoting the productkey field in the database.
FieldProductKey = "product_key"
// FieldCreateTs holds the string denoting the createts field in the database.
FieldCreateTs = "create_ts"
// FieldVersion holds the string denoting the version field in the database.
FieldVersion = "version"
// FieldIdentifier holds the string denoting the identifier field in the database.
FieldIdentifier = "identifier"
// FieldEventName holds the string denoting the eventname field in the database.
FieldEventName = "event_name"
// FieldEventType holds the string denoting the eventtype field in the database.
FieldEventType = "event_type"
// FieldOutputData holds the string denoting the outputdata field in the database.
FieldOutputData = "output_data"
// FieldCustom holds the string denoting the custom field in the database.
FieldCustom = "custom"
// FieldRequired holds the string denoting the required field in the database.
FieldRequired = "required"
// EdgeProduct holds the string denoting the product edge name in mutations.
EdgeProduct = "product"
// Table holds the table name of the productevent in the database.
Table = "equip_product_events"
// ProductTable is the table that holds the product relation/edge.
ProductTable = "equip_product_events"
// ProductInverseTable is the table name for the Product entity.
// It exists in this package in order to avoid circular dependency with the "product" package.
ProductInverseTable = "equip_products"
// ProductColumn is the table column denoting the product relation/edge.
ProductColumn = "product_events"
)
// Columns holds all SQL columns for productevent fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldStatus,
FieldSort,
FieldProductKey,
FieldCreateTs,
FieldVersion,
FieldIdentifier,
FieldEventName,
FieldEventType,
FieldOutputData,
FieldCustom,
FieldRequired,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "equip_product_events"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"product_events",
}
// 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
}
}
for i := range ForeignKeys {
if column == ForeignKeys[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
// DefaultEventType holds the default value on creation for the "eventType" field.
DefaultEventType string
// DefaultCustom holds the default value on creation for the "custom" field.
DefaultCustom bool
// DefaultRequired holds the default value on creation for the "required" field.
DefaultRequired bool
)
// OrderOption defines the ordering options for the ProductEvent 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()
}
// ByProductKey orders the results by the productKey field.
func ByProductKey(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductKey, opts...).ToFunc()
}
// ByCreateTs orders the results by the createTs field.
func ByCreateTs(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreateTs, opts...).ToFunc()
}
// ByVersion orders the results by the version field.
func ByVersion(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVersion, opts...).ToFunc()
}
// ByIdentifier orders the results by the identifier field.
func ByIdentifier(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIdentifier, opts...).ToFunc()
}
// ByEventName orders the results by the eventName field.
func ByEventName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEventName, opts...).ToFunc()
}
// ByEventType orders the results by the eventType field.
func ByEventType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEventType, opts...).ToFunc()
}
// ByOutputData orders the results by the outputData field.
func ByOutputData(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOutputData, opts...).ToFunc()
}
// ByCustom orders the results by the custom field.
func ByCustom(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCustom, opts...).ToFunc()
}
// ByRequired orders the results by the required field.
func ByRequired(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRequired, opts...).ToFunc()
}
// ByProductField orders the results by product field.
func ByProductField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newProductStep(), sql.OrderByField(field, opts...))
}
}
func newProductStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(ProductInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, ProductTable, ProductColumn),
)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/yuLingNet/simple-iot-basic-rpc.git
git@gitee.com:yuLingNet/simple-iot-basic-rpc.git
yuLingNet
simple-iot-basic-rpc
simple-iot-basic-rpc
ca5a4cf0cee7

搜索帮助