plc.directory mirror
1// Code generated by ent, DO NOT EDIT.
2
3package ent
4
5import (
6 "time"
7
8 "tangled.sh/seiso.moe/aletheia.directory/ent/operation"
9 "tangled.sh/seiso.moe/aletheia.directory/ent/schema"
10)
11
12// The init function reads all schema descriptors with runtime code
13// (default values, validators, hooks and policies) and stitches it
14// to their package variables.
15func init() {
16 operationFields := schema.Operation{}.Fields()
17 _ = operationFields
18 // operationDescDid is the schema descriptor for did field.
19 operationDescDid := operationFields[0].Descriptor()
20 // operation.DidValidator is a validator for the "did" field. It is called by the builders before save.
21 operation.DidValidator = operationDescDid.Validators[0].(func(string) error)
22 // operationDescCid is the schema descriptor for cid field.
23 operationDescCid := operationFields[2].Descriptor()
24 // operation.CidValidator is a validator for the "cid" field. It is called by the builders before save.
25 operation.CidValidator = operationDescCid.Validators[0].(func(string) error)
26 // operationDescNullified is the schema descriptor for nullified field.
27 operationDescNullified := operationFields[3].Descriptor()
28 // operation.DefaultNullified holds the default value on creation for the nullified field.
29 operation.DefaultNullified = operationDescNullified.Default.(bool)
30 // operationDescCreatedAt is the schema descriptor for created_at field.
31 operationDescCreatedAt := operationFields[4].Descriptor()
32 // operation.DefaultCreatedAt holds the default value on creation for the created_at field.
33 operation.DefaultCreatedAt = operationDescCreatedAt.Default.(func() time.Time)
34}