aboutsummaryrefslogtreecommitdiff
path: root/cmd/_old/tourian/ent/schema/chatmessage.go
blob: 7f01b129dc97db5c4340f1a2ec320bb94dcac689 (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
package schema

import (
	"entgo.io/ent"
	"entgo.io/ent/schema/field"
)

// ChatMessage holds the schema definition for the ChatMessage entity.
type ChatMessage struct {
	ent.Schema
}

// Fields of the ChatMessage.
func (ChatMessage) Fields() []ent.Field {
	return []ent.Field{
		field.String("id").NotEmpty(),
		field.String("conversation_id").NotEmpty(),
		field.String("role").NotEmpty(),
		field.String("content").NotEmpty(),
	}
}

// Edges of the ChatMessage.
func (ChatMessage) Edges() []ent.Edge {
	return nil
}