// Code generated by ent, DO NOT EDIT.

package runtime

import (
	"time"

	"github.com/anzhiyu-c/anheyu-app/ent/album"
	"github.com/anzhiyu-c/anheyu-app/ent/article"
	"github.com/anzhiyu-c/anheyu-app/ent/comment"
	"github.com/anzhiyu-c/anheyu-app/ent/directlink"
	"github.com/anzhiyu-c/anheyu-app/ent/entity"
	"github.com/anzhiyu-c/anheyu-app/ent/file"
	"github.com/anzhiyu-c/anheyu-app/ent/fileentity"
	"github.com/anzhiyu-c/anheyu-app/ent/link"
	"github.com/anzhiyu-c/anheyu-app/ent/linkcategory"
	"github.com/anzhiyu-c/anheyu-app/ent/linktag"
	"github.com/anzhiyu-c/anheyu-app/ent/metadata"
	"github.com/anzhiyu-c/anheyu-app/ent/page"
	"github.com/anzhiyu-c/anheyu-app/ent/postcategory"
	"github.com/anzhiyu-c/anheyu-app/ent/posttag"
	"github.com/anzhiyu-c/anheyu-app/ent/schema"
	"github.com/anzhiyu-c/anheyu-app/ent/setting"
	"github.com/anzhiyu-c/anheyu-app/ent/storagepolicy"
	"github.com/anzhiyu-c/anheyu-app/ent/tag"
	"github.com/anzhiyu-c/anheyu-app/ent/urlstat"
	"github.com/anzhiyu-c/anheyu-app/ent/user"
	"github.com/anzhiyu-c/anheyu-app/ent/usergroup"
	"github.com/anzhiyu-c/anheyu-app/ent/userinstalledtheme"
	"github.com/anzhiyu-c/anheyu-app/ent/visitorlog"
	"github.com/anzhiyu-c/anheyu-app/ent/visitorstat"
	"github.com/anzhiyu-c/anheyu-app/pkg/domain/model"
)

// 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() {
	albumMixin := schema.Album{}.Mixin()
	albumMixinHooks0 := albumMixin[0].Hooks()
	album.Hooks[0] = albumMixinHooks0[0]
	albumFields := schema.Album{}.Fields()
	_ = albumFields
	// albumDescCreatedAt is the schema descriptor for created_at field.
	albumDescCreatedAt := albumFields[1].Descriptor()
	// album.DefaultCreatedAt holds the default value on creation for the created_at field.
	album.DefaultCreatedAt = albumDescCreatedAt.Default.(func() time.Time)
	// albumDescUpdatedAt is the schema descriptor for updated_at field.
	albumDescUpdatedAt := albumFields[2].Descriptor()
	// album.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	album.DefaultUpdatedAt = albumDescUpdatedAt.Default.(func() time.Time)
	// album.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	album.UpdateDefaultUpdatedAt = albumDescUpdatedAt.UpdateDefault.(func() time.Time)
	// albumDescImageURL is the schema descriptor for image_url field.
	albumDescImageURL := albumFields[3].Descriptor()
	// album.ImageURLValidator is a validator for the "image_url" field. It is called by the builders before save.
	album.ImageURLValidator = func() func(string) error {
		validators := albumDescImageURL.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(image_url string) error {
			for _, fn := range fns {
				if err := fn(image_url); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// albumDescBigImageURL is the schema descriptor for big_image_url field.
	albumDescBigImageURL := albumFields[4].Descriptor()
	// album.BigImageURLValidator is a validator for the "big_image_url" field. It is called by the builders before save.
	album.BigImageURLValidator = albumDescBigImageURL.Validators[0].(func(string) error)
	// albumDescDownloadURL is the schema descriptor for download_url field.
	albumDescDownloadURL := albumFields[5].Descriptor()
	// album.DownloadURLValidator is a validator for the "download_url" field. It is called by the builders before save.
	album.DownloadURLValidator = albumDescDownloadURL.Validators[0].(func(string) error)
	// albumDescThumbParam is the schema descriptor for thumb_param field.
	albumDescThumbParam := albumFields[6].Descriptor()
	// album.ThumbParamValidator is a validator for the "thumb_param" field. It is called by the builders before save.
	album.ThumbParamValidator = albumDescThumbParam.Validators[0].(func(string) error)
	// albumDescBigParam is the schema descriptor for big_param field.
	albumDescBigParam := albumFields[7].Descriptor()
	// album.BigParamValidator is a validator for the "big_param" field. It is called by the builders before save.
	album.BigParamValidator = albumDescBigParam.Validators[0].(func(string) error)
	// albumDescTags is the schema descriptor for tags field.
	albumDescTags := albumFields[8].Descriptor()
	// album.TagsValidator is a validator for the "tags" field. It is called by the builders before save.
	album.TagsValidator = albumDescTags.Validators[0].(func(string) error)
	// albumDescViewCount is the schema descriptor for view_count field.
	albumDescViewCount := albumFields[9].Descriptor()
	// album.DefaultViewCount holds the default value on creation for the view_count field.
	album.DefaultViewCount = albumDescViewCount.Default.(int)
	// albumDescDownloadCount is the schema descriptor for download_count field.
	albumDescDownloadCount := albumFields[10].Descriptor()
	// album.DefaultDownloadCount holds the default value on creation for the download_count field.
	album.DefaultDownloadCount = albumDescDownloadCount.Default.(int)
	// albumDescFormat is the schema descriptor for format field.
	albumDescFormat := albumFields[14].Descriptor()
	// album.FormatValidator is a validator for the "format" field. It is called by the builders before save.
	album.FormatValidator = albumDescFormat.Validators[0].(func(string) error)
	// albumDescAspectRatio is the schema descriptor for aspect_ratio field.
	albumDescAspectRatio := albumFields[15].Descriptor()
	// album.AspectRatioValidator is a validator for the "aspect_ratio" field. It is called by the builders before save.
	album.AspectRatioValidator = albumDescAspectRatio.Validators[0].(func(string) error)
	// albumDescFileHash is the schema descriptor for file_hash field.
	albumDescFileHash := albumFields[16].Descriptor()
	// album.FileHashValidator is a validator for the "file_hash" field. It is called by the builders before save.
	album.FileHashValidator = albumDescFileHash.Validators[0].(func(string) error)
	// albumDescDisplayOrder is the schema descriptor for display_order field.
	albumDescDisplayOrder := albumFields[17].Descriptor()
	// album.DefaultDisplayOrder holds the default value on creation for the display_order field.
	album.DefaultDisplayOrder = albumDescDisplayOrder.Default.(int)
	articleMixin := schema.Article{}.Mixin()
	articleMixinHooks0 := articleMixin[0].Hooks()
	article.Hooks[0] = articleMixinHooks0[0]
	articleFields := schema.Article{}.Fields()
	_ = articleFields
	// articleDescCreatedAt is the schema descriptor for created_at field.
	articleDescCreatedAt := articleFields[1].Descriptor()
	// article.DefaultCreatedAt holds the default value on creation for the created_at field.
	article.DefaultCreatedAt = articleDescCreatedAt.Default.(func() time.Time)
	// articleDescUpdatedAt is the schema descriptor for updated_at field.
	articleDescUpdatedAt := articleFields[2].Descriptor()
	// article.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	article.DefaultUpdatedAt = articleDescUpdatedAt.Default.(func() time.Time)
	// article.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	article.UpdateDefaultUpdatedAt = articleDescUpdatedAt.UpdateDefault.(func() time.Time)
	// articleDescTitle is the schema descriptor for title field.
	articleDescTitle := articleFields[3].Descriptor()
	// article.TitleValidator is a validator for the "title" field. It is called by the builders before save.
	article.TitleValidator = articleDescTitle.Validators[0].(func(string) error)
	// articleDescViewCount is the schema descriptor for view_count field.
	articleDescViewCount := articleFields[8].Descriptor()
	// article.DefaultViewCount holds the default value on creation for the view_count field.
	article.DefaultViewCount = articleDescViewCount.Default.(int)
	// article.ViewCountValidator is a validator for the "view_count" field. It is called by the builders before save.
	article.ViewCountValidator = articleDescViewCount.Validators[0].(func(int) error)
	// articleDescWordCount is the schema descriptor for word_count field.
	articleDescWordCount := articleFields[9].Descriptor()
	// article.DefaultWordCount holds the default value on creation for the word_count field.
	article.DefaultWordCount = articleDescWordCount.Default.(int)
	// article.WordCountValidator is a validator for the "word_count" field. It is called by the builders before save.
	article.WordCountValidator = articleDescWordCount.Validators[0].(func(int) error)
	// articleDescReadingTime is the schema descriptor for reading_time field.
	articleDescReadingTime := articleFields[10].Descriptor()
	// article.DefaultReadingTime holds the default value on creation for the reading_time field.
	article.DefaultReadingTime = articleDescReadingTime.Default.(int)
	// article.ReadingTimeValidator is a validator for the "reading_time" field. It is called by the builders before save.
	article.ReadingTimeValidator = articleDescReadingTime.Validators[0].(func(int) error)
	// articleDescPrimaryColor is the schema descriptor for primary_color field.
	articleDescPrimaryColor := articleFields[12].Descriptor()
	// article.DefaultPrimaryColor holds the default value on creation for the primary_color field.
	article.DefaultPrimaryColor = articleDescPrimaryColor.Default.(string)
	// articleDescIsPrimaryColorManual is the schema descriptor for is_primary_color_manual field.
	articleDescIsPrimaryColorManual := articleFields[13].Descriptor()
	// article.DefaultIsPrimaryColorManual holds the default value on creation for the is_primary_color_manual field.
	article.DefaultIsPrimaryColorManual = articleDescIsPrimaryColorManual.Default.(bool)
	// articleDescHomeSort is the schema descriptor for home_sort field.
	articleDescHomeSort := articleFields[14].Descriptor()
	// article.DefaultHomeSort holds the default value on creation for the home_sort field.
	article.DefaultHomeSort = articleDescHomeSort.Default.(int)
	// article.HomeSortValidator is a validator for the "home_sort" field. It is called by the builders before save.
	article.HomeSortValidator = articleDescHomeSort.Validators[0].(func(int) error)
	// articleDescPinSort is the schema descriptor for pin_sort field.
	articleDescPinSort := articleFields[15].Descriptor()
	// article.DefaultPinSort holds the default value on creation for the pin_sort field.
	article.DefaultPinSort = articleDescPinSort.Default.(int)
	// article.PinSortValidator is a validator for the "pin_sort" field. It is called by the builders before save.
	article.PinSortValidator = articleDescPinSort.Validators[0].(func(int) error)
	// articleDescCopyright is the schema descriptor for copyright field.
	articleDescCopyright := articleFields[19].Descriptor()
	// article.DefaultCopyright holds the default value on creation for the copyright field.
	article.DefaultCopyright = articleDescCopyright.Default.(bool)
	commentMixin := schema.Comment{}.Mixin()
	commentMixinHooks0 := commentMixin[0].Hooks()
	comment.Hooks[0] = commentMixinHooks0[0]
	commentFields := schema.Comment{}.Fields()
	_ = commentFields
	// commentDescCreatedAt is the schema descriptor for created_at field.
	commentDescCreatedAt := commentFields[1].Descriptor()
	// comment.DefaultCreatedAt holds the default value on creation for the created_at field.
	comment.DefaultCreatedAt = commentDescCreatedAt.Default.(func() time.Time)
	// commentDescUpdatedAt is the schema descriptor for updated_at field.
	commentDescUpdatedAt := commentFields[2].Descriptor()
	// comment.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	comment.DefaultUpdatedAt = commentDescUpdatedAt.Default.(func() time.Time)
	// comment.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	comment.UpdateDefaultUpdatedAt = commentDescUpdatedAt.UpdateDefault.(func() time.Time)
	// commentDescTargetPath is the schema descriptor for target_path field.
	commentDescTargetPath := commentFields[3].Descriptor()
	// comment.TargetPathValidator is a validator for the "target_path" field. It is called by the builders before save.
	comment.TargetPathValidator = commentDescTargetPath.Validators[0].(func(string) error)
	// commentDescTargetTitle is the schema descriptor for target_title field.
	commentDescTargetTitle := commentFields[4].Descriptor()
	// comment.TargetTitleValidator is a validator for the "target_title" field. It is called by the builders before save.
	comment.TargetTitleValidator = commentDescTargetTitle.Validators[0].(func(string) error)
	// commentDescNickname is the schema descriptor for nickname field.
	commentDescNickname := commentFields[7].Descriptor()
	// comment.NicknameValidator is a validator for the "nickname" field. It is called by the builders before save.
	comment.NicknameValidator = func() func(string) error {
		validators := commentDescNickname.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(nickname string) error {
			for _, fn := range fns {
				if err := fn(nickname); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// commentDescEmail is the schema descriptor for email field.
	commentDescEmail := commentFields[8].Descriptor()
	// comment.EmailValidator is a validator for the "email" field. It is called by the builders before save.
	comment.EmailValidator = commentDescEmail.Validators[0].(func(string) error)
	// commentDescEmailMd5 is the schema descriptor for email_md5 field.
	commentDescEmailMd5 := commentFields[9].Descriptor()
	// comment.EmailMd5Validator is a validator for the "email_md5" field. It is called by the builders before save.
	comment.EmailMd5Validator = commentDescEmailMd5.Validators[0].(func(string) error)
	// commentDescWebsite is the schema descriptor for website field.
	commentDescWebsite := commentFields[10].Descriptor()
	// comment.WebsiteValidator is a validator for the "website" field. It is called by the builders before save.
	comment.WebsiteValidator = commentDescWebsite.Validators[0].(func(string) error)
	// commentDescContent is the schema descriptor for content field.
	commentDescContent := commentFields[11].Descriptor()
	// comment.ContentValidator is a validator for the "content" field. It is called by the builders before save.
	comment.ContentValidator = commentDescContent.Validators[0].(func(string) error)
	// commentDescContentHTML is the schema descriptor for content_html field.
	commentDescContentHTML := commentFields[12].Descriptor()
	// comment.ContentHTMLValidator is a validator for the "content_html" field. It is called by the builders before save.
	comment.ContentHTMLValidator = commentDescContentHTML.Validators[0].(func(string) error)
	// commentDescStatus is the schema descriptor for status field.
	commentDescStatus := commentFields[13].Descriptor()
	// comment.DefaultStatus holds the default value on creation for the status field.
	comment.DefaultStatus = commentDescStatus.Default.(int)
	// commentDescIsAdminComment is the schema descriptor for is_admin_comment field.
	commentDescIsAdminComment := commentFields[14].Descriptor()
	// comment.DefaultIsAdminComment holds the default value on creation for the is_admin_comment field.
	comment.DefaultIsAdminComment = commentDescIsAdminComment.Default.(bool)
	// commentDescIsAnonymous is the schema descriptor for is_anonymous field.
	commentDescIsAnonymous := commentFields[15].Descriptor()
	// comment.DefaultIsAnonymous holds the default value on creation for the is_anonymous field.
	comment.DefaultIsAnonymous = commentDescIsAnonymous.Default.(bool)
	// commentDescAllowNotification is the schema descriptor for allow_notification field.
	commentDescAllowNotification := commentFields[16].Descriptor()
	// comment.DefaultAllowNotification holds the default value on creation for the allow_notification field.
	comment.DefaultAllowNotification = commentDescAllowNotification.Default.(bool)
	// commentDescUserAgent is the schema descriptor for user_agent field.
	commentDescUserAgent := commentFields[17].Descriptor()
	// comment.UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save.
	comment.UserAgentValidator = commentDescUserAgent.Validators[0].(func(string) error)
	// commentDescIPAddress is the schema descriptor for ip_address field.
	commentDescIPAddress := commentFields[18].Descriptor()
	// comment.IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
	comment.IPAddressValidator = commentDescIPAddress.Validators[0].(func(string) error)
	// commentDescIPLocation is the schema descriptor for ip_location field.
	commentDescIPLocation := commentFields[19].Descriptor()
	// comment.IPLocationValidator is a validator for the "ip_location" field. It is called by the builders before save.
	comment.IPLocationValidator = commentDescIPLocation.Validators[0].(func(string) error)
	// commentDescLikeCount is the schema descriptor for like_count field.
	commentDescLikeCount := commentFields[20].Descriptor()
	// comment.DefaultLikeCount holds the default value on creation for the like_count field.
	comment.DefaultLikeCount = commentDescLikeCount.Default.(int)
	// comment.LikeCountValidator is a validator for the "like_count" field. It is called by the builders before save.
	comment.LikeCountValidator = commentDescLikeCount.Validators[0].(func(int) error)
	directlinkMixin := schema.DirectLink{}.Mixin()
	directlinkMixinHooks0 := directlinkMixin[0].Hooks()
	directlink.Hooks[0] = directlinkMixinHooks0[0]
	directlinkFields := schema.DirectLink{}.Fields()
	_ = directlinkFields
	// directlinkDescCreatedAt is the schema descriptor for created_at field.
	directlinkDescCreatedAt := directlinkFields[1].Descriptor()
	// directlink.DefaultCreatedAt holds the default value on creation for the created_at field.
	directlink.DefaultCreatedAt = directlinkDescCreatedAt.Default.(func() time.Time)
	// directlinkDescUpdatedAt is the schema descriptor for updated_at field.
	directlinkDescUpdatedAt := directlinkFields[2].Descriptor()
	// directlink.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	directlink.DefaultUpdatedAt = directlinkDescUpdatedAt.Default.(func() time.Time)
	// directlink.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	directlink.UpdateDefaultUpdatedAt = directlinkDescUpdatedAt.UpdateDefault.(func() time.Time)
	// directlinkDescFileName is the schema descriptor for file_name field.
	directlinkDescFileName := directlinkFields[4].Descriptor()
	// directlink.FileNameValidator is a validator for the "file_name" field. It is called by the builders before save.
	directlink.FileNameValidator = func() func(string) error {
		validators := directlinkDescFileName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(file_name string) error {
			for _, fn := range fns {
				if err := fn(file_name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// directlinkDescSpeedLimit is the schema descriptor for speed_limit field.
	directlinkDescSpeedLimit := directlinkFields[5].Descriptor()
	// directlink.DefaultSpeedLimit holds the default value on creation for the speed_limit field.
	directlink.DefaultSpeedLimit = directlinkDescSpeedLimit.Default.(int64)
	// directlinkDescDownloads is the schema descriptor for downloads field.
	directlinkDescDownloads := directlinkFields[6].Descriptor()
	// directlink.DefaultDownloads holds the default value on creation for the downloads field.
	directlink.DefaultDownloads = directlinkDescDownloads.Default.(int64)
	entityFields := schema.Entity{}.Fields()
	_ = entityFields
	// entityDescCreatedAt is the schema descriptor for created_at field.
	entityDescCreatedAt := entityFields[1].Descriptor()
	// entity.DefaultCreatedAt holds the default value on creation for the created_at field.
	entity.DefaultCreatedAt = entityDescCreatedAt.Default.(func() time.Time)
	// entityDescUpdatedAt is the schema descriptor for updated_at field.
	entityDescUpdatedAt := entityFields[2].Descriptor()
	// entity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	entity.DefaultUpdatedAt = entityDescUpdatedAt.Default.(func() time.Time)
	// entity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	entity.UpdateDefaultUpdatedAt = entityDescUpdatedAt.UpdateDefault.(func() time.Time)
	// entityDescUploadSessionID is the schema descriptor for upload_session_id field.
	entityDescUploadSessionID := entityFields[6].Descriptor()
	// entity.UploadSessionIDValidator is a validator for the "upload_session_id" field. It is called by the builders before save.
	entity.UploadSessionIDValidator = entityDescUploadSessionID.Validators[0].(func(string) error)
	// entityDescEtag is the schema descriptor for etag field.
	entityDescEtag := entityFields[10].Descriptor()
	// entity.EtagValidator is a validator for the "etag" field. It is called by the builders before save.
	entity.EtagValidator = entityDescEtag.Validators[0].(func(string) error)
	// entityDescMimeType is the schema descriptor for mime_type field.
	entityDescMimeType := entityFields[11].Descriptor()
	// entity.MimeTypeValidator is a validator for the "mime_type" field. It is called by the builders before save.
	entity.MimeTypeValidator = entityDescMimeType.Validators[0].(func(string) error)
	// entityDescDimension is the schema descriptor for dimension field.
	entityDescDimension := entityFields[12].Descriptor()
	// entity.DimensionValidator is a validator for the "dimension" field. It is called by the builders before save.
	entity.DimensionValidator = entityDescDimension.Validators[0].(func(string) error)
	fileMixin := schema.File{}.Mixin()
	fileMixinHooks0 := fileMixin[0].Hooks()
	file.Hooks[0] = fileMixinHooks0[0]
	fileFields := schema.File{}.Fields()
	_ = fileFields
	// fileDescCreatedAt is the schema descriptor for created_at field.
	fileDescCreatedAt := fileFields[1].Descriptor()
	// file.DefaultCreatedAt holds the default value on creation for the created_at field.
	file.DefaultCreatedAt = fileDescCreatedAt.Default.(func() time.Time)
	// fileDescUpdatedAt is the schema descriptor for updated_at field.
	fileDescUpdatedAt := fileFields[2].Descriptor()
	// file.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	file.DefaultUpdatedAt = fileDescUpdatedAt.Default.(func() time.Time)
	// file.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	file.UpdateDefaultUpdatedAt = fileDescUpdatedAt.UpdateDefault.(func() time.Time)
	// fileDescName is the schema descriptor for name field.
	fileDescName := fileFields[6].Descriptor()
	// file.NameValidator is a validator for the "name" field. It is called by the builders before save.
	file.NameValidator = fileDescName.Validators[0].(func(string) error)
	// fileDescSize is the schema descriptor for size field.
	fileDescSize := fileFields[7].Descriptor()
	// file.DefaultSize holds the default value on creation for the size field.
	file.DefaultSize = fileDescSize.Default.(int64)
	// fileDescChildrenCount is the schema descriptor for children_count field.
	fileDescChildrenCount := fileFields[9].Descriptor()
	// file.DefaultChildrenCount holds the default value on creation for the children_count field.
	file.DefaultChildrenCount = fileDescChildrenCount.Default.(int64)
	fileentityMixin := schema.FileEntity{}.Mixin()
	fileentityMixinHooks0 := fileentityMixin[0].Hooks()
	fileentity.Hooks[0] = fileentityMixinHooks0[0]
	fileentityFields := schema.FileEntity{}.Fields()
	_ = fileentityFields
	// fileentityDescCreatedAt is the schema descriptor for created_at field.
	fileentityDescCreatedAt := fileentityFields[1].Descriptor()
	// fileentity.DefaultCreatedAt holds the default value on creation for the created_at field.
	fileentity.DefaultCreatedAt = fileentityDescCreatedAt.Default.(func() time.Time)
	// fileentityDescUpdatedAt is the schema descriptor for updated_at field.
	fileentityDescUpdatedAt := fileentityFields[2].Descriptor()
	// fileentity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	fileentity.DefaultUpdatedAt = fileentityDescUpdatedAt.Default.(func() time.Time)
	// fileentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	fileentity.UpdateDefaultUpdatedAt = fileentityDescUpdatedAt.UpdateDefault.(func() time.Time)
	// fileentityDescVersion is the schema descriptor for version field.
	fileentityDescVersion := fileentityFields[5].Descriptor()
	// fileentity.VersionValidator is a validator for the "version" field. It is called by the builders before save.
	fileentity.VersionValidator = fileentityDescVersion.Validators[0].(func(string) error)
	// fileentityDescIsCurrent is the schema descriptor for is_current field.
	fileentityDescIsCurrent := fileentityFields[6].Descriptor()
	// fileentity.DefaultIsCurrent holds the default value on creation for the is_current field.
	fileentity.DefaultIsCurrent = fileentityDescIsCurrent.Default.(bool)
	linkFields := schema.Link{}.Fields()
	_ = linkFields
	// linkDescName is the schema descriptor for name field.
	linkDescName := linkFields[0].Descriptor()
	// link.NameValidator is a validator for the "name" field. It is called by the builders before save.
	link.NameValidator = linkDescName.Validators[0].(func(string) error)
	// linkDescURL is the schema descriptor for url field.
	linkDescURL := linkFields[1].Descriptor()
	// link.URLValidator is a validator for the "url" field. It is called by the builders before save.
	link.URLValidator = linkDescURL.Validators[0].(func(string) error)
	// linkDescSortOrder is the schema descriptor for sort_order field.
	linkDescSortOrder := linkFields[6].Descriptor()
	// link.DefaultSortOrder holds the default value on creation for the sort_order field.
	link.DefaultSortOrder = linkDescSortOrder.Default.(int)
	// linkDescSkipHealthCheck is the schema descriptor for skip_health_check field.
	linkDescSkipHealthCheck := linkFields[7].Descriptor()
	// link.DefaultSkipHealthCheck holds the default value on creation for the skip_health_check field.
	link.DefaultSkipHealthCheck = linkDescSkipHealthCheck.Default.(bool)
	linkcategoryFields := schema.LinkCategory{}.Fields()
	_ = linkcategoryFields
	// linkcategoryDescName is the schema descriptor for name field.
	linkcategoryDescName := linkcategoryFields[0].Descriptor()
	// linkcategory.NameValidator is a validator for the "name" field. It is called by the builders before save.
	linkcategory.NameValidator = linkcategoryDescName.Validators[0].(func(string) error)
	linktagFields := schema.LinkTag{}.Fields()
	_ = linktagFields
	// linktagDescName is the schema descriptor for name field.
	linktagDescName := linktagFields[0].Descriptor()
	// linktag.NameValidator is a validator for the "name" field. It is called by the builders before save.
	linktag.NameValidator = linktagDescName.Validators[0].(func(string) error)
	// linktagDescColor is the schema descriptor for color field.
	linktagDescColor := linktagFields[1].Descriptor()
	// linktag.DefaultColor holds the default value on creation for the color field.
	linktag.DefaultColor = linktagDescColor.Default.(string)
	metadataMixin := schema.Metadata{}.Mixin()
	metadataMixinHooks0 := metadataMixin[0].Hooks()
	metadata.Hooks[0] = metadataMixinHooks0[0]
	metadataFields := schema.Metadata{}.Fields()
	_ = metadataFields
	// metadataDescCreatedAt is the schema descriptor for created_at field.
	metadataDescCreatedAt := metadataFields[1].Descriptor()
	// metadata.DefaultCreatedAt holds the default value on creation for the created_at field.
	metadata.DefaultCreatedAt = metadataDescCreatedAt.Default.(func() time.Time)
	// metadataDescUpdatedAt is the schema descriptor for updated_at field.
	metadataDescUpdatedAt := metadataFields[2].Descriptor()
	// metadata.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	metadata.DefaultUpdatedAt = metadataDescUpdatedAt.Default.(func() time.Time)
	// metadata.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	metadata.UpdateDefaultUpdatedAt = metadataDescUpdatedAt.UpdateDefault.(func() time.Time)
	// metadataDescName is the schema descriptor for name field.
	metadataDescName := metadataFields[3].Descriptor()
	// metadata.NameValidator is a validator for the "name" field. It is called by the builders before save.
	metadata.NameValidator = func() func(string) error {
		validators := metadataDescName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(name string) error {
			for _, fn := range fns {
				if err := fn(name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	pageMixin := schema.Page{}.Mixin()
	pageMixinHooks0 := pageMixin[0].Hooks()
	page.Hooks[0] = pageMixinHooks0[0]
	pageFields := schema.Page{}.Fields()
	_ = pageFields
	// pageDescTitle is the schema descriptor for title field.
	pageDescTitle := pageFields[1].Descriptor()
	// page.TitleValidator is a validator for the "title" field. It is called by the builders before save.
	page.TitleValidator = func() func(string) error {
		validators := pageDescTitle.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(title string) error {
			for _, fn := range fns {
				if err := fn(title); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// pageDescPath is the schema descriptor for path field.
	pageDescPath := pageFields[2].Descriptor()
	// page.PathValidator is a validator for the "path" field. It is called by the builders before save.
	page.PathValidator = func() func(string) error {
		validators := pageDescPath.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(_path string) error {
			for _, fn := range fns {
				if err := fn(_path); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// pageDescMarkdownContent is the schema descriptor for markdown_content field.
	pageDescMarkdownContent := pageFields[4].Descriptor()
	// page.DefaultMarkdownContent holds the default value on creation for the markdown_content field.
	page.DefaultMarkdownContent = pageDescMarkdownContent.Default.(string)
	// pageDescDescription is the schema descriptor for description field.
	pageDescDescription := pageFields[5].Descriptor()
	// page.DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	page.DescriptionValidator = pageDescDescription.Validators[0].(func(string) error)
	// pageDescIsPublished is the schema descriptor for is_published field.
	pageDescIsPublished := pageFields[6].Descriptor()
	// page.DefaultIsPublished holds the default value on creation for the is_published field.
	page.DefaultIsPublished = pageDescIsPublished.Default.(bool)
	// pageDescShowComment is the schema descriptor for show_comment field.
	pageDescShowComment := pageFields[7].Descriptor()
	// page.DefaultShowComment holds the default value on creation for the show_comment field.
	page.DefaultShowComment = pageDescShowComment.Default.(bool)
	// pageDescSort is the schema descriptor for sort field.
	pageDescSort := pageFields[8].Descriptor()
	// page.DefaultSort holds the default value on creation for the sort field.
	page.DefaultSort = pageDescSort.Default.(int)
	// pageDescCreatedAt is the schema descriptor for created_at field.
	pageDescCreatedAt := pageFields[9].Descriptor()
	// page.DefaultCreatedAt holds the default value on creation for the created_at field.
	page.DefaultCreatedAt = pageDescCreatedAt.Default.(func() time.Time)
	// pageDescUpdatedAt is the schema descriptor for updated_at field.
	pageDescUpdatedAt := pageFields[10].Descriptor()
	// page.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	page.DefaultUpdatedAt = pageDescUpdatedAt.Default.(func() time.Time)
	// page.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	page.UpdateDefaultUpdatedAt = pageDescUpdatedAt.UpdateDefault.(func() time.Time)
	postcategoryMixin := schema.PostCategory{}.Mixin()
	postcategoryMixinHooks0 := postcategoryMixin[0].Hooks()
	postcategory.Hooks[0] = postcategoryMixinHooks0[0]
	postcategoryFields := schema.PostCategory{}.Fields()
	_ = postcategoryFields
	// postcategoryDescCreatedAt is the schema descriptor for created_at field.
	postcategoryDescCreatedAt := postcategoryFields[1].Descriptor()
	// postcategory.DefaultCreatedAt holds the default value on creation for the created_at field.
	postcategory.DefaultCreatedAt = postcategoryDescCreatedAt.Default.(func() time.Time)
	// postcategoryDescUpdatedAt is the schema descriptor for updated_at field.
	postcategoryDescUpdatedAt := postcategoryFields[2].Descriptor()
	// postcategory.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	postcategory.DefaultUpdatedAt = postcategoryDescUpdatedAt.Default.(func() time.Time)
	// postcategory.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	postcategory.UpdateDefaultUpdatedAt = postcategoryDescUpdatedAt.UpdateDefault.(func() time.Time)
	// postcategoryDescName is the schema descriptor for name field.
	postcategoryDescName := postcategoryFields[3].Descriptor()
	// postcategory.NameValidator is a validator for the "name" field. It is called by the builders before save.
	postcategory.NameValidator = postcategoryDescName.Validators[0].(func(string) error)
	// postcategoryDescCount is the schema descriptor for count field.
	postcategoryDescCount := postcategoryFields[5].Descriptor()
	// postcategory.DefaultCount holds the default value on creation for the count field.
	postcategory.DefaultCount = postcategoryDescCount.Default.(int)
	// postcategory.CountValidator is a validator for the "count" field. It is called by the builders before save.
	postcategory.CountValidator = postcategoryDescCount.Validators[0].(func(int) error)
	// postcategoryDescIsSeries is the schema descriptor for is_series field.
	postcategoryDescIsSeries := postcategoryFields[6].Descriptor()
	// postcategory.DefaultIsSeries holds the default value on creation for the is_series field.
	postcategory.DefaultIsSeries = postcategoryDescIsSeries.Default.(bool)
	posttagMixin := schema.PostTag{}.Mixin()
	posttagMixinHooks0 := posttagMixin[0].Hooks()
	posttag.Hooks[0] = posttagMixinHooks0[0]
	posttagFields := schema.PostTag{}.Fields()
	_ = posttagFields
	// posttagDescCreatedAt is the schema descriptor for created_at field.
	posttagDescCreatedAt := posttagFields[1].Descriptor()
	// posttag.DefaultCreatedAt holds the default value on creation for the created_at field.
	posttag.DefaultCreatedAt = posttagDescCreatedAt.Default.(func() time.Time)
	// posttagDescUpdatedAt is the schema descriptor for updated_at field.
	posttagDescUpdatedAt := posttagFields[2].Descriptor()
	// posttag.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	posttag.DefaultUpdatedAt = posttagDescUpdatedAt.Default.(func() time.Time)
	// posttag.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	posttag.UpdateDefaultUpdatedAt = posttagDescUpdatedAt.UpdateDefault.(func() time.Time)
	// posttagDescName is the schema descriptor for name field.
	posttagDescName := posttagFields[3].Descriptor()
	// posttag.NameValidator is a validator for the "name" field. It is called by the builders before save.
	posttag.NameValidator = posttagDescName.Validators[0].(func(string) error)
	// posttagDescCount is the schema descriptor for count field.
	posttagDescCount := posttagFields[4].Descriptor()
	// posttag.DefaultCount holds the default value on creation for the count field.
	posttag.DefaultCount = posttagDescCount.Default.(int)
	// posttag.CountValidator is a validator for the "count" field. It is called by the builders before save.
	posttag.CountValidator = posttagDescCount.Validators[0].(func(int) error)
	settingMixin := schema.Setting{}.Mixin()
	settingMixinHooks0 := settingMixin[0].Hooks()
	setting.Hooks[0] = settingMixinHooks0[0]
	settingFields := schema.Setting{}.Fields()
	_ = settingFields
	// settingDescConfigKey is the schema descriptor for config_key field.
	settingDescConfigKey := settingFields[0].Descriptor()
	// setting.ConfigKeyValidator is a validator for the "config_key" field. It is called by the builders before save.
	setting.ConfigKeyValidator = func() func(string) error {
		validators := settingDescConfigKey.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(config_key string) error {
			for _, fn := range fns {
				if err := fn(config_key); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// settingDescComment is the schema descriptor for comment field.
	settingDescComment := settingFields[2].Descriptor()
	// setting.CommentValidator is a validator for the "comment" field. It is called by the builders before save.
	setting.CommentValidator = settingDescComment.Validators[0].(func(string) error)
	// settingDescCreatedAt is the schema descriptor for created_at field.
	settingDescCreatedAt := settingFields[3].Descriptor()
	// setting.DefaultCreatedAt holds the default value on creation for the created_at field.
	setting.DefaultCreatedAt = settingDescCreatedAt.Default.(func() time.Time)
	// settingDescUpdatedAt is the schema descriptor for updated_at field.
	settingDescUpdatedAt := settingFields[4].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)
	storagepolicyMixin := schema.StoragePolicy{}.Mixin()
	storagepolicyMixinHooks0 := storagepolicyMixin[0].Hooks()
	storagepolicy.Hooks[0] = storagepolicyMixinHooks0[0]
	storagepolicyFields := schema.StoragePolicy{}.Fields()
	_ = storagepolicyFields
	// storagepolicyDescCreatedAt is the schema descriptor for created_at field.
	storagepolicyDescCreatedAt := storagepolicyFields[1].Descriptor()
	// storagepolicy.DefaultCreatedAt holds the default value on creation for the created_at field.
	storagepolicy.DefaultCreatedAt = storagepolicyDescCreatedAt.Default.(func() time.Time)
	// storagepolicyDescUpdatedAt is the schema descriptor for updated_at field.
	storagepolicyDescUpdatedAt := storagepolicyFields[2].Descriptor()
	// storagepolicy.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	storagepolicy.DefaultUpdatedAt = storagepolicyDescUpdatedAt.Default.(func() time.Time)
	// storagepolicy.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	storagepolicy.UpdateDefaultUpdatedAt = storagepolicyDescUpdatedAt.UpdateDefault.(func() time.Time)
	// storagepolicyDescName is the schema descriptor for name field.
	storagepolicyDescName := storagepolicyFields[3].Descriptor()
	// storagepolicy.NameValidator is a validator for the "name" field. It is called by the builders before save.
	storagepolicy.NameValidator = func() func(string) error {
		validators := storagepolicyDescName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(name string) error {
			for _, fn := range fns {
				if err := fn(name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// storagepolicyDescType is the schema descriptor for type field.
	storagepolicyDescType := storagepolicyFields[4].Descriptor()
	// storagepolicy.TypeValidator is a validator for the "type" field. It is called by the builders before save.
	storagepolicy.TypeValidator = func() func(string) error {
		validators := storagepolicyDescType.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(_type string) error {
			for _, fn := range fns {
				if err := fn(_type); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// storagepolicyDescFlag is the schema descriptor for flag field.
	storagepolicyDescFlag := storagepolicyFields[5].Descriptor()
	// storagepolicy.FlagValidator is a validator for the "flag" field. It is called by the builders before save.
	storagepolicy.FlagValidator = storagepolicyDescFlag.Validators[0].(func(string) error)
	// storagepolicyDescServer is the schema descriptor for server field.
	storagepolicyDescServer := storagepolicyFields[6].Descriptor()
	// storagepolicy.ServerValidator is a validator for the "server" field. It is called by the builders before save.
	storagepolicy.ServerValidator = storagepolicyDescServer.Validators[0].(func(string) error)
	// storagepolicyDescBucketName is the schema descriptor for bucket_name field.
	storagepolicyDescBucketName := storagepolicyFields[7].Descriptor()
	// storagepolicy.BucketNameValidator is a validator for the "bucket_name" field. It is called by the builders before save.
	storagepolicy.BucketNameValidator = storagepolicyDescBucketName.Validators[0].(func(string) error)
	// storagepolicyDescBasePath is the schema descriptor for base_path field.
	storagepolicyDescBasePath := storagepolicyFields[12].Descriptor()
	// storagepolicy.BasePathValidator is a validator for the "base_path" field. It is called by the builders before save.
	storagepolicy.BasePathValidator = storagepolicyDescBasePath.Validators[0].(func(string) error)
	// storagepolicyDescVirtualPath is the schema descriptor for virtual_path field.
	storagepolicyDescVirtualPath := storagepolicyFields[13].Descriptor()
	// storagepolicy.VirtualPathValidator is a validator for the "virtual_path" field. It is called by the builders before save.
	storagepolicy.VirtualPathValidator = storagepolicyDescVirtualPath.Validators[0].(func(string) error)
	tagMixin := schema.Tag{}.Mixin()
	tagMixinHooks0 := tagMixin[0].Hooks()
	tag.Hooks[0] = tagMixinHooks0[0]
	tagFields := schema.Tag{}.Fields()
	_ = tagFields
	// tagDescCreatedAt is the schema descriptor for created_at field.
	tagDescCreatedAt := tagFields[1].Descriptor()
	// tag.DefaultCreatedAt holds the default value on creation for the created_at field.
	tag.DefaultCreatedAt = tagDescCreatedAt.Default.(func() time.Time)
	// tagDescUpdatedAt is the schema descriptor for updated_at field.
	tagDescUpdatedAt := tagFields[2].Descriptor()
	// tag.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	tag.DefaultUpdatedAt = tagDescUpdatedAt.Default.(func() time.Time)
	// tag.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	tag.UpdateDefaultUpdatedAt = tagDescUpdatedAt.UpdateDefault.(func() time.Time)
	// tagDescName is the schema descriptor for name field.
	tagDescName := tagFields[3].Descriptor()
	// tag.NameValidator is a validator for the "name" field. It is called by the builders before save.
	tag.NameValidator = func() func(string) error {
		validators := tagDescName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(name string) error {
			for _, fn := range fns {
				if err := fn(name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	urlstatFields := schema.URLStat{}.Fields()
	_ = urlstatFields
	// urlstatDescCreatedAt is the schema descriptor for created_at field.
	urlstatDescCreatedAt := urlstatFields[1].Descriptor()
	// urlstat.DefaultCreatedAt holds the default value on creation for the created_at field.
	urlstat.DefaultCreatedAt = urlstatDescCreatedAt.Default.(func() time.Time)
	// urlstatDescUpdatedAt is the schema descriptor for updated_at field.
	urlstatDescUpdatedAt := urlstatFields[2].Descriptor()
	// urlstat.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	urlstat.DefaultUpdatedAt = urlstatDescUpdatedAt.Default.(func() time.Time)
	// urlstat.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	urlstat.UpdateDefaultUpdatedAt = urlstatDescUpdatedAt.UpdateDefault.(func() time.Time)
	// urlstatDescURLPath is the schema descriptor for url_path field.
	urlstatDescURLPath := urlstatFields[3].Descriptor()
	// urlstat.URLPathValidator is a validator for the "url_path" field. It is called by the builders before save.
	urlstat.URLPathValidator = urlstatDescURLPath.Validators[0].(func(string) error)
	// urlstatDescPageTitle is the schema descriptor for page_title field.
	urlstatDescPageTitle := urlstatFields[4].Descriptor()
	// urlstat.PageTitleValidator is a validator for the "page_title" field. It is called by the builders before save.
	urlstat.PageTitleValidator = urlstatDescPageTitle.Validators[0].(func(string) error)
	// urlstatDescTotalViews is the schema descriptor for total_views field.
	urlstatDescTotalViews := urlstatFields[5].Descriptor()
	// urlstat.DefaultTotalViews holds the default value on creation for the total_views field.
	urlstat.DefaultTotalViews = urlstatDescTotalViews.Default.(int64)
	// urlstatDescUniqueViews is the schema descriptor for unique_views field.
	urlstatDescUniqueViews := urlstatFields[6].Descriptor()
	// urlstat.DefaultUniqueViews holds the default value on creation for the unique_views field.
	urlstat.DefaultUniqueViews = urlstatDescUniqueViews.Default.(int64)
	// urlstatDescBounceCount is the schema descriptor for bounce_count field.
	urlstatDescBounceCount := urlstatFields[7].Descriptor()
	// urlstat.DefaultBounceCount holds the default value on creation for the bounce_count field.
	urlstat.DefaultBounceCount = urlstatDescBounceCount.Default.(int64)
	// urlstatDescAvgDuration is the schema descriptor for avg_duration field.
	urlstatDescAvgDuration := urlstatFields[8].Descriptor()
	// urlstat.DefaultAvgDuration holds the default value on creation for the avg_duration field.
	urlstat.DefaultAvgDuration = urlstatDescAvgDuration.Default.(float64)
	userMixin := schema.User{}.Mixin()
	userMixinHooks0 := userMixin[0].Hooks()
	user.Hooks[0] = userMixinHooks0[0]
	userFields := schema.User{}.Fields()
	_ = userFields
	// userDescCreatedAt is the schema descriptor for created_at field.
	userDescCreatedAt := userFields[1].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[2].Descriptor()
	// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
	// user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
	// userDescUsername is the schema descriptor for username field.
	userDescUsername := userFields[3].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
		}
	}()
	// userDescPasswordHash is the schema descriptor for password_hash field.
	userDescPasswordHash := userFields[4].Descriptor()
	// user.PasswordHashValidator is a validator for the "password_hash" field. It is called by the builders before save.
	user.PasswordHashValidator = func() func(string) error {
		validators := userDescPasswordHash.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(password_hash string) error {
			for _, fn := range fns {
				if err := fn(password_hash); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// userDescNickname is the schema descriptor for nickname field.
	userDescNickname := userFields[5].Descriptor()
	// user.NicknameValidator is a validator for the "nickname" field. It is called by the builders before save.
	user.NicknameValidator = userDescNickname.Validators[0].(func(string) error)
	// userDescAvatar is the schema descriptor for avatar field.
	userDescAvatar := userFields[6].Descriptor()
	// user.AvatarValidator is a validator for the "avatar" field. It is called by the builders before save.
	user.AvatarValidator = userDescAvatar.Validators[0].(func(string) error)
	// userDescEmail is the schema descriptor for email field.
	userDescEmail := userFields[7].Descriptor()
	// user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
	user.EmailValidator = userDescEmail.Validators[0].(func(string) error)
	// userDescWebsite is the schema descriptor for website field.
	userDescWebsite := userFields[8].Descriptor()
	// user.WebsiteValidator is a validator for the "website" field. It is called by the builders before save.
	user.WebsiteValidator = userDescWebsite.Validators[0].(func(string) error)
	// userDescStatus is the schema descriptor for status field.
	userDescStatus := userFields[10].Descriptor()
	// user.DefaultStatus holds the default value on creation for the status field.
	user.DefaultStatus = userDescStatus.Default.(int)
	usergroupMixin := schema.UserGroup{}.Mixin()
	usergroupMixinHooks0 := usergroupMixin[0].Hooks()
	usergroup.Hooks[0] = usergroupMixinHooks0[0]
	usergroupFields := schema.UserGroup{}.Fields()
	_ = usergroupFields
	// usergroupDescCreatedAt is the schema descriptor for created_at field.
	usergroupDescCreatedAt := usergroupFields[1].Descriptor()
	// usergroup.DefaultCreatedAt holds the default value on creation for the created_at field.
	usergroup.DefaultCreatedAt = usergroupDescCreatedAt.Default.(func() time.Time)
	// usergroupDescUpdatedAt is the schema descriptor for updated_at field.
	usergroupDescUpdatedAt := usergroupFields[2].Descriptor()
	// usergroup.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	usergroup.DefaultUpdatedAt = usergroupDescUpdatedAt.Default.(func() time.Time)
	// usergroup.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	usergroup.UpdateDefaultUpdatedAt = usergroupDescUpdatedAt.UpdateDefault.(func() time.Time)
	// usergroupDescName is the schema descriptor for name field.
	usergroupDescName := usergroupFields[3].Descriptor()
	// usergroup.NameValidator is a validator for the "name" field. It is called by the builders before save.
	usergroup.NameValidator = func() func(string) error {
		validators := usergroupDescName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(name string) error {
			for _, fn := range fns {
				if err := fn(name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// usergroupDescDescription is the schema descriptor for description field.
	usergroupDescDescription := usergroupFields[4].Descriptor()
	// usergroup.DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	usergroup.DescriptionValidator = usergroupDescDescription.Validators[0].(func(string) error)
	// usergroupDescMaxStorage is the schema descriptor for max_storage field.
	usergroupDescMaxStorage := usergroupFields[6].Descriptor()
	// usergroup.DefaultMaxStorage holds the default value on creation for the max_storage field.
	usergroup.DefaultMaxStorage = usergroupDescMaxStorage.Default.(int64)
	// usergroupDescSpeedLimit is the schema descriptor for speed_limit field.
	usergroupDescSpeedLimit := usergroupFields[7].Descriptor()
	// usergroup.DefaultSpeedLimit holds the default value on creation for the speed_limit field.
	usergroup.DefaultSpeedLimit = usergroupDescSpeedLimit.Default.(int64)
	// usergroupDescSettings is the schema descriptor for settings field.
	usergroupDescSettings := usergroupFields[8].Descriptor()
	// usergroup.DefaultSettings holds the default value on creation for the settings field.
	usergroup.DefaultSettings = usergroupDescSettings.Default.(*model.GroupSettings)
	userinstalledthemeMixin := schema.UserInstalledTheme{}.Mixin()
	userinstalledthemeMixinHooks0 := userinstalledthemeMixin[0].Hooks()
	userinstalledtheme.Hooks[0] = userinstalledthemeMixinHooks0[0]
	userinstalledthemeFields := schema.UserInstalledTheme{}.Fields()
	_ = userinstalledthemeFields
	// userinstalledthemeDescCreatedAt is the schema descriptor for created_at field.
	userinstalledthemeDescCreatedAt := userinstalledthemeFields[1].Descriptor()
	// userinstalledtheme.DefaultCreatedAt holds the default value on creation for the created_at field.
	userinstalledtheme.DefaultCreatedAt = userinstalledthemeDescCreatedAt.Default.(func() time.Time)
	// userinstalledthemeDescUpdatedAt is the schema descriptor for updated_at field.
	userinstalledthemeDescUpdatedAt := userinstalledthemeFields[2].Descriptor()
	// userinstalledtheme.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	userinstalledtheme.DefaultUpdatedAt = userinstalledthemeDescUpdatedAt.Default.(func() time.Time)
	// userinstalledtheme.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	userinstalledtheme.UpdateDefaultUpdatedAt = userinstalledthemeDescUpdatedAt.UpdateDefault.(func() time.Time)
	// userinstalledthemeDescThemeName is the schema descriptor for theme_name field.
	userinstalledthemeDescThemeName := userinstalledthemeFields[4].Descriptor()
	// userinstalledtheme.ThemeNameValidator is a validator for the "theme_name" field. It is called by the builders before save.
	userinstalledtheme.ThemeNameValidator = func() func(string) error {
		validators := userinstalledthemeDescThemeName.Validators
		fns := [...]func(string) error{
			validators[0].(func(string) error),
			validators[1].(func(string) error),
		}
		return func(theme_name string) error {
			for _, fn := range fns {
				if err := fn(theme_name); err != nil {
					return err
				}
			}
			return nil
		}
	}()
	// userinstalledthemeDescIsCurrent is the schema descriptor for is_current field.
	userinstalledthemeDescIsCurrent := userinstalledthemeFields[6].Descriptor()
	// userinstalledtheme.DefaultIsCurrent holds the default value on creation for the is_current field.
	userinstalledtheme.DefaultIsCurrent = userinstalledthemeDescIsCurrent.Default.(bool)
	// userinstalledthemeDescInstallTime is the schema descriptor for install_time field.
	userinstalledthemeDescInstallTime := userinstalledthemeFields[7].Descriptor()
	// userinstalledtheme.DefaultInstallTime holds the default value on creation for the install_time field.
	userinstalledtheme.DefaultInstallTime = userinstalledthemeDescInstallTime.Default.(func() time.Time)
	// userinstalledthemeDescInstalledVersion is the schema descriptor for installed_version field.
	userinstalledthemeDescInstalledVersion := userinstalledthemeFields[9].Descriptor()
	// userinstalledtheme.InstalledVersionValidator is a validator for the "installed_version" field. It is called by the builders before save.
	userinstalledtheme.InstalledVersionValidator = userinstalledthemeDescInstalledVersion.Validators[0].(func(string) error)
	visitorlogFields := schema.VisitorLog{}.Fields()
	_ = visitorlogFields
	// visitorlogDescCreatedAt is the schema descriptor for created_at field.
	visitorlogDescCreatedAt := visitorlogFields[1].Descriptor()
	// visitorlog.DefaultCreatedAt holds the default value on creation for the created_at field.
	visitorlog.DefaultCreatedAt = visitorlogDescCreatedAt.Default.(func() time.Time)
	// visitorlogDescVisitorID is the schema descriptor for visitor_id field.
	visitorlogDescVisitorID := visitorlogFields[2].Descriptor()
	// visitorlog.VisitorIDValidator is a validator for the "visitor_id" field. It is called by the builders before save.
	visitorlog.VisitorIDValidator = visitorlogDescVisitorID.Validators[0].(func(string) error)
	// visitorlogDescSessionID is the schema descriptor for session_id field.
	visitorlogDescSessionID := visitorlogFields[3].Descriptor()
	// visitorlog.SessionIDValidator is a validator for the "session_id" field. It is called by the builders before save.
	visitorlog.SessionIDValidator = visitorlogDescSessionID.Validators[0].(func(string) error)
	// visitorlogDescIPAddress is the schema descriptor for ip_address field.
	visitorlogDescIPAddress := visitorlogFields[4].Descriptor()
	// visitorlog.IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
	visitorlog.IPAddressValidator = visitorlogDescIPAddress.Validators[0].(func(string) error)
	// visitorlogDescUserAgent is the schema descriptor for user_agent field.
	visitorlogDescUserAgent := visitorlogFields[5].Descriptor()
	// visitorlog.UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save.
	visitorlog.UserAgentValidator = visitorlogDescUserAgent.Validators[0].(func(string) error)
	// visitorlogDescReferer is the schema descriptor for referer field.
	visitorlogDescReferer := visitorlogFields[6].Descriptor()
	// visitorlog.RefererValidator is a validator for the "referer" field. It is called by the builders before save.
	visitorlog.RefererValidator = visitorlogDescReferer.Validators[0].(func(string) error)
	// visitorlogDescURLPath is the schema descriptor for url_path field.
	visitorlogDescURLPath := visitorlogFields[7].Descriptor()
	// visitorlog.URLPathValidator is a validator for the "url_path" field. It is called by the builders before save.
	visitorlog.URLPathValidator = visitorlogDescURLPath.Validators[0].(func(string) error)
	// visitorlogDescCountry is the schema descriptor for country field.
	visitorlogDescCountry := visitorlogFields[8].Descriptor()
	// visitorlog.CountryValidator is a validator for the "country" field. It is called by the builders before save.
	visitorlog.CountryValidator = visitorlogDescCountry.Validators[0].(func(string) error)
	// visitorlogDescRegion is the schema descriptor for region field.
	visitorlogDescRegion := visitorlogFields[9].Descriptor()
	// visitorlog.RegionValidator is a validator for the "region" field. It is called by the builders before save.
	visitorlog.RegionValidator = visitorlogDescRegion.Validators[0].(func(string) error)
	// visitorlogDescCity is the schema descriptor for city field.
	visitorlogDescCity := visitorlogFields[10].Descriptor()
	// visitorlog.CityValidator is a validator for the "city" field. It is called by the builders before save.
	visitorlog.CityValidator = visitorlogDescCity.Validators[0].(func(string) error)
	// visitorlogDescBrowser is the schema descriptor for browser field.
	visitorlogDescBrowser := visitorlogFields[11].Descriptor()
	// visitorlog.BrowserValidator is a validator for the "browser" field. It is called by the builders before save.
	visitorlog.BrowserValidator = visitorlogDescBrowser.Validators[0].(func(string) error)
	// visitorlogDescOs is the schema descriptor for os field.
	visitorlogDescOs := visitorlogFields[12].Descriptor()
	// visitorlog.OsValidator is a validator for the "os" field. It is called by the builders before save.
	visitorlog.OsValidator = visitorlogDescOs.Validators[0].(func(string) error)
	// visitorlogDescDevice is the schema descriptor for device field.
	visitorlogDescDevice := visitorlogFields[13].Descriptor()
	// visitorlog.DeviceValidator is a validator for the "device" field. It is called by the builders before save.
	visitorlog.DeviceValidator = visitorlogDescDevice.Validators[0].(func(string) error)
	// visitorlogDescDuration is the schema descriptor for duration field.
	visitorlogDescDuration := visitorlogFields[14].Descriptor()
	// visitorlog.DefaultDuration holds the default value on creation for the duration field.
	visitorlog.DefaultDuration = visitorlogDescDuration.Default.(int)
	// visitorlogDescIsBounce is the schema descriptor for is_bounce field.
	visitorlogDescIsBounce := visitorlogFields[15].Descriptor()
	// visitorlog.DefaultIsBounce holds the default value on creation for the is_bounce field.
	visitorlog.DefaultIsBounce = visitorlogDescIsBounce.Default.(bool)
	visitorstatFields := schema.VisitorStat{}.Fields()
	_ = visitorstatFields
	// visitorstatDescCreatedAt is the schema descriptor for created_at field.
	visitorstatDescCreatedAt := visitorstatFields[1].Descriptor()
	// visitorstat.DefaultCreatedAt holds the default value on creation for the created_at field.
	visitorstat.DefaultCreatedAt = visitorstatDescCreatedAt.Default.(func() time.Time)
	// visitorstatDescUpdatedAt is the schema descriptor for updated_at field.
	visitorstatDescUpdatedAt := visitorstatFields[2].Descriptor()
	// visitorstat.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	visitorstat.DefaultUpdatedAt = visitorstatDescUpdatedAt.Default.(func() time.Time)
	// visitorstat.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	visitorstat.UpdateDefaultUpdatedAt = visitorstatDescUpdatedAt.UpdateDefault.(func() time.Time)
	// visitorstatDescUniqueVisitors is the schema descriptor for unique_visitors field.
	visitorstatDescUniqueVisitors := visitorstatFields[4].Descriptor()
	// visitorstat.DefaultUniqueVisitors holds the default value on creation for the unique_visitors field.
	visitorstat.DefaultUniqueVisitors = visitorstatDescUniqueVisitors.Default.(int64)
	// visitorstatDescTotalViews is the schema descriptor for total_views field.
	visitorstatDescTotalViews := visitorstatFields[5].Descriptor()
	// visitorstat.DefaultTotalViews holds the default value on creation for the total_views field.
	visitorstat.DefaultTotalViews = visitorstatDescTotalViews.Default.(int64)
	// visitorstatDescPageViews is the schema descriptor for page_views field.
	visitorstatDescPageViews := visitorstatFields[6].Descriptor()
	// visitorstat.DefaultPageViews holds the default value on creation for the page_views field.
	visitorstat.DefaultPageViews = visitorstatDescPageViews.Default.(int64)
	// visitorstatDescBounceCount is the schema descriptor for bounce_count field.
	visitorstatDescBounceCount := visitorstatFields[7].Descriptor()
	// visitorstat.DefaultBounceCount holds the default value on creation for the bounce_count field.
	visitorstat.DefaultBounceCount = visitorstatDescBounceCount.Default.(int64)
}

const (
	Version = "v0.14.5"                                         // Version of ent codegen.
	Sum     = "h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4=" // Sum of ent codegen.
)
