230 lines
18 KiB
Go
230 lines
18 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)
|
|
scaauthroleFields := schema.ScaAuthRole{}.Fields()
|
|
_ = scaauthroleFields
|
|
// 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)
|
|
// scaauthroleDescCreatedAt is the schema descriptor for created_at field.
|
|
scaauthroleDescCreatedAt := scaauthroleFields[3].Descriptor()
|
|
// scaauthrole.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
scaauthrole.DefaultCreatedAt = scaauthroleDescCreatedAt.Default.(func() time.Time)
|
|
// scaauthroleDescUpdateAt is the schema descriptor for update_at field.
|
|
scaauthroleDescUpdateAt := scaauthroleFields[4].Descriptor()
|
|
// scaauthrole.DefaultUpdateAt holds the default value on creation for the update_at field.
|
|
scaauthrole.DefaultUpdateAt = scaauthroleDescUpdateAt.Default.(func() time.Time)
|
|
// scaauthrole.UpdateDefaultUpdateAt holds the default value on update for the update_at field.
|
|
scaauthrole.UpdateDefaultUpdateAt = scaauthroleDescUpdateAt.UpdateDefault.(func() time.Time)
|
|
// scaauthroleDescDeleted is the schema descriptor for deleted field.
|
|
scaauthroleDescDeleted := scaauthroleFields[5].Descriptor()
|
|
// scaauthrole.DefaultDeleted holds the default value on creation for the deleted field.
|
|
scaauthrole.DefaultDeleted = scaauthroleDescDeleted.Default.(int)
|
|
scaauthuserFields := schema.ScaAuthUser{}.Fields()
|
|
_ = scaauthuserFields
|
|
// 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)
|
|
// scaauthuserDescCreatedAt is the schema descriptor for created_at field.
|
|
scaauthuserDescCreatedAt := scaauthuserFields[11].Descriptor()
|
|
// scaauthuser.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
scaauthuser.DefaultCreatedAt = scaauthuserDescCreatedAt.Default.(func() time.Time)
|
|
// scaauthuserDescUpdateAt is the schema descriptor for update_at field.
|
|
scaauthuserDescUpdateAt := scaauthuserFields[12].Descriptor()
|
|
// scaauthuser.DefaultUpdateAt holds the default value on creation for the update_at field.
|
|
scaauthuser.DefaultUpdateAt = scaauthuserDescUpdateAt.Default.(func() time.Time)
|
|
// scaauthuser.UpdateDefaultUpdateAt holds the default value on update for the update_at field.
|
|
scaauthuser.UpdateDefaultUpdateAt = scaauthuserDescUpdateAt.UpdateDefault.(func() time.Time)
|
|
// scaauthuserDescDeleted is the schema descriptor for deleted field.
|
|
scaauthuserDescDeleted := scaauthuserFields[13].Descriptor()
|
|
// scaauthuser.DefaultDeleted holds the default value on creation for the deleted field.
|
|
scaauthuser.DefaultDeleted = scaauthuserDescDeleted.Default.(int8)
|
|
// scaauthuserDescBlog is the schema descriptor for blog field.
|
|
scaauthuserDescBlog := scaauthuserFields[14].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[15].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[16].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)
|
|
scaauthuserdeviceFields := schema.ScaAuthUserDevice{}.Fields()
|
|
_ = scaauthuserdeviceFields
|
|
// 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)
|
|
// scaauthuserdeviceDescCreatedAt is the schema descriptor for created_at field.
|
|
scaauthuserdeviceDescCreatedAt := scaauthuserdeviceFields[5].Descriptor()
|
|
// scaauthuserdevice.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
scaauthuserdevice.DefaultCreatedAt = scaauthuserdeviceDescCreatedAt.Default.(func() time.Time)
|
|
// scaauthuserdeviceDescUpdateAt is the schema descriptor for update_at field.
|
|
scaauthuserdeviceDescUpdateAt := scaauthuserdeviceFields[6].Descriptor()
|
|
// scaauthuserdevice.DefaultUpdateAt holds the default value on creation for the update_at field.
|
|
scaauthuserdevice.DefaultUpdateAt = scaauthuserdeviceDescUpdateAt.Default.(func() time.Time)
|
|
// scaauthuserdevice.UpdateDefaultUpdateAt holds the default value on update for the update_at field.
|
|
scaauthuserdevice.UpdateDefaultUpdateAt = scaauthuserdeviceDescUpdateAt.UpdateDefault.(func() time.Time)
|
|
// scaauthuserdeviceDescDeleted is the schema descriptor for deleted field.
|
|
scaauthuserdeviceDescDeleted := scaauthuserdeviceFields[7].Descriptor()
|
|
// scaauthuserdevice.DefaultDeleted holds the default value on creation for the deleted field.
|
|
scaauthuserdevice.DefaultDeleted = scaauthuserdeviceDescDeleted.Default.(int)
|
|
// scaauthuserdeviceDescBrowser is the schema descriptor for browser field.
|
|
scaauthuserdeviceDescBrowser := scaauthuserdeviceFields[8].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[9].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[10].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[13].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[14].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[15].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[16].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)
|
|
scaauthusersocialFields := schema.ScaAuthUserSocial{}.Fields()
|
|
_ = scaauthusersocialFields
|
|
// 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)
|
|
// scaauthusersocialDescCreatedAt is the schema descriptor for created_at field.
|
|
scaauthusersocialDescCreatedAt := scaauthusersocialFields[5].Descriptor()
|
|
// scaauthusersocial.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
scaauthusersocial.DefaultCreatedAt = scaauthusersocialDescCreatedAt.Default.(func() time.Time)
|
|
// scaauthusersocialDescUpdateAt is the schema descriptor for update_at field.
|
|
scaauthusersocialDescUpdateAt := scaauthusersocialFields[6].Descriptor()
|
|
// scaauthusersocial.DefaultUpdateAt holds the default value on creation for the update_at field.
|
|
scaauthusersocial.DefaultUpdateAt = scaauthusersocialDescUpdateAt.Default.(func() time.Time)
|
|
// scaauthusersocial.UpdateDefaultUpdateAt holds the default value on update for the update_at field.
|
|
scaauthusersocial.UpdateDefaultUpdateAt = scaauthusersocialDescUpdateAt.UpdateDefault.(func() time.Time)
|
|
// scaauthusersocialDescDeleted is the schema descriptor for deleted field.
|
|
scaauthusersocialDescDeleted := scaauthusersocialFields[7].Descriptor()
|
|
// scaauthusersocial.DefaultDeleted holds the default value on creation for the deleted field.
|
|
scaauthusersocial.DefaultDeleted = scaauthusersocialDescDeleted.Default.(int)
|
|
}
|