File size: 1,408 Bytes
fea99b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Code generated by ent, DO NOT EDIT.

package db

import (
	"time"

	"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db/example2"
	"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/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() {
	example2Mixin := schema.Example2{}.Mixin()
	example2MixinFields0 := example2Mixin[0].Fields()
	_ = example2MixinFields0
	example2Fields := schema.Example2{}.Fields()
	_ = example2Fields
	// example2DescCreatedAt is the schema descriptor for created_at field.
	example2DescCreatedAt := example2MixinFields0[0].Descriptor()
	// example2.DefaultCreatedAt holds the default value on creation for the created_at field.
	example2.DefaultCreatedAt = example2DescCreatedAt.Default.(func() time.Time)
	// example2DescUpdatedAt is the schema descriptor for updated_at field.
	example2DescUpdatedAt := example2MixinFields0[1].Descriptor()
	// example2.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	example2.DefaultUpdatedAt = example2DescUpdatedAt.Default.(func() time.Time)
	// example2.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	example2.UpdateDefaultUpdatedAt = example2DescUpdatedAt.UpdateDefault.(func() time.Time)
}