runtime.go•52.8 kB
// Code generated by ent, DO NOT EDIT.
package ent
import (
"time"
"github.com/Southclaws/lexorank"
"github.com/Southclaws/storyden/internal/ent/account"
"github.com/Southclaws/storyden/internal/ent/accountfollow"
"github.com/Southclaws/storyden/internal/ent/accountroles"
"github.com/Southclaws/storyden/internal/ent/asset"
"github.com/Southclaws/storyden/internal/ent/authentication"
"github.com/Southclaws/storyden/internal/ent/category"
"github.com/Southclaws/storyden/internal/ent/collection"
"github.com/Southclaws/storyden/internal/ent/collectionnode"
"github.com/Southclaws/storyden/internal/ent/collectionpost"
"github.com/Southclaws/storyden/internal/ent/email"
"github.com/Southclaws/storyden/internal/ent/event"
"github.com/Southclaws/storyden/internal/ent/eventparticipant"
"github.com/Southclaws/storyden/internal/ent/invitation"
"github.com/Southclaws/storyden/internal/ent/likepost"
"github.com/Southclaws/storyden/internal/ent/link"
"github.com/Southclaws/storyden/internal/ent/mentionprofile"
"github.com/Southclaws/storyden/internal/ent/node"
"github.com/Southclaws/storyden/internal/ent/notification"
"github.com/Southclaws/storyden/internal/ent/post"
"github.com/Southclaws/storyden/internal/ent/postread"
"github.com/Southclaws/storyden/internal/ent/property"
"github.com/Southclaws/storyden/internal/ent/propertyschema"
"github.com/Southclaws/storyden/internal/ent/propertyschemafield"
"github.com/Southclaws/storyden/internal/ent/question"
"github.com/Southclaws/storyden/internal/ent/react"
"github.com/Southclaws/storyden/internal/ent/report"
"github.com/Southclaws/storyden/internal/ent/role"
"github.com/Southclaws/storyden/internal/ent/schema"
"github.com/Southclaws/storyden/internal/ent/session"
"github.com/Southclaws/storyden/internal/ent/setting"
"github.com/Southclaws/storyden/internal/ent/tag"
"github.com/rs/xid"
)
// 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() {
accountMixin := schema.Account{}.Mixin()
accountMixinFields0 := accountMixin[0].Fields()
_ = accountMixinFields0
accountMixinFields1 := accountMixin[1].Fields()
_ = accountMixinFields1
accountMixinFields2 := accountMixin[2].Fields()
_ = accountMixinFields2
accountFields := schema.Account{}.Fields()
_ = accountFields
// accountDescCreatedAt is the schema descriptor for created_at field.
accountDescCreatedAt := accountMixinFields1[0].Descriptor()
// account.DefaultCreatedAt holds the default value on creation for the created_at field.
account.DefaultCreatedAt = accountDescCreatedAt.Default.(func() time.Time)
// accountDescUpdatedAt is the schema descriptor for updated_at field.
accountDescUpdatedAt := accountMixinFields2[0].Descriptor()
// account.DefaultUpdatedAt holds the default value on creation for the updated_at field.
account.DefaultUpdatedAt = accountDescUpdatedAt.Default.(func() time.Time)
// account.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
account.UpdateDefaultUpdatedAt = accountDescUpdatedAt.UpdateDefault.(func() time.Time)
// accountDescHandle is the schema descriptor for handle field.
accountDescHandle := accountFields[0].Descriptor()
// account.HandleValidator is a validator for the "handle" field. It is called by the builders before save.
account.HandleValidator = accountDescHandle.Validators[0].(func(string) error)
// accountDescName is the schema descriptor for name field.
accountDescName := accountFields[1].Descriptor()
// account.NameValidator is a validator for the "name" field. It is called by the builders before save.
account.NameValidator = accountDescName.Validators[0].(func(string) error)
// accountDescAdmin is the schema descriptor for admin field.
accountDescAdmin := accountFields[4].Descriptor()
// account.DefaultAdmin holds the default value on creation for the admin field.
account.DefaultAdmin = accountDescAdmin.Default.(bool)
// accountDescID is the schema descriptor for id field.
accountDescID := accountMixinFields0[0].Descriptor()
// account.DefaultID holds the default value on creation for the id field.
account.DefaultID = accountDescID.Default.(func() xid.ID)
// account.IDValidator is a validator for the "id" field. It is called by the builders before save.
account.IDValidator = func() func(string) error {
validators := accountDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
accountfollowMixin := schema.AccountFollow{}.Mixin()
accountfollowMixinFields0 := accountfollowMixin[0].Fields()
_ = accountfollowMixinFields0
accountfollowMixinFields1 := accountfollowMixin[1].Fields()
_ = accountfollowMixinFields1
accountfollowFields := schema.AccountFollow{}.Fields()
_ = accountfollowFields
// accountfollowDescCreatedAt is the schema descriptor for created_at field.
accountfollowDescCreatedAt := accountfollowMixinFields1[0].Descriptor()
// accountfollow.DefaultCreatedAt holds the default value on creation for the created_at field.
accountfollow.DefaultCreatedAt = accountfollowDescCreatedAt.Default.(func() time.Time)
// accountfollowDescID is the schema descriptor for id field.
accountfollowDescID := accountfollowMixinFields0[0].Descriptor()
// accountfollow.DefaultID holds the default value on creation for the id field.
accountfollow.DefaultID = accountfollowDescID.Default.(func() xid.ID)
// accountfollow.IDValidator is a validator for the "id" field. It is called by the builders before save.
accountfollow.IDValidator = func() func(string) error {
validators := accountfollowDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
accountrolesMixin := schema.AccountRoles{}.Mixin()
accountrolesMixinFields0 := accountrolesMixin[0].Fields()
_ = accountrolesMixinFields0
accountrolesMixinFields1 := accountrolesMixin[1].Fields()
_ = accountrolesMixinFields1
accountrolesFields := schema.AccountRoles{}.Fields()
_ = accountrolesFields
// accountrolesDescCreatedAt is the schema descriptor for created_at field.
accountrolesDescCreatedAt := accountrolesMixinFields1[0].Descriptor()
// accountroles.DefaultCreatedAt holds the default value on creation for the created_at field.
accountroles.DefaultCreatedAt = accountrolesDescCreatedAt.Default.(func() time.Time)
// accountrolesDescID is the schema descriptor for id field.
accountrolesDescID := accountrolesMixinFields0[0].Descriptor()
// accountroles.DefaultID holds the default value on creation for the id field.
accountroles.DefaultID = accountrolesDescID.Default.(func() xid.ID)
// accountroles.IDValidator is a validator for the "id" field. It is called by the builders before save.
accountroles.IDValidator = func() func(string) error {
validators := accountrolesDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
assetMixin := schema.Asset{}.Mixin()
assetMixinFields0 := assetMixin[0].Fields()
_ = assetMixinFields0
assetMixinFields1 := assetMixin[1].Fields()
_ = assetMixinFields1
assetMixinFields2 := assetMixin[2].Fields()
_ = assetMixinFields2
assetFields := schema.Asset{}.Fields()
_ = assetFields
// assetDescCreatedAt is the schema descriptor for created_at field.
assetDescCreatedAt := assetMixinFields1[0].Descriptor()
// asset.DefaultCreatedAt holds the default value on creation for the created_at field.
asset.DefaultCreatedAt = assetDescCreatedAt.Default.(func() time.Time)
// assetDescUpdatedAt is the schema descriptor for updated_at field.
assetDescUpdatedAt := assetMixinFields2[0].Descriptor()
// asset.DefaultUpdatedAt holds the default value on creation for the updated_at field.
asset.DefaultUpdatedAt = assetDescUpdatedAt.Default.(func() time.Time)
// asset.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
asset.UpdateDefaultUpdatedAt = assetDescUpdatedAt.UpdateDefault.(func() time.Time)
// assetDescID is the schema descriptor for id field.
assetDescID := assetMixinFields0[0].Descriptor()
// asset.DefaultID holds the default value on creation for the id field.
asset.DefaultID = assetDescID.Default.(func() xid.ID)
// asset.IDValidator is a validator for the "id" field. It is called by the builders before save.
asset.IDValidator = func() func(string) error {
validators := assetDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
authenticationMixin := schema.Authentication{}.Mixin()
authenticationMixinFields0 := authenticationMixin[0].Fields()
_ = authenticationMixinFields0
authenticationMixinFields1 := authenticationMixin[1].Fields()
_ = authenticationMixinFields1
authenticationFields := schema.Authentication{}.Fields()
_ = authenticationFields
// authenticationDescCreatedAt is the schema descriptor for created_at field.
authenticationDescCreatedAt := authenticationMixinFields1[0].Descriptor()
// authentication.DefaultCreatedAt holds the default value on creation for the created_at field.
authentication.DefaultCreatedAt = authenticationDescCreatedAt.Default.(func() time.Time)
// authenticationDescService is the schema descriptor for service field.
authenticationDescService := authenticationFields[0].Descriptor()
// authentication.ServiceValidator is a validator for the "service" field. It is called by the builders before save.
authentication.ServiceValidator = authenticationDescService.Validators[0].(func(string) error)
// authenticationDescTokenType is the schema descriptor for token_type field.
authenticationDescTokenType := authenticationFields[1].Descriptor()
// authentication.TokenTypeValidator is a validator for the "token_type" field. It is called by the builders before save.
authentication.TokenTypeValidator = authenticationDescTokenType.Validators[0].(func(string) error)
// authenticationDescToken is the schema descriptor for token field.
authenticationDescToken := authenticationFields[3].Descriptor()
// authentication.TokenValidator is a validator for the "token" field. It is called by the builders before save.
authentication.TokenValidator = authenticationDescToken.Validators[0].(func(string) error)
// authenticationDescDisabled is the schema descriptor for disabled field.
authenticationDescDisabled := authenticationFields[5].Descriptor()
// authentication.DefaultDisabled holds the default value on creation for the disabled field.
authentication.DefaultDisabled = authenticationDescDisabled.Default.(bool)
// authenticationDescID is the schema descriptor for id field.
authenticationDescID := authenticationMixinFields0[0].Descriptor()
// authentication.DefaultID holds the default value on creation for the id field.
authentication.DefaultID = authenticationDescID.Default.(func() xid.ID)
// authentication.IDValidator is a validator for the "id" field. It is called by the builders before save.
authentication.IDValidator = func() func(string) error {
validators := authenticationDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
categoryMixin := schema.Category{}.Mixin()
categoryMixinFields0 := categoryMixin[0].Fields()
_ = categoryMixinFields0
categoryMixinFields1 := categoryMixin[1].Fields()
_ = categoryMixinFields1
categoryMixinFields2 := categoryMixin[2].Fields()
_ = categoryMixinFields2
categoryFields := schema.Category{}.Fields()
_ = categoryFields
// categoryDescCreatedAt is the schema descriptor for created_at field.
categoryDescCreatedAt := categoryMixinFields1[0].Descriptor()
// category.DefaultCreatedAt holds the default value on creation for the created_at field.
category.DefaultCreatedAt = categoryDescCreatedAt.Default.(func() time.Time)
// categoryDescUpdatedAt is the schema descriptor for updated_at field.
categoryDescUpdatedAt := categoryMixinFields2[0].Descriptor()
// category.DefaultUpdatedAt holds the default value on creation for the updated_at field.
category.DefaultUpdatedAt = categoryDescUpdatedAt.Default.(func() time.Time)
// category.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
category.UpdateDefaultUpdatedAt = categoryDescUpdatedAt.UpdateDefault.(func() time.Time)
// categoryDescDescription is the schema descriptor for description field.
categoryDescDescription := categoryFields[2].Descriptor()
// category.DefaultDescription holds the default value on creation for the description field.
category.DefaultDescription = categoryDescDescription.Default.(string)
// categoryDescColour is the schema descriptor for colour field.
categoryDescColour := categoryFields[3].Descriptor()
// category.DefaultColour holds the default value on creation for the colour field.
category.DefaultColour = categoryDescColour.Default.(string)
// categoryDescSort is the schema descriptor for sort field.
categoryDescSort := categoryFields[4].Descriptor()
// category.DefaultSort holds the default value on creation for the sort field.
category.DefaultSort = categoryDescSort.Default.(int)
// categoryDescAdmin is the schema descriptor for admin field.
categoryDescAdmin := categoryFields[5].Descriptor()
// category.DefaultAdmin holds the default value on creation for the admin field.
category.DefaultAdmin = categoryDescAdmin.Default.(bool)
// categoryDescID is the schema descriptor for id field.
categoryDescID := categoryMixinFields0[0].Descriptor()
// category.DefaultID holds the default value on creation for the id field.
category.DefaultID = categoryDescID.Default.(func() xid.ID)
// category.IDValidator is a validator for the "id" field. It is called by the builders before save.
category.IDValidator = func() func(string) error {
validators := categoryDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
collectionMixin := schema.Collection{}.Mixin()
collectionMixinFields0 := collectionMixin[0].Fields()
_ = collectionMixinFields0
collectionMixinFields1 := collectionMixin[1].Fields()
_ = collectionMixinFields1
collectionMixinFields2 := collectionMixin[2].Fields()
_ = collectionMixinFields2
collectionFields := schema.Collection{}.Fields()
_ = collectionFields
// collectionDescCreatedAt is the schema descriptor for created_at field.
collectionDescCreatedAt := collectionMixinFields1[0].Descriptor()
// collection.DefaultCreatedAt holds the default value on creation for the created_at field.
collection.DefaultCreatedAt = collectionDescCreatedAt.Default.(func() time.Time)
// collectionDescUpdatedAt is the schema descriptor for updated_at field.
collectionDescUpdatedAt := collectionMixinFields2[0].Descriptor()
// collection.DefaultUpdatedAt holds the default value on creation for the updated_at field.
collection.DefaultUpdatedAt = collectionDescUpdatedAt.Default.(func() time.Time)
// collection.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
collection.UpdateDefaultUpdatedAt = collectionDescUpdatedAt.UpdateDefault.(func() time.Time)
// collectionDescID is the schema descriptor for id field.
collectionDescID := collectionMixinFields0[0].Descriptor()
// collection.DefaultID holds the default value on creation for the id field.
collection.DefaultID = collectionDescID.Default.(func() xid.ID)
// collection.IDValidator is a validator for the "id" field. It is called by the builders before save.
collection.IDValidator = func() func(string) error {
validators := collectionDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
collectionnodeMixin := schema.CollectionNode{}.Mixin()
collectionnodeMixinFields0 := collectionnodeMixin[0].Fields()
_ = collectionnodeMixinFields0
collectionnodeFields := schema.CollectionNode{}.Fields()
_ = collectionnodeFields
// collectionnodeDescCreatedAt is the schema descriptor for created_at field.
collectionnodeDescCreatedAt := collectionnodeMixinFields0[0].Descriptor()
// collectionnode.DefaultCreatedAt holds the default value on creation for the created_at field.
collectionnode.DefaultCreatedAt = collectionnodeDescCreatedAt.Default.(func() time.Time)
// collectionnodeDescCollectionID is the schema descriptor for collection_id field.
collectionnodeDescCollectionID := collectionnodeFields[0].Descriptor()
// collectionnode.DefaultCollectionID holds the default value on creation for the collection_id field.
collectionnode.DefaultCollectionID = collectionnodeDescCollectionID.Default.(func() xid.ID)
// collectionnode.CollectionIDValidator is a validator for the "collection_id" field. It is called by the builders before save.
collectionnode.CollectionIDValidator = func() func(string) error {
validators := collectionnodeDescCollectionID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(collection string) error {
for _, fn := range fns {
if err := fn(collection); err != nil {
return err
}
}
return nil
}
}()
// collectionnodeDescNodeID is the schema descriptor for node_id field.
collectionnodeDescNodeID := collectionnodeFields[1].Descriptor()
// collectionnode.DefaultNodeID holds the default value on creation for the node_id field.
collectionnode.DefaultNodeID = collectionnodeDescNodeID.Default.(func() xid.ID)
// collectionnode.NodeIDValidator is a validator for the "node_id" field. It is called by the builders before save.
collectionnode.NodeIDValidator = func() func(string) error {
validators := collectionnodeDescNodeID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(node string) error {
for _, fn := range fns {
if err := fn(node); err != nil {
return err
}
}
return nil
}
}()
// collectionnodeDescMembershipType is the schema descriptor for membership_type field.
collectionnodeDescMembershipType := collectionnodeFields[2].Descriptor()
// collectionnode.DefaultMembershipType holds the default value on creation for the membership_type field.
collectionnode.DefaultMembershipType = collectionnodeDescMembershipType.Default.(string)
collectionpostMixin := schema.CollectionPost{}.Mixin()
collectionpostMixinFields0 := collectionpostMixin[0].Fields()
_ = collectionpostMixinFields0
collectionpostFields := schema.CollectionPost{}.Fields()
_ = collectionpostFields
// collectionpostDescCreatedAt is the schema descriptor for created_at field.
collectionpostDescCreatedAt := collectionpostMixinFields0[0].Descriptor()
// collectionpost.DefaultCreatedAt holds the default value on creation for the created_at field.
collectionpost.DefaultCreatedAt = collectionpostDescCreatedAt.Default.(func() time.Time)
// collectionpostDescCollectionID is the schema descriptor for collection_id field.
collectionpostDescCollectionID := collectionpostFields[0].Descriptor()
// collectionpost.DefaultCollectionID holds the default value on creation for the collection_id field.
collectionpost.DefaultCollectionID = collectionpostDescCollectionID.Default.(func() xid.ID)
// collectionpost.CollectionIDValidator is a validator for the "collection_id" field. It is called by the builders before save.
collectionpost.CollectionIDValidator = func() func(string) error {
validators := collectionpostDescCollectionID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(collection string) error {
for _, fn := range fns {
if err := fn(collection); err != nil {
return err
}
}
return nil
}
}()
// collectionpostDescPostID is the schema descriptor for post_id field.
collectionpostDescPostID := collectionpostFields[1].Descriptor()
// collectionpost.DefaultPostID holds the default value on creation for the post_id field.
collectionpost.DefaultPostID = collectionpostDescPostID.Default.(func() xid.ID)
// collectionpost.PostIDValidator is a validator for the "post_id" field. It is called by the builders before save.
collectionpost.PostIDValidator = func() func(string) error {
validators := collectionpostDescPostID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(post string) error {
for _, fn := range fns {
if err := fn(post); err != nil {
return err
}
}
return nil
}
}()
// collectionpostDescMembershipType is the schema descriptor for membership_type field.
collectionpostDescMembershipType := collectionpostFields[2].Descriptor()
// collectionpost.DefaultMembershipType holds the default value on creation for the membership_type field.
collectionpost.DefaultMembershipType = collectionpostDescMembershipType.Default.(string)
emailMixin := schema.Email{}.Mixin()
emailMixinFields0 := emailMixin[0].Fields()
_ = emailMixinFields0
emailMixinFields1 := emailMixin[1].Fields()
_ = emailMixinFields1
emailFields := schema.Email{}.Fields()
_ = emailFields
// emailDescCreatedAt is the schema descriptor for created_at field.
emailDescCreatedAt := emailMixinFields1[0].Descriptor()
// email.DefaultCreatedAt holds the default value on creation for the created_at field.
email.DefaultCreatedAt = emailDescCreatedAt.Default.(func() time.Time)
// emailDescEmailAddress is the schema descriptor for email_address field.
emailDescEmailAddress := emailFields[1].Descriptor()
// email.EmailAddressValidator is a validator for the "email_address" field. It is called by the builders before save.
email.EmailAddressValidator = func() func(string) error {
validators := emailDescEmailAddress.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
validators[2].(func(string) error),
validators[3].(func(string) error),
}
return func(email_address string) error {
for _, fn := range fns {
if err := fn(email_address); err != nil {
return err
}
}
return nil
}
}()
// emailDescVerificationCode is the schema descriptor for verification_code field.
emailDescVerificationCode := emailFields[2].Descriptor()
// email.VerificationCodeValidator is a validator for the "verification_code" field. It is called by the builders before save.
email.VerificationCodeValidator = emailDescVerificationCode.Validators[0].(func(string) error)
// emailDescVerified is the schema descriptor for verified field.
emailDescVerified := emailFields[3].Descriptor()
// email.DefaultVerified holds the default value on creation for the verified field.
email.DefaultVerified = emailDescVerified.Default.(bool)
// emailDescID is the schema descriptor for id field.
emailDescID := emailMixinFields0[0].Descriptor()
// email.DefaultID holds the default value on creation for the id field.
email.DefaultID = emailDescID.Default.(func() xid.ID)
// email.IDValidator is a validator for the "id" field. It is called by the builders before save.
email.IDValidator = func() func(string) error {
validators := emailDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
eventMixin := schema.Event{}.Mixin()
eventMixinFields0 := eventMixin[0].Fields()
_ = eventMixinFields0
eventMixinFields1 := eventMixin[1].Fields()
_ = eventMixinFields1
eventMixinFields2 := eventMixin[2].Fields()
_ = eventMixinFields2
eventFields := schema.Event{}.Fields()
_ = eventFields
// eventDescCreatedAt is the schema descriptor for created_at field.
eventDescCreatedAt := eventMixinFields1[0].Descriptor()
// event.DefaultCreatedAt holds the default value on creation for the created_at field.
event.DefaultCreatedAt = eventDescCreatedAt.Default.(func() time.Time)
// eventDescUpdatedAt is the schema descriptor for updated_at field.
eventDescUpdatedAt := eventMixinFields2[0].Descriptor()
// event.DefaultUpdatedAt holds the default value on creation for the updated_at field.
event.DefaultUpdatedAt = eventDescUpdatedAt.Default.(func() time.Time)
// event.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
event.UpdateDefaultUpdatedAt = eventDescUpdatedAt.UpdateDefault.(func() time.Time)
// eventDescID is the schema descriptor for id field.
eventDescID := eventMixinFields0[0].Descriptor()
// event.DefaultID holds the default value on creation for the id field.
event.DefaultID = eventDescID.Default.(func() xid.ID)
// event.IDValidator is a validator for the "id" field. It is called by the builders before save.
event.IDValidator = func() func(string) error {
validators := eventDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
eventparticipantMixin := schema.EventParticipant{}.Mixin()
eventparticipantMixinFields0 := eventparticipantMixin[0].Fields()
_ = eventparticipantMixinFields0
eventparticipantMixinFields1 := eventparticipantMixin[1].Fields()
_ = eventparticipantMixinFields1
eventparticipantFields := schema.EventParticipant{}.Fields()
_ = eventparticipantFields
// eventparticipantDescCreatedAt is the schema descriptor for created_at field.
eventparticipantDescCreatedAt := eventparticipantMixinFields1[0].Descriptor()
// eventparticipant.DefaultCreatedAt holds the default value on creation for the created_at field.
eventparticipant.DefaultCreatedAt = eventparticipantDescCreatedAt.Default.(func() time.Time)
// eventparticipantDescID is the schema descriptor for id field.
eventparticipantDescID := eventparticipantMixinFields0[0].Descriptor()
// eventparticipant.DefaultID holds the default value on creation for the id field.
eventparticipant.DefaultID = eventparticipantDescID.Default.(func() xid.ID)
// eventparticipant.IDValidator is a validator for the "id" field. It is called by the builders before save.
eventparticipant.IDValidator = func() func(string) error {
validators := eventparticipantDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
invitationMixin := schema.Invitation{}.Mixin()
invitationMixinFields0 := invitationMixin[0].Fields()
_ = invitationMixinFields0
invitationMixinFields1 := invitationMixin[1].Fields()
_ = invitationMixinFields1
invitationMixinFields2 := invitationMixin[2].Fields()
_ = invitationMixinFields2
invitationFields := schema.Invitation{}.Fields()
_ = invitationFields
// invitationDescCreatedAt is the schema descriptor for created_at field.
invitationDescCreatedAt := invitationMixinFields1[0].Descriptor()
// invitation.DefaultCreatedAt holds the default value on creation for the created_at field.
invitation.DefaultCreatedAt = invitationDescCreatedAt.Default.(func() time.Time)
// invitationDescUpdatedAt is the schema descriptor for updated_at field.
invitationDescUpdatedAt := invitationMixinFields2[0].Descriptor()
// invitation.DefaultUpdatedAt holds the default value on creation for the updated_at field.
invitation.DefaultUpdatedAt = invitationDescUpdatedAt.Default.(func() time.Time)
// invitation.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
invitation.UpdateDefaultUpdatedAt = invitationDescUpdatedAt.UpdateDefault.(func() time.Time)
// invitationDescID is the schema descriptor for id field.
invitationDescID := invitationMixinFields0[0].Descriptor()
// invitation.DefaultID holds the default value on creation for the id field.
invitation.DefaultID = invitationDescID.Default.(func() xid.ID)
// invitation.IDValidator is a validator for the "id" field. It is called by the builders before save.
invitation.IDValidator = func() func(string) error {
validators := invitationDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
likepostMixin := schema.LikePost{}.Mixin()
likepostMixinFields0 := likepostMixin[0].Fields()
_ = likepostMixinFields0
likepostMixinFields1 := likepostMixin[1].Fields()
_ = likepostMixinFields1
likepostFields := schema.LikePost{}.Fields()
_ = likepostFields
// likepostDescCreatedAt is the schema descriptor for created_at field.
likepostDescCreatedAt := likepostMixinFields1[0].Descriptor()
// likepost.DefaultCreatedAt holds the default value on creation for the created_at field.
likepost.DefaultCreatedAt = likepostDescCreatedAt.Default.(func() time.Time)
// likepostDescID is the schema descriptor for id field.
likepostDescID := likepostMixinFields0[0].Descriptor()
// likepost.DefaultID holds the default value on creation for the id field.
likepost.DefaultID = likepostDescID.Default.(func() xid.ID)
// likepost.IDValidator is a validator for the "id" field. It is called by the builders before save.
likepost.IDValidator = func() func(string) error {
validators := likepostDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
linkMixin := schema.Link{}.Mixin()
linkMixinFields0 := linkMixin[0].Fields()
_ = linkMixinFields0
linkMixinFields1 := linkMixin[1].Fields()
_ = linkMixinFields1
linkFields := schema.Link{}.Fields()
_ = linkFields
// linkDescCreatedAt is the schema descriptor for created_at field.
linkDescCreatedAt := linkMixinFields1[0].Descriptor()
// link.DefaultCreatedAt holds the default value on creation for the created_at field.
link.DefaultCreatedAt = linkDescCreatedAt.Default.(func() time.Time)
// linkDescID is the schema descriptor for id field.
linkDescID := linkMixinFields0[0].Descriptor()
// link.DefaultID holds the default value on creation for the id field.
link.DefaultID = linkDescID.Default.(func() xid.ID)
// link.IDValidator is a validator for the "id" field. It is called by the builders before save.
link.IDValidator = func() func(string) error {
validators := linkDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
mentionprofileMixin := schema.MentionProfile{}.Mixin()
mentionprofileMixinFields0 := mentionprofileMixin[0].Fields()
_ = mentionprofileMixinFields0
mentionprofileMixinFields1 := mentionprofileMixin[1].Fields()
_ = mentionprofileMixinFields1
mentionprofileFields := schema.MentionProfile{}.Fields()
_ = mentionprofileFields
// mentionprofileDescCreatedAt is the schema descriptor for created_at field.
mentionprofileDescCreatedAt := mentionprofileMixinFields1[0].Descriptor()
// mentionprofile.DefaultCreatedAt holds the default value on creation for the created_at field.
mentionprofile.DefaultCreatedAt = mentionprofileDescCreatedAt.Default.(func() time.Time)
// mentionprofileDescID is the schema descriptor for id field.
mentionprofileDescID := mentionprofileMixinFields0[0].Descriptor()
// mentionprofile.DefaultID holds the default value on creation for the id field.
mentionprofile.DefaultID = mentionprofileDescID.Default.(func() xid.ID)
// mentionprofile.IDValidator is a validator for the "id" field. It is called by the builders before save.
mentionprofile.IDValidator = func() func(string) error {
validators := mentionprofileDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
nodeMixin := schema.Node{}.Mixin()
nodeMixinFields0 := nodeMixin[0].Fields()
_ = nodeMixinFields0
nodeMixinFields1 := nodeMixin[1].Fields()
_ = nodeMixinFields1
nodeMixinFields2 := nodeMixin[2].Fields()
_ = nodeMixinFields2
nodeFields := schema.Node{}.Fields()
_ = nodeFields
// nodeDescCreatedAt is the schema descriptor for created_at field.
nodeDescCreatedAt := nodeMixinFields1[0].Descriptor()
// node.DefaultCreatedAt holds the default value on creation for the created_at field.
node.DefaultCreatedAt = nodeDescCreatedAt.Default.(func() time.Time)
// nodeDescUpdatedAt is the schema descriptor for updated_at field.
nodeDescUpdatedAt := nodeMixinFields2[0].Descriptor()
// node.DefaultUpdatedAt holds the default value on creation for the updated_at field.
node.DefaultUpdatedAt = nodeDescUpdatedAt.Default.(func() time.Time)
// node.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
node.UpdateDefaultUpdatedAt = nodeDescUpdatedAt.UpdateDefault.(func() time.Time)
// nodeDescHideChildTree is the schema descriptor for hide_child_tree field.
nodeDescHideChildTree := nodeFields[5].Descriptor()
// node.DefaultHideChildTree holds the default value on creation for the hide_child_tree field.
node.DefaultHideChildTree = nodeDescHideChildTree.Default.(bool)
// nodeDescSort is the schema descriptor for sort field.
nodeDescSort := nodeFields[11].Descriptor()
// node.DefaultSort holds the default value on creation for the sort field.
node.DefaultSort = nodeDescSort.Default.(func() lexorank.Key)
// nodeDescID is the schema descriptor for id field.
nodeDescID := nodeMixinFields0[0].Descriptor()
// node.DefaultID holds the default value on creation for the id field.
node.DefaultID = nodeDescID.Default.(func() xid.ID)
// node.IDValidator is a validator for the "id" field. It is called by the builders before save.
node.IDValidator = func() func(string) error {
validators := nodeDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
notificationMixin := schema.Notification{}.Mixin()
notificationMixinFields0 := notificationMixin[0].Fields()
_ = notificationMixinFields0
notificationMixinFields1 := notificationMixin[1].Fields()
_ = notificationMixinFields1
notificationFields := schema.Notification{}.Fields()
_ = notificationFields
// notificationDescCreatedAt is the schema descriptor for created_at field.
notificationDescCreatedAt := notificationMixinFields1[0].Descriptor()
// notification.DefaultCreatedAt holds the default value on creation for the created_at field.
notification.DefaultCreatedAt = notificationDescCreatedAt.Default.(func() time.Time)
// notificationDescID is the schema descriptor for id field.
notificationDescID := notificationMixinFields0[0].Descriptor()
// notification.DefaultID holds the default value on creation for the id field.
notification.DefaultID = notificationDescID.Default.(func() xid.ID)
// notification.IDValidator is a validator for the "id" field. It is called by the builders before save.
notification.IDValidator = func() func(string) error {
validators := notificationDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
postMixin := schema.Post{}.Mixin()
postMixinFields0 := postMixin[0].Fields()
_ = postMixinFields0
postMixinFields1 := postMixin[1].Fields()
_ = postMixinFields1
postFields := schema.Post{}.Fields()
_ = postFields
// postDescCreatedAt is the schema descriptor for created_at field.
postDescCreatedAt := postMixinFields1[0].Descriptor()
// post.DefaultCreatedAt holds the default value on creation for the created_at field.
post.DefaultCreatedAt = postDescCreatedAt.Default.(func() time.Time)
// postDescPinned is the schema descriptor for pinned field.
postDescPinned := postFields[3].Descriptor()
// post.DefaultPinned holds the default value on creation for the pinned field.
post.DefaultPinned = postDescPinned.Default.(bool)
// postDescID is the schema descriptor for id field.
postDescID := postMixinFields0[0].Descriptor()
// post.DefaultID holds the default value on creation for the id field.
post.DefaultID = postDescID.Default.(func() xid.ID)
// post.IDValidator is a validator for the "id" field. It is called by the builders before save.
post.IDValidator = func() func(string) error {
validators := postDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
postreadMixin := schema.PostRead{}.Mixin()
postreadMixinFields0 := postreadMixin[0].Fields()
_ = postreadMixinFields0
postreadFields := schema.PostRead{}.Fields()
_ = postreadFields
// postreadDescID is the schema descriptor for id field.
postreadDescID := postreadMixinFields0[0].Descriptor()
// postread.DefaultID holds the default value on creation for the id field.
postread.DefaultID = postreadDescID.Default.(func() xid.ID)
// postread.IDValidator is a validator for the "id" field. It is called by the builders before save.
postread.IDValidator = func() func(string) error {
validators := postreadDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
propertyMixin := schema.Property{}.Mixin()
propertyMixinFields0 := propertyMixin[0].Fields()
_ = propertyMixinFields0
propertyMixinFields1 := propertyMixin[1].Fields()
_ = propertyMixinFields1
propertyFields := schema.Property{}.Fields()
_ = propertyFields
// propertyDescCreatedAt is the schema descriptor for created_at field.
propertyDescCreatedAt := propertyMixinFields1[0].Descriptor()
// property.DefaultCreatedAt holds the default value on creation for the created_at field.
property.DefaultCreatedAt = propertyDescCreatedAt.Default.(func() time.Time)
// propertyDescID is the schema descriptor for id field.
propertyDescID := propertyMixinFields0[0].Descriptor()
// property.DefaultID holds the default value on creation for the id field.
property.DefaultID = propertyDescID.Default.(func() xid.ID)
// property.IDValidator is a validator for the "id" field. It is called by the builders before save.
property.IDValidator = func() func(string) error {
validators := propertyDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
propertyschemaMixin := schema.PropertySchema{}.Mixin()
propertyschemaMixinFields0 := propertyschemaMixin[0].Fields()
_ = propertyschemaMixinFields0
propertyschemaFields := schema.PropertySchema{}.Fields()
_ = propertyschemaFields
// propertyschemaDescID is the schema descriptor for id field.
propertyschemaDescID := propertyschemaMixinFields0[0].Descriptor()
// propertyschema.DefaultID holds the default value on creation for the id field.
propertyschema.DefaultID = propertyschemaDescID.Default.(func() xid.ID)
// propertyschema.IDValidator is a validator for the "id" field. It is called by the builders before save.
propertyschema.IDValidator = func() func(string) error {
validators := propertyschemaDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
propertyschemafieldMixin := schema.PropertySchemaField{}.Mixin()
propertyschemafieldMixinFields0 := propertyschemafieldMixin[0].Fields()
_ = propertyschemafieldMixinFields0
propertyschemafieldFields := schema.PropertySchemaField{}.Fields()
_ = propertyschemafieldFields
// propertyschemafieldDescID is the schema descriptor for id field.
propertyschemafieldDescID := propertyschemafieldMixinFields0[0].Descriptor()
// propertyschemafield.DefaultID holds the default value on creation for the id field.
propertyschemafield.DefaultID = propertyschemafieldDescID.Default.(func() xid.ID)
// propertyschemafield.IDValidator is a validator for the "id" field. It is called by the builders before save.
propertyschemafield.IDValidator = func() func(string) error {
validators := propertyschemafieldDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
questionMixin := schema.Question{}.Mixin()
questionMixinFields0 := questionMixin[0].Fields()
_ = questionMixinFields0
questionMixinFields1 := questionMixin[1].Fields()
_ = questionMixinFields1
questionFields := schema.Question{}.Fields()
_ = questionFields
// questionDescCreatedAt is the schema descriptor for created_at field.
questionDescCreatedAt := questionMixinFields1[0].Descriptor()
// question.DefaultCreatedAt holds the default value on creation for the created_at field.
question.DefaultCreatedAt = questionDescCreatedAt.Default.(func() time.Time)
// questionDescID is the schema descriptor for id field.
questionDescID := questionMixinFields0[0].Descriptor()
// question.DefaultID holds the default value on creation for the id field.
question.DefaultID = questionDescID.Default.(func() xid.ID)
// question.IDValidator is a validator for the "id" field. It is called by the builders before save.
question.IDValidator = func() func(string) error {
validators := questionDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
reactMixin := schema.React{}.Mixin()
reactMixinFields0 := reactMixin[0].Fields()
_ = reactMixinFields0
reactMixinFields1 := reactMixin[1].Fields()
_ = reactMixinFields1
reactFields := schema.React{}.Fields()
_ = reactFields
// reactDescCreatedAt is the schema descriptor for created_at field.
reactDescCreatedAt := reactMixinFields1[0].Descriptor()
// react.DefaultCreatedAt holds the default value on creation for the created_at field.
react.DefaultCreatedAt = reactDescCreatedAt.Default.(func() time.Time)
// reactDescID is the schema descriptor for id field.
reactDescID := reactMixinFields0[0].Descriptor()
// react.DefaultID holds the default value on creation for the id field.
react.DefaultID = reactDescID.Default.(func() xid.ID)
// react.IDValidator is a validator for the "id" field. It is called by the builders before save.
react.IDValidator = func() func(string) error {
validators := reactDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
reportMixin := schema.Report{}.Mixin()
reportMixinFields0 := reportMixin[0].Fields()
_ = reportMixinFields0
reportMixinFields1 := reportMixin[1].Fields()
_ = reportMixinFields1
reportMixinFields2 := reportMixin[2].Fields()
_ = reportMixinFields2
reportFields := schema.Report{}.Fields()
_ = reportFields
// reportDescCreatedAt is the schema descriptor for created_at field.
reportDescCreatedAt := reportMixinFields1[0].Descriptor()
// report.DefaultCreatedAt holds the default value on creation for the created_at field.
report.DefaultCreatedAt = reportDescCreatedAt.Default.(func() time.Time)
// reportDescUpdatedAt is the schema descriptor for updated_at field.
reportDescUpdatedAt := reportMixinFields2[0].Descriptor()
// report.DefaultUpdatedAt holds the default value on creation for the updated_at field.
report.DefaultUpdatedAt = reportDescUpdatedAt.Default.(func() time.Time)
// report.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
report.UpdateDefaultUpdatedAt = reportDescUpdatedAt.UpdateDefault.(func() time.Time)
// reportDescStatus is the schema descriptor for status field.
reportDescStatus := reportFields[6].Descriptor()
// report.DefaultStatus holds the default value on creation for the status field.
report.DefaultStatus = reportDescStatus.Default.(string)
// reportDescID is the schema descriptor for id field.
reportDescID := reportMixinFields0[0].Descriptor()
// report.DefaultID holds the default value on creation for the id field.
report.DefaultID = reportDescID.Default.(func() xid.ID)
// report.IDValidator is a validator for the "id" field. It is called by the builders before save.
report.IDValidator = func() func(string) error {
validators := reportDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
roleMixin := schema.Role{}.Mixin()
roleMixinFields0 := roleMixin[0].Fields()
_ = roleMixinFields0
roleMixinFields1 := roleMixin[1].Fields()
_ = roleMixinFields1
roleMixinFields2 := roleMixin[2].Fields()
_ = roleMixinFields2
roleFields := schema.Role{}.Fields()
_ = roleFields
// roleDescCreatedAt is the schema descriptor for created_at field.
roleDescCreatedAt := roleMixinFields1[0].Descriptor()
// role.DefaultCreatedAt holds the default value on creation for the created_at field.
role.DefaultCreatedAt = roleDescCreatedAt.Default.(func() time.Time)
// roleDescUpdatedAt is the schema descriptor for updated_at field.
roleDescUpdatedAt := roleMixinFields2[0].Descriptor()
// role.DefaultUpdatedAt holds the default value on creation for the updated_at field.
role.DefaultUpdatedAt = roleDescUpdatedAt.Default.(func() time.Time)
// role.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
role.UpdateDefaultUpdatedAt = roleDescUpdatedAt.UpdateDefault.(func() time.Time)
// roleDescColour is the schema descriptor for colour field.
roleDescColour := roleFields[1].Descriptor()
// role.DefaultColour holds the default value on creation for the colour field.
role.DefaultColour = roleDescColour.Default.(string)
// roleDescID is the schema descriptor for id field.
roleDescID := roleMixinFields0[0].Descriptor()
// role.DefaultID holds the default value on creation for the id field.
role.DefaultID = roleDescID.Default.(func() xid.ID)
// role.IDValidator is a validator for the "id" field. It is called by the builders before save.
role.IDValidator = func() func(string) error {
validators := roleDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
sessionMixin := schema.Session{}.Mixin()
sessionMixinFields0 := sessionMixin[0].Fields()
_ = sessionMixinFields0
sessionMixinFields1 := sessionMixin[1].Fields()
_ = sessionMixinFields1
sessionFields := schema.Session{}.Fields()
_ = sessionFields
// sessionDescCreatedAt is the schema descriptor for created_at field.
sessionDescCreatedAt := sessionMixinFields1[0].Descriptor()
// session.DefaultCreatedAt holds the default value on creation for the created_at field.
session.DefaultCreatedAt = sessionDescCreatedAt.Default.(func() time.Time)
// sessionDescAccountID is the schema descriptor for account_id field.
sessionDescAccountID := sessionFields[0].Descriptor()
// session.AccountIDValidator is a validator for the "account_id" field. It is called by the builders before save.
session.AccountIDValidator = sessionDescAccountID.Validators[0].(func(string) error)
// sessionDescID is the schema descriptor for id field.
sessionDescID := sessionMixinFields0[0].Descriptor()
// session.DefaultID holds the default value on creation for the id field.
session.DefaultID = sessionDescID.Default.(func() xid.ID)
// session.IDValidator is a validator for the "id" field. It is called by the builders before save.
session.IDValidator = func() func(string) error {
validators := sessionDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
settingFields := schema.Setting{}.Fields()
_ = settingFields
// settingDescUpdatedAt is the schema descriptor for updated_at field.
settingDescUpdatedAt := settingFields[2].Descriptor()
// setting.DefaultUpdatedAt holds the default value on creation for the updated_at field.
setting.DefaultUpdatedAt = settingDescUpdatedAt.Default.(func() time.Time)
// setting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
setting.UpdateDefaultUpdatedAt = settingDescUpdatedAt.UpdateDefault.(func() time.Time)
tagMixin := schema.Tag{}.Mixin()
tagMixinFields0 := tagMixin[0].Fields()
_ = tagMixinFields0
tagMixinFields1 := tagMixin[1].Fields()
_ = tagMixinFields1
tagFields := schema.Tag{}.Fields()
_ = tagFields
// tagDescCreatedAt is the schema descriptor for created_at field.
tagDescCreatedAt := tagMixinFields1[0].Descriptor()
// tag.DefaultCreatedAt holds the default value on creation for the created_at field.
tag.DefaultCreatedAt = tagDescCreatedAt.Default.(func() time.Time)
// tagDescID is the schema descriptor for id field.
tagDescID := tagMixinFields0[0].Descriptor()
// tag.DefaultID holds the default value on creation for the id field.
tag.DefaultID = tagDescID.Default.(func() xid.ID)
// tag.IDValidator is a validator for the "id" field. It is called by the builders before save.
tag.IDValidator = func() func(string) error {
validators := tagDescID.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(id string) error {
for _, fn := range fns {
if err := fn(id); err != nil {
return err
}
}
return nil
}
}()
}