1
0
api/ent/runtime.go
2023-07-10 12:43:34 +09:00

122 lines
6.0 KiB
Go

// Code generated by ent, DO NOT EDIT.
package ent
import (
"t/ent/card"
"t/ent/group"
"t/ent/schema"
"t/ent/user"
"time"
)
// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
cardFields := schema.Card{}.Fields()
_ = cardFields
// cardDescPassword is the schema descriptor for password field.
cardDescPassword := cardFields[0].Descriptor()
// card.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
card.PasswordValidator = cardDescPassword.Validators[0].(func(string) error)
// cardDescCard is the schema descriptor for card field.
cardDescCard := cardFields[1].Descriptor()
// card.DefaultCard holds the default value on creation for the card field.
card.DefaultCard = cardDescCard.Default.(func() int)
// cardDescSkill is the schema descriptor for skill field.
cardDescSkill := cardFields[2].Descriptor()
// card.DefaultSkill holds the default value on creation for the skill field.
card.DefaultSkill = cardDescSkill.Default.(func() string)
// cardDescStatus is the schema descriptor for status field.
cardDescStatus := cardFields[3].Descriptor()
// card.DefaultStatus holds the default value on creation for the status field.
card.DefaultStatus = cardDescStatus.Default.(func() string)
// cardDescCp is the schema descriptor for cp field.
cardDescCp := cardFields[5].Descriptor()
// card.DefaultCp holds the default value on creation for the cp field.
card.DefaultCp = cardDescCp.Default.(func() int)
// cardDescURL is the schema descriptor for url field.
cardDescURL := cardFields[6].Descriptor()
// card.DefaultURL holds the default value on creation for the url field.
card.DefaultURL = cardDescURL.Default.(string)
// cardDescCreatedAt is the schema descriptor for created_at field.
cardDescCreatedAt := cardFields[7].Descriptor()
// card.DefaultCreatedAt holds the default value on creation for the created_at field.
card.DefaultCreatedAt = cardDescCreatedAt.Default.(func() time.Time)
groupFields := schema.Group{}.Fields()
_ = groupFields
// groupDescPassword is the schema descriptor for password field.
groupDescPassword := groupFields[1].Descriptor()
// group.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
group.PasswordValidator = groupDescPassword.Validators[0].(func(string) error)
userFields := schema.User{}.Fields()
_ = userFields
// userDescUsername is the schema descriptor for username field.
userDescUsername := userFields[0].Descriptor()
// user.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
user.UsernameValidator = func() func(string) error {
validators := userDescUsername.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(username string) error {
for _, fn := range fns {
if err := fn(username); err != nil {
return err
}
}
return nil
}
}()
// userDescBsky is the schema descriptor for bsky field.
userDescBsky := userFields[2].Descriptor()
// user.DefaultBsky holds the default value on creation for the bsky field.
user.DefaultBsky = userDescBsky.Default.(bool)
// userDescMastodon is the schema descriptor for mastodon field.
userDescMastodon := userFields[3].Descriptor()
// user.DefaultMastodon holds the default value on creation for the mastodon field.
user.DefaultMastodon = userDescMastodon.Default.(bool)
// userDescDelete is the schema descriptor for delete field.
userDescDelete := userFields[4].Descriptor()
// user.DefaultDelete holds the default value on creation for the delete field.
user.DefaultDelete = userDescDelete.Default.(bool)
// userDescHandle is the schema descriptor for handle field.
userDescHandle := userFields[5].Descriptor()
// user.DefaultHandle holds the default value on creation for the handle field.
user.DefaultHandle = userDescHandle.Default.(bool)
// userDescPassword is the schema descriptor for password field.
userDescPassword := userFields[7].Descriptor()
// user.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
user.PasswordValidator = userDescPassword.Validators[0].(func(string) error)
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userFields[8].Descriptor()
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
// userDescUpdatedAt is the schema descriptor for updated_at field.
userDescUpdatedAt := userFields[9].Descriptor()
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
// userDescRaidAt is the schema descriptor for raid_at field.
userDescRaidAt := userFields[10].Descriptor()
// user.DefaultRaidAt holds the default value on creation for the raid_at field.
user.DefaultRaidAt = userDescRaidAt.Default.(func() time.Time)
// userDescLuckAt is the schema descriptor for luck_at field.
userDescLuckAt := userFields[12].Descriptor()
// user.DefaultLuckAt holds the default value on creation for the luck_at field.
user.DefaultLuckAt = userDescLuckAt.Default.(func() time.Time)
// userDescLikeAt is the schema descriptor for like_at field.
userDescLikeAt := userFields[15].Descriptor()
// user.DefaultLikeAt holds the default value on creation for the like_at field.
user.DefaultLikeAt = userDescLikeAt.Default.(func() time.Time)
// userDescTenAt is the schema descriptor for ten_at field.
userDescTenAt := userFields[25].Descriptor()
// user.DefaultTenAt holds the default value on creation for the ten_at field.
user.DefaultTenAt = userDescTenAt.Default.(func() time.Time)
// userDescNext is the schema descriptor for next field.
userDescNext := userFields[26].Descriptor()
// user.DefaultNext holds the default value on creation for the next field.
user.DefaultNext = userDescNext.Default.(string)
}