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/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)
}