58 lines
1.6 KiB
Go
58 lines
1.6 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package user
|
|
|
|
const (
|
|
// Label holds the string label denoting the user type in the database.
|
|
Label = "user"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldServerid holds the string denoting the serverid field in the database.
|
|
FieldServerid = "serverid"
|
|
// FieldUserid holds the string denoting the userid field in the database.
|
|
FieldUserid = "userid"
|
|
// FieldUsername holds the string denoting the username field in the database.
|
|
FieldUsername = "username"
|
|
// FieldXp holds the string denoting the xp field in the database.
|
|
FieldXp = "xp"
|
|
// FieldLevel holds the string denoting the level field in the database.
|
|
FieldLevel = "level"
|
|
// FieldMsgs holds the string denoting the msgs field in the database.
|
|
FieldMsgs = "msgs"
|
|
// FieldCreated holds the string denoting the created field in the database.
|
|
FieldCreated = "created"
|
|
// Table holds the table name of the user in the database.
|
|
Table = "users"
|
|
)
|
|
|
|
// Columns holds all SQL columns for user fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldServerid,
|
|
FieldUserid,
|
|
FieldUsername,
|
|
FieldXp,
|
|
FieldLevel,
|
|
FieldMsgs,
|
|
FieldCreated,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultXp holds the default value on creation for the "xp" field.
|
|
DefaultXp int
|
|
// DefaultLevel holds the default value on creation for the "level" field.
|
|
DefaultLevel int
|
|
// DefaultMsgs holds the default value on creation for the "msgs" field.
|
|
DefaultMsgs int
|
|
)
|