| // Code generated by ent, DO NOT EDIT. | |
| package db | |
| import ( | |
| "time" | |
| "github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db/example1" | |
| "github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/schema" | |
| ) | |
| // 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() { | |
| example1Mixin := schema.Example1{}.Mixin() | |
| example1MixinFields0 := example1Mixin[0].Fields() | |
| _ = example1MixinFields0 | |
| example1Fields := schema.Example1{}.Fields() | |
| _ = example1Fields | |
| // example1DescCreatedAt is the schema descriptor for created_at field. | |
| example1DescCreatedAt := example1MixinFields0[0].Descriptor() | |
| // example1.DefaultCreatedAt holds the default value on creation for the created_at field. | |
| example1.DefaultCreatedAt = example1DescCreatedAt.Default.(func() time.Time) | |
| // example1DescUpdatedAt is the schema descriptor for updated_at field. | |
| example1DescUpdatedAt := example1MixinFields0[1].Descriptor() | |
| // example1.DefaultUpdatedAt holds the default value on creation for the updated_at field. | |
| example1.DefaultUpdatedAt = example1DescUpdatedAt.Default.(func() time.Time) | |
| // example1.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. | |
| example1.UpdateDefaultUpdatedAt = example1DescUpdatedAt.UpdateDefault.(func() time.Time) | |
| } | |