Files
schisandra-album-cloud-micr…/common/ent/runtime.go
2024-11-12 22:59:39 +08:00

250 lines
20 KiB
Go

// Code generated by ent, DO NOT EDIT.
package ent
import (
"schisandra-album-cloud-microservices/common/ent/scaauthpermissionrule"
"schisandra-album-cloud-microservices/common/ent/scaauthrole"
"schisandra-album-cloud-microservices/common/ent/scaauthuser"
"schisandra-album-cloud-microservices/common/ent/scaauthuserdevice"
"schisandra-album-cloud-microservices/common/ent/scaauthusersocial"
"schisandra-album-cloud-microservices/common/ent/schema"
"time"
)
// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
scaauthpermissionruleFields := schema.ScaAuthPermissionRule{}.Fields()
_ = scaauthpermissionruleFields
// scaauthpermissionruleDescPtype is the schema descriptor for ptype field.
scaauthpermissionruleDescPtype := scaauthpermissionruleFields[1].Descriptor()
// scaauthpermissionrule.PtypeValidator is a validator for the "ptype" field. It is called by the builders before save.
scaauthpermissionrule.PtypeValidator = scaauthpermissionruleDescPtype.Validators[0].(func(string) error)
// scaauthpermissionruleDescV0 is the schema descriptor for v0 field.
scaauthpermissionruleDescV0 := scaauthpermissionruleFields[2].Descriptor()
// scaauthpermissionrule.V0Validator is a validator for the "v0" field. It is called by the builders before save.
scaauthpermissionrule.V0Validator = scaauthpermissionruleDescV0.Validators[0].(func(string) error)
// scaauthpermissionruleDescV1 is the schema descriptor for v1 field.
scaauthpermissionruleDescV1 := scaauthpermissionruleFields[3].Descriptor()
// scaauthpermissionrule.V1Validator is a validator for the "v1" field. It is called by the builders before save.
scaauthpermissionrule.V1Validator = scaauthpermissionruleDescV1.Validators[0].(func(string) error)
// scaauthpermissionruleDescV2 is the schema descriptor for v2 field.
scaauthpermissionruleDescV2 := scaauthpermissionruleFields[4].Descriptor()
// scaauthpermissionrule.V2Validator is a validator for the "v2" field. It is called by the builders before save.
scaauthpermissionrule.V2Validator = scaauthpermissionruleDescV2.Validators[0].(func(string) error)
// scaauthpermissionruleDescV3 is the schema descriptor for v3 field.
scaauthpermissionruleDescV3 := scaauthpermissionruleFields[5].Descriptor()
// scaauthpermissionrule.V3Validator is a validator for the "v3" field. It is called by the builders before save.
scaauthpermissionrule.V3Validator = scaauthpermissionruleDescV3.Validators[0].(func(string) error)
// scaauthpermissionruleDescV4 is the schema descriptor for v4 field.
scaauthpermissionruleDescV4 := scaauthpermissionruleFields[6].Descriptor()
// scaauthpermissionrule.V4Validator is a validator for the "v4" field. It is called by the builders before save.
scaauthpermissionrule.V4Validator = scaauthpermissionruleDescV4.Validators[0].(func(string) error)
// scaauthpermissionruleDescV5 is the schema descriptor for v5 field.
scaauthpermissionruleDescV5 := scaauthpermissionruleFields[7].Descriptor()
// scaauthpermissionrule.V5Validator is a validator for the "v5" field. It is called by the builders before save.
scaauthpermissionrule.V5Validator = scaauthpermissionruleDescV5.Validators[0].(func(string) error)
scaauthroleMixin := schema.ScaAuthRole{}.Mixin()
scaauthroleMixinFields0 := scaauthroleMixin[0].Fields()
_ = scaauthroleMixinFields0
scaauthroleFields := schema.ScaAuthRole{}.Fields()
_ = scaauthroleFields
// scaauthroleDescCreatedAt is the schema descriptor for created_at field.
scaauthroleDescCreatedAt := scaauthroleMixinFields0[0].Descriptor()
// scaauthrole.DefaultCreatedAt holds the default value on creation for the created_at field.
scaauthrole.DefaultCreatedAt = scaauthroleDescCreatedAt.Default.(func() time.Time)
// scaauthroleDescUpdatedAt is the schema descriptor for updated_at field.
scaauthroleDescUpdatedAt := scaauthroleMixinFields0[1].Descriptor()
// scaauthrole.DefaultUpdatedAt holds the default value on creation for the updated_at field.
scaauthrole.DefaultUpdatedAt = scaauthroleDescUpdatedAt.Default.(func() time.Time)
// scaauthrole.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
scaauthrole.UpdateDefaultUpdatedAt = scaauthroleDescUpdatedAt.UpdateDefault.(func() time.Time)
// scaauthroleDescDeleted is the schema descriptor for deleted field.
scaauthroleDescDeleted := scaauthroleMixinFields0[2].Descriptor()
// scaauthrole.DefaultDeleted holds the default value on creation for the deleted field.
scaauthrole.DefaultDeleted = scaauthroleDescDeleted.Default.(int8)
// scaauthrole.DeletedValidator is a validator for the "deleted" field. It is called by the builders before save.
scaauthrole.DeletedValidator = scaauthroleDescDeleted.Validators[0].(func(int8) error)
// scaauthroleDescRoleName is the schema descriptor for role_name field.
scaauthroleDescRoleName := scaauthroleFields[1].Descriptor()
// scaauthrole.RoleNameValidator is a validator for the "role_name" field. It is called by the builders before save.
scaauthrole.RoleNameValidator = scaauthroleDescRoleName.Validators[0].(func(string) error)
// scaauthroleDescRoleKey is the schema descriptor for role_key field.
scaauthroleDescRoleKey := scaauthroleFields[2].Descriptor()
// scaauthrole.RoleKeyValidator is a validator for the "role_key" field. It is called by the builders before save.
scaauthrole.RoleKeyValidator = scaauthroleDescRoleKey.Validators[0].(func(string) error)
scaauthuserMixin := schema.ScaAuthUser{}.Mixin()
scaauthuserMixinFields0 := scaauthuserMixin[0].Fields()
_ = scaauthuserMixinFields0
scaauthuserFields := schema.ScaAuthUser{}.Fields()
_ = scaauthuserFields
// scaauthuserDescCreatedAt is the schema descriptor for created_at field.
scaauthuserDescCreatedAt := scaauthuserMixinFields0[0].Descriptor()
// scaauthuser.DefaultCreatedAt holds the default value on creation for the created_at field.
scaauthuser.DefaultCreatedAt = scaauthuserDescCreatedAt.Default.(func() time.Time)
// scaauthuserDescUpdatedAt is the schema descriptor for updated_at field.
scaauthuserDescUpdatedAt := scaauthuserMixinFields0[1].Descriptor()
// scaauthuser.DefaultUpdatedAt holds the default value on creation for the updated_at field.
scaauthuser.DefaultUpdatedAt = scaauthuserDescUpdatedAt.Default.(func() time.Time)
// scaauthuser.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
scaauthuser.UpdateDefaultUpdatedAt = scaauthuserDescUpdatedAt.UpdateDefault.(func() time.Time)
// scaauthuserDescDeleted is the schema descriptor for deleted field.
scaauthuserDescDeleted := scaauthuserMixinFields0[2].Descriptor()
// scaauthuser.DefaultDeleted holds the default value on creation for the deleted field.
scaauthuser.DefaultDeleted = scaauthuserDescDeleted.Default.(int8)
// scaauthuser.DeletedValidator is a validator for the "deleted" field. It is called by the builders before save.
scaauthuser.DeletedValidator = scaauthuserDescDeleted.Validators[0].(func(int8) error)
// scaauthuserDescUID is the schema descriptor for uid field.
scaauthuserDescUID := scaauthuserFields[1].Descriptor()
// scaauthuser.UIDValidator is a validator for the "uid" field. It is called by the builders before save.
scaauthuser.UIDValidator = scaauthuserDescUID.Validators[0].(func(string) error)
// scaauthuserDescUsername is the schema descriptor for username field.
scaauthuserDescUsername := scaauthuserFields[2].Descriptor()
// scaauthuser.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
scaauthuser.UsernameValidator = scaauthuserDescUsername.Validators[0].(func(string) error)
// scaauthuserDescNickname is the schema descriptor for nickname field.
scaauthuserDescNickname := scaauthuserFields[3].Descriptor()
// scaauthuser.NicknameValidator is a validator for the "nickname" field. It is called by the builders before save.
scaauthuser.NicknameValidator = scaauthuserDescNickname.Validators[0].(func(string) error)
// scaauthuserDescEmail is the schema descriptor for email field.
scaauthuserDescEmail := scaauthuserFields[4].Descriptor()
// scaauthuser.EmailValidator is a validator for the "email" field. It is called by the builders before save.
scaauthuser.EmailValidator = scaauthuserDescEmail.Validators[0].(func(string) error)
// scaauthuserDescPhone is the schema descriptor for phone field.
scaauthuserDescPhone := scaauthuserFields[5].Descriptor()
// scaauthuser.PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
scaauthuser.PhoneValidator = scaauthuserDescPhone.Validators[0].(func(string) error)
// scaauthuserDescPassword is the schema descriptor for password field.
scaauthuserDescPassword := scaauthuserFields[6].Descriptor()
// scaauthuser.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
scaauthuser.PasswordValidator = scaauthuserDescPassword.Validators[0].(func(string) error)
// scaauthuserDescGender is the schema descriptor for gender field.
scaauthuserDescGender := scaauthuserFields[7].Descriptor()
// scaauthuser.GenderValidator is a validator for the "gender" field. It is called by the builders before save.
scaauthuser.GenderValidator = scaauthuserDescGender.Validators[0].(func(string) error)
// scaauthuserDescStatus is the schema descriptor for status field.
scaauthuserDescStatus := scaauthuserFields[9].Descriptor()
// scaauthuser.DefaultStatus holds the default value on creation for the status field.
scaauthuser.DefaultStatus = scaauthuserDescStatus.Default.(int8)
// scaauthuserDescIntroduce is the schema descriptor for introduce field.
scaauthuserDescIntroduce := scaauthuserFields[10].Descriptor()
// scaauthuser.IntroduceValidator is a validator for the "introduce" field. It is called by the builders before save.
scaauthuser.IntroduceValidator = scaauthuserDescIntroduce.Validators[0].(func(string) error)
// scaauthuserDescBlog is the schema descriptor for blog field.
scaauthuserDescBlog := scaauthuserFields[11].Descriptor()
// scaauthuser.BlogValidator is a validator for the "blog" field. It is called by the builders before save.
scaauthuser.BlogValidator = scaauthuserDescBlog.Validators[0].(func(string) error)
// scaauthuserDescLocation is the schema descriptor for location field.
scaauthuserDescLocation := scaauthuserFields[12].Descriptor()
// scaauthuser.LocationValidator is a validator for the "location" field. It is called by the builders before save.
scaauthuser.LocationValidator = scaauthuserDescLocation.Validators[0].(func(string) error)
// scaauthuserDescCompany is the schema descriptor for company field.
scaauthuserDescCompany := scaauthuserFields[13].Descriptor()
// scaauthuser.CompanyValidator is a validator for the "company" field. It is called by the builders before save.
scaauthuser.CompanyValidator = scaauthuserDescCompany.Validators[0].(func(string) error)
scaauthuserdeviceMixin := schema.ScaAuthUserDevice{}.Mixin()
scaauthuserdeviceMixinFields0 := scaauthuserdeviceMixin[0].Fields()
_ = scaauthuserdeviceMixinFields0
scaauthuserdeviceFields := schema.ScaAuthUserDevice{}.Fields()
_ = scaauthuserdeviceFields
// scaauthuserdeviceDescCreatedAt is the schema descriptor for created_at field.
scaauthuserdeviceDescCreatedAt := scaauthuserdeviceMixinFields0[0].Descriptor()
// scaauthuserdevice.DefaultCreatedAt holds the default value on creation for the created_at field.
scaauthuserdevice.DefaultCreatedAt = scaauthuserdeviceDescCreatedAt.Default.(func() time.Time)
// scaauthuserdeviceDescUpdatedAt is the schema descriptor for updated_at field.
scaauthuserdeviceDescUpdatedAt := scaauthuserdeviceMixinFields0[1].Descriptor()
// scaauthuserdevice.DefaultUpdatedAt holds the default value on creation for the updated_at field.
scaauthuserdevice.DefaultUpdatedAt = scaauthuserdeviceDescUpdatedAt.Default.(func() time.Time)
// scaauthuserdevice.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
scaauthuserdevice.UpdateDefaultUpdatedAt = scaauthuserdeviceDescUpdatedAt.UpdateDefault.(func() time.Time)
// scaauthuserdeviceDescDeleted is the schema descriptor for deleted field.
scaauthuserdeviceDescDeleted := scaauthuserdeviceMixinFields0[2].Descriptor()
// scaauthuserdevice.DefaultDeleted holds the default value on creation for the deleted field.
scaauthuserdevice.DefaultDeleted = scaauthuserdeviceDescDeleted.Default.(int8)
// scaauthuserdevice.DeletedValidator is a validator for the "deleted" field. It is called by the builders before save.
scaauthuserdevice.DeletedValidator = scaauthuserdeviceDescDeleted.Validators[0].(func(int8) error)
// scaauthuserdeviceDescUserID is the schema descriptor for user_id field.
scaauthuserdeviceDescUserID := scaauthuserdeviceFields[1].Descriptor()
// scaauthuserdevice.UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
scaauthuserdevice.UserIDValidator = scaauthuserdeviceDescUserID.Validators[0].(func(string) error)
// scaauthuserdeviceDescIP is the schema descriptor for ip field.
scaauthuserdeviceDescIP := scaauthuserdeviceFields[2].Descriptor()
// scaauthuserdevice.IPValidator is a validator for the "ip" field. It is called by the builders before save.
scaauthuserdevice.IPValidator = scaauthuserdeviceDescIP.Validators[0].(func(string) error)
// scaauthuserdeviceDescLocation is the schema descriptor for location field.
scaauthuserdeviceDescLocation := scaauthuserdeviceFields[3].Descriptor()
// scaauthuserdevice.LocationValidator is a validator for the "location" field. It is called by the builders before save.
scaauthuserdevice.LocationValidator = scaauthuserdeviceDescLocation.Validators[0].(func(string) error)
// scaauthuserdeviceDescAgent is the schema descriptor for agent field.
scaauthuserdeviceDescAgent := scaauthuserdeviceFields[4].Descriptor()
// scaauthuserdevice.AgentValidator is a validator for the "agent" field. It is called by the builders before save.
scaauthuserdevice.AgentValidator = scaauthuserdeviceDescAgent.Validators[0].(func(string) error)
// scaauthuserdeviceDescBrowser is the schema descriptor for browser field.
scaauthuserdeviceDescBrowser := scaauthuserdeviceFields[5].Descriptor()
// scaauthuserdevice.BrowserValidator is a validator for the "browser" field. It is called by the builders before save.
scaauthuserdevice.BrowserValidator = scaauthuserdeviceDescBrowser.Validators[0].(func(string) error)
// scaauthuserdeviceDescOperatingSystem is the schema descriptor for operating_system field.
scaauthuserdeviceDescOperatingSystem := scaauthuserdeviceFields[6].Descriptor()
// scaauthuserdevice.OperatingSystemValidator is a validator for the "operating_system" field. It is called by the builders before save.
scaauthuserdevice.OperatingSystemValidator = scaauthuserdeviceDescOperatingSystem.Validators[0].(func(string) error)
// scaauthuserdeviceDescBrowserVersion is the schema descriptor for browser_version field.
scaauthuserdeviceDescBrowserVersion := scaauthuserdeviceFields[7].Descriptor()
// scaauthuserdevice.BrowserVersionValidator is a validator for the "browser_version" field. It is called by the builders before save.
scaauthuserdevice.BrowserVersionValidator = scaauthuserdeviceDescBrowserVersion.Validators[0].(func(string) error)
// scaauthuserdeviceDescMozilla is the schema descriptor for mozilla field.
scaauthuserdeviceDescMozilla := scaauthuserdeviceFields[10].Descriptor()
// scaauthuserdevice.MozillaValidator is a validator for the "mozilla" field. It is called by the builders before save.
scaauthuserdevice.MozillaValidator = scaauthuserdeviceDescMozilla.Validators[0].(func(string) error)
// scaauthuserdeviceDescPlatform is the schema descriptor for platform field.
scaauthuserdeviceDescPlatform := scaauthuserdeviceFields[11].Descriptor()
// scaauthuserdevice.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
scaauthuserdevice.PlatformValidator = scaauthuserdeviceDescPlatform.Validators[0].(func(string) error)
// scaauthuserdeviceDescEngineName is the schema descriptor for engine_name field.
scaauthuserdeviceDescEngineName := scaauthuserdeviceFields[12].Descriptor()
// scaauthuserdevice.EngineNameValidator is a validator for the "engine_name" field. It is called by the builders before save.
scaauthuserdevice.EngineNameValidator = scaauthuserdeviceDescEngineName.Validators[0].(func(string) error)
// scaauthuserdeviceDescEngineVersion is the schema descriptor for engine_version field.
scaauthuserdeviceDescEngineVersion := scaauthuserdeviceFields[13].Descriptor()
// scaauthuserdevice.EngineVersionValidator is a validator for the "engine_version" field. It is called by the builders before save.
scaauthuserdevice.EngineVersionValidator = scaauthuserdeviceDescEngineVersion.Validators[0].(func(string) error)
scaauthusersocialMixin := schema.ScaAuthUserSocial{}.Mixin()
scaauthusersocialMixinFields0 := scaauthusersocialMixin[0].Fields()
_ = scaauthusersocialMixinFields0
scaauthusersocialFields := schema.ScaAuthUserSocial{}.Fields()
_ = scaauthusersocialFields
// scaauthusersocialDescCreatedAt is the schema descriptor for created_at field.
scaauthusersocialDescCreatedAt := scaauthusersocialMixinFields0[0].Descriptor()
// scaauthusersocial.DefaultCreatedAt holds the default value on creation for the created_at field.
scaauthusersocial.DefaultCreatedAt = scaauthusersocialDescCreatedAt.Default.(func() time.Time)
// scaauthusersocialDescUpdatedAt is the schema descriptor for updated_at field.
scaauthusersocialDescUpdatedAt := scaauthusersocialMixinFields0[1].Descriptor()
// scaauthusersocial.DefaultUpdatedAt holds the default value on creation for the updated_at field.
scaauthusersocial.DefaultUpdatedAt = scaauthusersocialDescUpdatedAt.Default.(func() time.Time)
// scaauthusersocial.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
scaauthusersocial.UpdateDefaultUpdatedAt = scaauthusersocialDescUpdatedAt.UpdateDefault.(func() time.Time)
// scaauthusersocialDescDeleted is the schema descriptor for deleted field.
scaauthusersocialDescDeleted := scaauthusersocialMixinFields0[2].Descriptor()
// scaauthusersocial.DefaultDeleted holds the default value on creation for the deleted field.
scaauthusersocial.DefaultDeleted = scaauthusersocialDescDeleted.Default.(int8)
// scaauthusersocial.DeletedValidator is a validator for the "deleted" field. It is called by the builders before save.
scaauthusersocial.DeletedValidator = scaauthusersocialDescDeleted.Validators[0].(func(int8) error)
// scaauthusersocialDescUserID is the schema descriptor for user_id field.
scaauthusersocialDescUserID := scaauthusersocialFields[1].Descriptor()
// scaauthusersocial.UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
scaauthusersocial.UserIDValidator = scaauthusersocialDescUserID.Validators[0].(func(string) error)
// scaauthusersocialDescOpenID is the schema descriptor for open_id field.
scaauthusersocialDescOpenID := scaauthusersocialFields[2].Descriptor()
// scaauthusersocial.OpenIDValidator is a validator for the "open_id" field. It is called by the builders before save.
scaauthusersocial.OpenIDValidator = scaauthusersocialDescOpenID.Validators[0].(func(string) error)
// scaauthusersocialDescSource is the schema descriptor for source field.
scaauthusersocialDescSource := scaauthusersocialFields[3].Descriptor()
// scaauthusersocial.SourceValidator is a validator for the "source" field. It is called by the builders before save.
scaauthusersocial.SourceValidator = scaauthusersocialDescSource.Validators[0].(func(string) error)
// scaauthusersocialDescStatus is the schema descriptor for status field.
scaauthusersocialDescStatus := scaauthusersocialFields[4].Descriptor()
// scaauthusersocial.DefaultStatus holds the default value on creation for the status field.
scaauthusersocial.DefaultStatus = scaauthusersocialDescStatus.Default.(int)
}