Files
oceanbase/tools/ob-configserver/ent/obcluster/obcluster.go
2022-05-30 16:44:36 +08:00

61 lines
1.9 KiB
Go

// Code generated by entc, DO NOT EDIT.
package obcluster
import (
"time"
)
const (
// Label holds the string label denoting the obcluster type in the database.
Label = "ob_cluster"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreateTime holds the string denoting the create_time field in the database.
FieldCreateTime = "create_time"
// FieldUpdateTime holds the string denoting the update_time field in the database.
FieldUpdateTime = "update_time"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldObClusterID holds the string denoting the ob_cluster_id field in the database.
FieldObClusterID = "ob_cluster_id"
// FieldType holds the string denoting the type field in the database.
FieldType = "type"
// FieldRootserviceJSON holds the string denoting the rootservice_json field in the database.
FieldRootserviceJSON = "rootservice_json"
// Table holds the table name of the obcluster in the database.
Table = "ob_clusters"
)
// Columns holds all SQL columns for obcluster fields.
var Columns = []string{
FieldID,
FieldCreateTime,
FieldUpdateTime,
FieldName,
FieldObClusterID,
FieldType,
FieldRootserviceJSON,
}
// 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 (
// DefaultCreateTime holds the default value on creation for the "create_time" field.
DefaultCreateTime func() time.Time
// DefaultUpdateTime holds the default value on creation for the "update_time" field.
DefaultUpdateTime func() time.Time
// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
UpdateDefaultUpdateTime func() time.Time
// ObClusterIDValidator is a validator for the "ob_cluster_id" field. It is called by the builders before save.
ObClusterIDValidator func(int64) error
)