1
0
api/ent/user/user.go

144 lines
5.0 KiB
Go
Raw Normal View History

2022-08-31 07:49:08 +00:00
// Code generated by ent, DO NOT EDIT.
package user
import (
"time"
)
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"
// FieldUsername holds the string denoting the username field in the database.
FieldUsername = "username"
2023-04-13 07:50:11 +00:00
// FieldDid holds the string denoting the did field in the database.
FieldDid = "did"
2023-05-01 14:00:17 +00:00
// FieldDelete holds the string denoting the delete field in the database.
FieldDelete = "delete"
2023-04-18 12:18:38 +00:00
// FieldToken holds the string denoting the token field in the database.
FieldToken = "token"
2023-04-05 06:05:14 +00:00
// FieldPassword holds the string denoting the password field in the database.
FieldPassword = "password"
2022-08-31 07:49:08 +00:00
// 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"
2023-05-24 09:36:44 +00:00
// FieldRaidAt holds the string denoting the raid_at field in the database.
FieldRaidAt = "raid_at"
// FieldLuck holds the string denoting the luck field in the database.
FieldLuck = "luck"
// FieldLuckAt holds the string denoting the luck_at field in the database.
FieldLuckAt = "luck_at"
// FieldLike holds the string denoting the like field in the database.
FieldLike = "like"
// FieldLikeRank holds the string denoting the like_rank field in the database.
FieldLikeRank = "like_rank"
// FieldLikeAt holds the string denoting the like_at field in the database.
FieldLikeAt = "like_at"
// FieldTen holds the string denoting the ten field in the database.
FieldTen = "ten"
// FieldTenSu holds the string denoting the ten_su field in the database.
FieldTenSu = "ten_su"
// FieldTenKai holds the string denoting the ten_kai field in the database.
FieldTenKai = "ten_kai"
// FieldAiten holds the string denoting the aiten field in the database.
FieldAiten = "aiten"
// FieldTenCard holds the string denoting the ten_card field in the database.
FieldTenCard = "ten_card"
// FieldTenDelete holds the string denoting the ten_delete field in the database.
FieldTenDelete = "ten_delete"
// FieldTenPost holds the string denoting the ten_post field in the database.
FieldTenPost = "ten_post"
// FieldTenGet holds the string denoting the ten_get field in the database.
FieldTenGet = "ten_get"
// FieldTenAt holds the string denoting the ten_at field in the database.
FieldTenAt = "ten_at"
2022-08-31 07:49:08 +00:00
// FieldNext holds the string denoting the next field in the database.
FieldNext = "next"
// EdgeCard holds the string denoting the card edge name in mutations.
EdgeCard = "card"
// Table holds the table name of the user in the database.
Table = "users"
// CardTable is the table that holds the card relation/edge.
CardTable = "cards"
// CardInverseTable is the table name for the Card entity.
// It exists in this package in order to avoid circular dependency with the "card" package.
CardInverseTable = "cards"
// CardColumn is the table column denoting the card relation/edge.
CardColumn = "user_card"
)
// Columns holds all SQL columns for user fields.
var Columns = []string{
FieldID,
FieldUsername,
2023-04-13 07:50:11 +00:00
FieldDid,
2023-05-01 14:00:17 +00:00
FieldDelete,
2023-04-18 12:18:38 +00:00
FieldToken,
2023-04-05 06:05:14 +00:00
FieldPassword,
2022-08-31 07:49:08 +00:00
FieldCreatedAt,
FieldUpdatedAt,
2023-05-24 09:36:44 +00:00
FieldRaidAt,
FieldLuck,
FieldLuckAt,
FieldLike,
FieldLikeRank,
FieldLikeAt,
FieldTen,
FieldTenSu,
FieldTenKai,
FieldAiten,
FieldTenCard,
FieldTenDelete,
FieldTenPost,
FieldTenGet,
FieldTenAt,
2022-08-31 07:49:08 +00:00
FieldNext,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "users"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"group_users",
}
// 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
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}
var (
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
UsernameValidator func(string) error
2023-05-01 14:00:17 +00:00
// DefaultDelete holds the default value on creation for the "delete" field.
DefaultDelete bool
2023-04-05 06:05:14 +00:00
// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
PasswordValidator func(string) error
2022-08-31 07:49:08 +00:00
// 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
2023-05-24 09:36:44 +00:00
// DefaultRaidAt holds the default value on creation for the "raid_at" field.
DefaultRaidAt func() time.Time
// DefaultLuckAt holds the default value on creation for the "luck_at" field.
DefaultLuckAt func() time.Time
// DefaultLikeAt holds the default value on creation for the "like_at" field.
DefaultLikeAt func() time.Time
// DefaultTenAt holds the default value on creation for the "ten_at" field.
DefaultTenAt func() time.Time
2022-08-31 07:49:08 +00:00
// DefaultNext holds the default value on creation for the "next" field.
DefaultNext string
)