/
gameaccount.go
80 lines (74 loc) · 2.95 KB
/
gameaccount.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Code generated by ent, DO NOT EDIT.
package gameaccount
import (
"time"
)
const (
// Label holds the string label denoting the gameaccount type in the database.
Label = "game_account"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// FieldAccountID holds the string denoting the account_id field in the database.
FieldAccountID = "account_id"
// FieldGameToken holds the string denoting the game_token field in the database.
FieldGameToken = "game_token"
// FieldCookieToken holds the string denoting the cookie_token field in the database.
FieldCookieToken = "cookie_token"
// FieldStoken holds the string denoting the stoken field in the database.
FieldStoken = "stoken"
// FieldMid holds the string denoting the mid field in the database.
FieldMid = "mid"
// FieldCreateAt holds the string denoting the create_at field in the database.
FieldCreateAt = "create_at"
// FieldUpdateAt holds the string denoting the update_at field in the database.
FieldUpdateAt = "update_at"
// Table holds the table name of the gameaccount in the database.
Table = "game_accounts"
)
// Columns holds all SQL columns for gameaccount fields.
var Columns = []string{
FieldID,
FieldUserID,
FieldAccountID,
FieldGameToken,
FieldCookieToken,
FieldStoken,
FieldMid,
FieldCreateAt,
FieldUpdateAt,
}
// 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 (
// AccountIDValidator is a validator for the "account_id" field. It is called by the builders before save.
AccountIDValidator func(string) error
// DefaultGameToken holds the default value on creation for the "game_token" field.
DefaultGameToken string
// GameTokenValidator is a validator for the "game_token" field. It is called by the builders before save.
GameTokenValidator func(string) error
// DefaultCookieToken holds the default value on creation for the "cookie_token" field.
DefaultCookieToken string
// CookieTokenValidator is a validator for the "cookie_token" field. It is called by the builders before save.
CookieTokenValidator func(string) error
// DefaultStoken holds the default value on creation for the "stoken" field.
DefaultStoken string
// DefaultMid holds the default value on creation for the "mid" field.
DefaultMid string
// MidValidator is a validator for the "mid" field. It is called by the builders before save.
MidValidator func(string) error
// DefaultCreateAt holds the default value on creation for the "create_at" field.
DefaultCreateAt func() time.Time
// DefaultUpdateAt holds the default value on creation for the "update_at" field.
DefaultUpdateAt func() time.Time
// UpdateDefaultUpdateAt holds the default value on update for the "update_at" field.
UpdateDefaultUpdateAt func() time.Time
)