aboutsummaryrefslogtreecommitdiff
path: root/cmd/_old/tourian/ent/runtime.go
blob: 9885886d72289ab3e31ba6b59e6b2e943ae37159 (plain)
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
// Code generated by ent, DO NOT EDIT.

package ent

import (
	"within.website/x/cmd/tourian/ent/chatmessage"
	"within.website/x/cmd/tourian/ent/conversation"
	"within.website/x/cmd/tourian/ent/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() {
	chatmessageFields := schema.ChatMessage{}.Fields()
	_ = chatmessageFields
	// chatmessageDescConversationID is the schema descriptor for conversation_id field.
	chatmessageDescConversationID := chatmessageFields[1].Descriptor()
	// chatmessage.ConversationIDValidator is a validator for the "conversation_id" field. It is called by the builders before save.
	chatmessage.ConversationIDValidator = chatmessageDescConversationID.Validators[0].(func(string) error)
	// chatmessageDescRole is the schema descriptor for role field.
	chatmessageDescRole := chatmessageFields[2].Descriptor()
	// chatmessage.RoleValidator is a validator for the "role" field. It is called by the builders before save.
	chatmessage.RoleValidator = chatmessageDescRole.Validators[0].(func(string) error)
	// chatmessageDescContent is the schema descriptor for content field.
	chatmessageDescContent := chatmessageFields[3].Descriptor()
	// chatmessage.ContentValidator is a validator for the "content" field. It is called by the builders before save.
	chatmessage.ContentValidator = chatmessageDescContent.Validators[0].(func(string) error)
	// chatmessageDescID is the schema descriptor for id field.
	chatmessageDescID := chatmessageFields[0].Descriptor()
	// chatmessage.IDValidator is a validator for the "id" field. It is called by the builders before save.
	chatmessage.IDValidator = chatmessageDescID.Validators[0].(func(string) error)
	conversationFields := schema.Conversation{}.Fields()
	_ = conversationFields
	// conversationDescPageURL is the schema descriptor for page_url field.
	conversationDescPageURL := conversationFields[1].Descriptor()
	// conversation.PageURLValidator is a validator for the "page_url" field. It is called by the builders before save.
	conversation.PageURLValidator = conversationDescPageURL.Validators[0].(func(string) error)
	// conversationDescID is the schema descriptor for id field.
	conversationDescID := conversationFields[0].Descriptor()
	// conversation.IDValidator is a validator for the "id" field. It is called by the builders before save.
	conversation.IDValidator = conversationDescID.Validators[0].(func(string) error)
}