99 lines
3.1 KiB
Go
99 lines
3.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package shopinvitations
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the shopinvitations type in the database.
|
|
Label = "shop_invitations"
|
|
// 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"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldInvitedBy holds the string denoting the invited_by field in the database.
|
|
FieldInvitedBy = "invited_by"
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldRespondedAt holds the string denoting the responded_at field in the database.
|
|
FieldRespondedAt = "responded_at"
|
|
// Table holds the table name of the shopinvitations in the database.
|
|
Table = "shop_invitations"
|
|
)
|
|
|
|
// Columns holds all SQL columns for shopinvitations fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldShopID,
|
|
FieldPlayerID,
|
|
FieldStatus,
|
|
FieldInvitedBy,
|
|
FieldCreatedAt,
|
|
FieldRespondedAt,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultStatus holds the default value on creation for the "status" field.
|
|
DefaultStatus string
|
|
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
|
StatusValidator func(string) error
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
DefaultCreatedAt func() time.Time
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the ShopInvitations 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()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByInvitedBy orders the results by the invited_by field.
|
|
func ByInvitedBy(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldInvitedBy, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRespondedAt orders the results by the responded_at field.
|
|
func ByRespondedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRespondedAt, opts...).ToFunc()
|
|
}
|