137 lines
4.3 KiB
Go
137 lines
4.3 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package accesscontrol
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the accesscontrol type in the database.
|
|
Label = "access_control"
|
|
// 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"
|
|
// FieldPtype holds the string denoting the ptype field in the database.
|
|
FieldPtype = "ptype"
|
|
// FieldV0 holds the string denoting the v0 field in the database.
|
|
FieldV0 = "v0"
|
|
// FieldV1 holds the string denoting the v1 field in the database.
|
|
FieldV1 = "v1"
|
|
// FieldV2 holds the string denoting the v2 field in the database.
|
|
FieldV2 = "v2"
|
|
// FieldV3 holds the string denoting the v3 field in the database.
|
|
FieldV3 = "v3"
|
|
// FieldV4 holds the string denoting the v4 field in the database.
|
|
FieldV4 = "v4"
|
|
// FieldV5 holds the string denoting the v5 field in the database.
|
|
FieldV5 = "v5"
|
|
// Table holds the table name of the accesscontrol in the database.
|
|
Table = "access_controls"
|
|
)
|
|
|
|
// Columns holds all SQL columns for accesscontrol fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
FieldPtype,
|
|
FieldV0,
|
|
FieldV1,
|
|
FieldV2,
|
|
FieldV3,
|
|
FieldV4,
|
|
FieldV5,
|
|
}
|
|
|
|
// 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
|
|
// DefaultPtype holds the default value on creation for the "ptype" field.
|
|
DefaultPtype string
|
|
// DefaultV0 holds the default value on creation for the "v0" field.
|
|
DefaultV0 string
|
|
// DefaultV1 holds the default value on creation for the "v1" field.
|
|
DefaultV1 string
|
|
// DefaultV2 holds the default value on creation for the "v2" field.
|
|
DefaultV2 string
|
|
// DefaultV3 holds the default value on creation for the "v3" field.
|
|
DefaultV3 string
|
|
// DefaultV4 holds the default value on creation for the "v4" field.
|
|
DefaultV4 string
|
|
// DefaultV5 holds the default value on creation for the "v5" field.
|
|
DefaultV5 string
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the AccessControl 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()
|
|
}
|
|
|
|
// ByPtype orders the results by the ptype field.
|
|
func ByPtype(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPtype, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV0 orders the results by the v0 field.
|
|
func ByV0(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV0, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV1 orders the results by the v1 field.
|
|
func ByV1(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV1, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV2 orders the results by the v2 field.
|
|
func ByV2(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV2, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV3 orders the results by the v3 field.
|
|
func ByV3(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV3, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV4 orders the results by the v4 field.
|
|
func ByV4(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV4, opts...).ToFunc()
|
|
}
|
|
|
|
// ByV5 orders the results by the v5 field.
|
|
func ByV5(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldV5, opts...).ToFunc()
|
|
}
|