// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
The init function reads all schema descriptors with runtime code
(default values, validators, hooks and policies) and stitches it
to their package variables.
// 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() {
	apiauditMixin := schema.APIAudit{}.Mixin()
	apiauditMixinFields0 := apiauditMixin[0].Fields()
	_ = apiauditMixinFields0
	apiauditFields := schema.APIAudit{}.Fields()
	_ = apiauditFields
	apiauditDescCreatedAt := apiauditMixinFields0[0].Descriptor()
	apiaudit.DefaultCreatedAt = apiauditDescCreatedAt.Default.(func() time.Time)
	apiauditDescUpdatedAt := apiauditMixinFields0[1].Descriptor()
	apiaudit.DefaultUpdatedAt = apiauditDescUpdatedAt.Default.(func() time.Time)
	apiaudit.UpdateDefaultUpdatedAt = apiauditDescUpdatedAt.UpdateDefault.(func() time.Time)
	apiauditDescID := apiauditFields[0].Descriptor()
	apiaudit.DefaultID = apiauditDescID.Default.(func() string)
	apiaudit.IDValidator = apiauditDescID.Validators[0].(func(string) error)
	factMixin := schema.Fact{}.Mixin()
	factMixinFields0 := factMixin[0].Fields()
	_ = factMixinFields0
	factFields := schema.Fact{}.Fields()
	_ = factFields
	factDescCreatedAt := factMixinFields0[0].Descriptor()
	fact.DefaultCreatedAt = factDescCreatedAt.Default.(func() time.Time)
	factDescUpdatedAt := factMixinFields0[1].Descriptor()
	fact.DefaultUpdatedAt = factDescUpdatedAt.Default.(func() time.Time)
	fact.UpdateDefaultUpdatedAt = factDescUpdatedAt.UpdateDefault.(func() time.Time)
	factDescID := factFields[0].Descriptor()
	fact.DefaultID = factDescID.Default.(func() string)
	fact.IDValidator = factDescID.Validators[0].(func(string) error)
	facttypeMixin := schema.FactType{}.Mixin()
	facttypeMixinFields0 := facttypeMixin[0].Fields()
	_ = facttypeMixinFields0
	facttypeFields := schema.FactType{}.Fields()
	_ = facttypeFields
	facttypeDescCreatedAt := facttypeMixinFields0[0].Descriptor()
	facttype.DefaultCreatedAt = facttypeDescCreatedAt.Default.(func() time.Time)
	facttypeDescUpdatedAt := facttypeMixinFields0[1].Descriptor()
	facttype.DefaultUpdatedAt = facttypeDescUpdatedAt.Default.(func() time.Time)
	facttype.UpdateDefaultUpdatedAt = facttypeDescUpdatedAt.UpdateDefault.(func() time.Time)
	facttypeDescBuiltIn := facttypeFields[2].Descriptor()
	facttype.DefaultBuiltIn = facttypeDescBuiltIn.Default.(bool)
	facttypeDescID := facttypeFields[0].Descriptor()
	facttype.DefaultID = facttypeDescID.Default.(func() string)
	facttype.IDValidator = facttypeDescID.Validators[0].(func(string) error)
	grantMixin := schema.Grant{}.Mixin()
	grantMixinFields0 := grantMixin[0].Fields()
	_ = grantMixinFields0
	grantFields := schema.Grant{}.Fields()
	_ = grantFields
	grantDescCreatedAt := grantMixinFields0[0].Descriptor()
	grant.DefaultCreatedAt = grantDescCreatedAt.Default.(func() time.Time)
	grantDescUpdatedAt := grantMixinFields0[1].Descriptor()
	grant.DefaultUpdatedAt = grantDescUpdatedAt.Default.(func() time.Time)
	grant.UpdateDefaultUpdatedAt = grantDescUpdatedAt.UpdateDefault.(func() time.Time)
	grantDescID := grantFields[0].Descriptor()
	grant.DefaultID = grantDescID.Default.(func() string)
	grant.IDValidator = grantDescID.Validators[0].(func(string) error)
	scopeMixin := schema.Scope{}.Mixin()
	scopeMixinFields0 := scopeMixin[0].Fields()
	_ = scopeMixinFields0
	scopeFields := schema.Scope{}.Fields()
	_ = scopeFields
	scopeDescCreatedAt := scopeMixinFields0[0].Descriptor()
	scope.DefaultCreatedAt = scopeDescCreatedAt.Default.(func() time.Time)
	scopeDescUpdatedAt := scopeMixinFields0[1].Descriptor()
	scope.DefaultUpdatedAt = scopeDescUpdatedAt.Default.(func() time.Time)
	scope.UpdateDefaultUpdatedAt = scopeDescUpdatedAt.UpdateDefault.(func() time.Time)
	scopeDescNonce := scopeFields[2].Descriptor()
	scope.DefaultNonce = scopeDescNonce.Default.(func() string)
	scopeDescID := scopeFields[0].Descriptor()
	scope.DefaultID = scopeDescID.Default.(func() string)
	scope.IDValidator = scopeDescID.Validators[0].(func(string) error)
}
func init ( ) { apiauditMixin := schema . APIAudit { } . Mixin ( ) apiauditMixinFields0 := apiauditMixin [ 0 ] . Fields ( ) _ = apiauditMixinFields0 apiauditFields := schema . APIAudit { } . Fields ( ) _ = apiauditFields apiauditDescCreatedAt := apiauditMixinFields0 [ 0 ] . Descriptor ( ) apiaudit . DefaultCreatedAt = apiauditDescCreatedAt . Default . ( func ( ) time . Time ) apiauditDescUpdatedAt := apiauditMixinFields0 [ 1 ] . Descriptor ( ) apiaudit . DefaultUpdatedAt = apiauditDescUpdatedAt . Default . ( func ( ) time . Time ) apiaudit . UpdateDefaultUpdatedAt = apiauditDescUpdatedAt . UpdateDefault . ( func ( ) time . Time ) apiauditDescID := apiauditFields [ 0 ] . Descriptor ( ) apiaudit . DefaultID = apiauditDescID . Default . ( func ( ) string ) apiaudit . IDValidator = apiauditDescID . Validators [ 0 ] . ( func ( string ) error ) factMixin := schema . Fact { } . Mixin ( ) factMixinFields0 := factMixin [ 0 ] . Fields ( ) _ = factMixinFields0 factFields := schema . Fact { } . Fields ( ) _ = factFields factDescCreatedAt := factMixinFields0 [ 0 ] . Descriptor ( ) fact . DefaultCreatedAt = factDescCreatedAt . Default . ( func ( ) time . Time ) factDescUpdatedAt := factMixinFields0 [ 1 ] . Descriptor ( ) fact . DefaultUpdatedAt = factDescUpdatedAt . Default . ( func ( ) time . Time ) fact . UpdateDefaultUpdatedAt = factDescUpdatedAt . UpdateDefault . ( func ( ) time . Time ) factDescID := factFields [ 0 ] . Descriptor ( ) fact . DefaultID = factDescID . Default . ( func ( ) string ) fact . IDValidator = factDescID . Validators [ 0 ] . ( func ( string ) error ) facttypeMixin := schema . FactType { } . Mixin ( ) facttypeMixinFields0 := facttypeMixin [ 0 ] . Fields ( ) _ = facttypeMixinFields0 facttypeFields := schema . FactType { } . Fields ( ) _ = facttypeFields facttypeDescCreatedAt := facttypeMixinFields0 [ 0 ] . Descriptor ( ) facttype . DefaultCreatedAt = facttypeDescCreatedAt . Default . ( func ( ) time . Time ) facttypeDescUpdatedAt := facttypeMixinFields0 [ 1 ] . Descriptor ( ) facttype . DefaultUpdatedAt = facttypeDescUpdatedAt . Default . ( func ( ) time . Time ) facttype . UpdateDefaultUpdatedAt = facttypeDescUpdatedAt . UpdateDefault . ( func ( ) time . Time ) facttypeDescBuiltIn := facttypeFields [ 2 ] . Descriptor ( ) facttype . DefaultBuiltIn = facttypeDescBuiltIn . Default . ( bool ) facttypeDescID := facttypeFields [ 0 ] . Descriptor ( ) facttype . DefaultID = facttypeDescID . Default . ( func ( ) string ) facttype . IDValidator = facttypeDescID . Validators [ 0 ] . ( func ( string ) error ) grantMixin := schema . Grant { } . Mixin ( ) grantMixinFields0 := grantMixin [ 0 ] . Fields ( ) _ = grantMixinFields0 grantFields := schema . Grant { } . Fields ( ) _ = grantFields grantDescCreatedAt := grantMixinFields0 [ 0 ] . Descriptor ( ) grant . DefaultCreatedAt = grantDescCreatedAt . Default . ( func ( ) time . Time ) grantDescUpdatedAt := grantMixinFields0 [ 1 ] . Descriptor ( ) grant . DefaultUpdatedAt = grantDescUpdatedAt . Default . ( func ( ) time . Time ) grant . UpdateDefaultUpdatedAt = grantDescUpdatedAt . UpdateDefault . ( func ( ) time . Time ) grantDescID := grantFields [ 0 ] . Descriptor ( ) grant . DefaultID = grantDescID . Default . ( func ( ) string ) grant . IDValidator = grantDescID . Validators [ 0 ] . ( func ( string ) error ) scopeMixin := schema . Scope { } . Mixin ( ) scopeMixinFields0 := scopeMixin [ 0 ] . Fields ( ) _ = scopeMixinFields0 scopeFields := schema . Scope { } . Fields ( ) _ = scopeFields scopeDescCreatedAt := scopeMixinFields0 [ 0 ] . Descriptor ( ) scope . DefaultCreatedAt = scopeDescCreatedAt . Default . ( func ( ) time . Time ) scopeDescUpdatedAt := scopeMixinFields0 [ 1 ] . Descriptor ( ) scope . DefaultUpdatedAt = scopeDescUpdatedAt . Default . ( func ( ) time . Time ) scope . UpdateDefaultUpdatedAt = scopeDescUpdatedAt . UpdateDefault . ( func ( ) time . Time ) scopeDescNonce := scopeFields [ 2 ] . Descriptor ( ) scope . DefaultNonce = scopeDescNonce . Default . ( func ( ) string ) scopeDescID := scopeFields [ 0 ] . Descriptor ( ) scope . DefaultID = scopeDescID . Default . ( func ( ) string ) scope . IDValidator = scopeDescID . Validators [ 0 ] . ( func ( string ) error ) }
The init function reads all schema descriptors with runtime code
(default values, validators, hooks and policies) and stitches it
to their package variables.
The init function reads all schema descriptors with runtime code ( default values validators hooks and policies ) and stitches it to their package variables .
// apiauditDescCreatedAt is the schema descriptor for created_at field. // apiaudit.DefaultCreatedAt holds the default value on creation for the created_at field. // apiauditDescUpdatedAt is the schema descriptor for updated_at field. // apiaudit.DefaultUpdatedAt holds the default value on creation for the updated_at field. // apiaudit.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. // apiauditDescID is the schema descriptor for id field. // apiaudit.DefaultID holds the default value on creation for the id field. // apiaudit.IDValidator is a validator for the "id" field. It is called by the builders before save. // factDescCreatedAt is the schema descriptor for created_at field. // fact.DefaultCreatedAt holds the default value on creation for the created_at field. // factDescUpdatedAt is the schema descriptor for updated_at field. // fact.DefaultUpdatedAt holds the default value on creation for the updated_at field. // fact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. // factDescID is the schema descriptor for id field. // fact.DefaultID holds the default value on creation for the id field. // fact.IDValidator is a validator for the "id" field. It is called by the builders before save. // facttypeDescCreatedAt is the schema descriptor for created_at field. // facttype.DefaultCreatedAt holds the default value on creation for the created_at field. // facttypeDescUpdatedAt is the schema descriptor for updated_at field. // facttype.DefaultUpdatedAt holds the default value on creation for the updated_at field. // facttype.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. // facttypeDescBuiltIn is the schema descriptor for built_in field. // facttype.DefaultBuiltIn holds the default value on creation for the built_in field. // facttypeDescID is the schema descriptor for id field. // facttype.DefaultID holds the default value on creation for the id field. // facttype.IDValidator is a validator for the "id" field. It is called by the builders before save. // grantDescCreatedAt is the schema descriptor for created_at field. // grant.DefaultCreatedAt holds the default value on creation for the created_at field. // grantDescUpdatedAt is the schema descriptor for updated_at field. // grant.DefaultUpdatedAt holds the default value on creation for the updated_at field. // grant.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. // grantDescID is the schema descriptor for id field. // grant.DefaultID holds the default value on creation for the id field. // grant.IDValidator is a validator for the "id" field. It is called by the builders before save. // scopeDescCreatedAt is the schema descriptor for created_at field. // scope.DefaultCreatedAt holds the default value on creation for the created_at field. // scopeDescUpdatedAt is the schema descriptor for updated_at field. // scope.DefaultUpdatedAt holds the default value on creation for the updated_at field. // scope.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. // scopeDescNonce is the schema descriptor for nonce field. // scope.DefaultNonce holds the default value on creation for the nonce field. // scopeDescID is the schema descriptor for id field. // scope.DefaultID holds the default value on creation for the id field. // scope.IDValidator is a validator for the "id" field. It is called by the builders before save.