89 lines
2.6 KiB
Go
89 lines
2.6 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package shopplayers
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the shopplayers type in the database.
|
|
Label = "shop_players"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldShopID holds the string denoting the shop_id field in the database.
|
|
FieldShopID = "shop_id"
|
|
// FieldPlayerID holds the string denoting the player_id field in the database.
|
|
FieldPlayerID = "player_id"
|
|
// FieldIsPrimary holds the string denoting the is_primary field in the database.
|
|
FieldIsPrimary = "is_primary"
|
|
// FieldJoinedAt holds the string denoting the joined_at field in the database.
|
|
FieldJoinedAt = "joined_at"
|
|
// FieldLeftAt holds the string denoting the left_at field in the database.
|
|
FieldLeftAt = "left_at"
|
|
// Table holds the table name of the shopplayers in the database.
|
|
Table = "shop_players"
|
|
)
|
|
|
|
// Columns holds all SQL columns for shopplayers fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldShopID,
|
|
FieldPlayerID,
|
|
FieldIsPrimary,
|
|
FieldJoinedAt,
|
|
FieldLeftAt,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultIsPrimary holds the default value on creation for the "is_primary" field.
|
|
DefaultIsPrimary bool
|
|
// DefaultJoinedAt holds the default value on creation for the "joined_at" field.
|
|
DefaultJoinedAt func() time.Time
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the ShopPlayers 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()
|
|
}
|
|
|
|
// ByShopID orders the results by the shop_id field.
|
|
func ByShopID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldShopID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPlayerID orders the results by the player_id field.
|
|
func ByPlayerID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPlayerID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByIsPrimary orders the results by the is_primary field.
|
|
func ByIsPrimary(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldIsPrimary, opts...).ToFunc()
|
|
}
|
|
|
|
// ByJoinedAt orders the results by the joined_at field.
|
|
func ByJoinedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldJoinedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByLeftAt orders the results by the left_at field.
|
|
func ByLeftAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldLeftAt, opts...).ToFunc()
|
|
}
|