This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
/
runtime.go
54 lines (50 loc) · 2.53 KB
/
runtime.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by ent, DO NOT EDIT.
package ent
import (
"time"
"github.com/go-faster/gha/internal/ent/chunk"
"github.com/go-faster/gha/internal/ent/schema"
"github.com/go-faster/gha/internal/ent/worker"
"github.com/google/uuid"
)
// 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() {
chunkMixin := schema.Chunk{}.Mixin()
chunkMixinFields0 := chunkMixin[0].Fields()
_ = chunkMixinFields0
chunkFields := schema.Chunk{}.Fields()
_ = chunkFields
// chunkDescCreatedAt is the schema descriptor for created_at field.
chunkDescCreatedAt := chunkMixinFields0[0].Descriptor()
// chunk.DefaultCreatedAt holds the default value on creation for the created_at field.
chunk.DefaultCreatedAt = chunkDescCreatedAt.Default.(func() time.Time)
// chunkDescUpdatedAt is the schema descriptor for updated_at field.
chunkDescUpdatedAt := chunkMixinFields0[1].Descriptor()
// chunk.DefaultUpdatedAt holds the default value on creation for the updated_at field.
chunk.DefaultUpdatedAt = chunkDescUpdatedAt.Default.(func() time.Time)
// chunk.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
chunk.UpdateDefaultUpdatedAt = chunkDescUpdatedAt.UpdateDefault.(func() time.Time)
workerMixin := schema.Worker{}.Mixin()
workerMixinFields0 := workerMixin[0].Fields()
_ = workerMixinFields0
workerMixinFields1 := workerMixin[1].Fields()
_ = workerMixinFields1
workerFields := schema.Worker{}.Fields()
_ = workerFields
// workerDescCreatedAt is the schema descriptor for created_at field.
workerDescCreatedAt := workerMixinFields1[0].Descriptor()
// worker.DefaultCreatedAt holds the default value on creation for the created_at field.
worker.DefaultCreatedAt = workerDescCreatedAt.Default.(func() time.Time)
// workerDescUpdatedAt is the schema descriptor for updated_at field.
workerDescUpdatedAt := workerMixinFields1[1].Descriptor()
// worker.DefaultUpdatedAt holds the default value on creation for the updated_at field.
worker.DefaultUpdatedAt = workerDescUpdatedAt.Default.(func() time.Time)
// worker.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
worker.UpdateDefaultUpdatedAt = workerDescUpdatedAt.UpdateDefault.(func() time.Time)
// workerDescID is the schema descriptor for id field.
workerDescID := workerMixinFields0[0].Descriptor()
// worker.DefaultID holds the default value on creation for the id field.
worker.DefaultID = workerDescID.Default.(func() uuid.UUID)
}