-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
feedbackchathistoriesrecapsreactions.go
133 lines (113 loc) · 4.16 KB
/
feedbackchathistoriesrecapsreactions.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// Code generated by ent, DO NOT EDIT.
package feedbackchathistoriesrecapsreactions
import (
"fmt"
"entgo.io/ent/dialect/sql"
"github.com/google/uuid"
)
const (
// Label holds the string label denoting the feedbackchathistoriesrecapsreactions type in the database.
Label = "feedback_chat_histories_recaps_reactions"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldChatID holds the string denoting the chat_id field in the database.
FieldChatID = "chat_id"
// FieldLogID holds the string denoting the log_id field in the database.
FieldLogID = "log_id"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// FieldType holds the string denoting the type field in the database.
FieldType = "type"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// Table holds the table name of the feedbackchathistoriesrecapsreactions in the database.
Table = "feedback_chat_histories_recaps_reactions"
)
// Columns holds all SQL columns for feedbackchathistoriesrecapsreactions fields.
var Columns = []string{
FieldID,
FieldChatID,
FieldLogID,
FieldUserID,
FieldType,
FieldCreatedAt,
FieldUpdatedAt,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultChatID holds the default value on creation for the "chat_id" field.
DefaultChatID int64
// DefaultLogID holds the default value on creation for the "log_id" field.
DefaultLogID func() uuid.UUID
// DefaultUserID holds the default value on creation for the "user_id" field.
DefaultUserID int64
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() int64
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() int64
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() uuid.UUID
)
// Type defines the type for the "type" enum field.
type Type string
// TypeNone is the default value of the Type enum.
const DefaultType = TypeNone
// Type values.
const (
TypeNone Type = "none"
TypeUpVote Type = "up_vote"
TypeDownVote Type = "down_vote"
TypeLmao Type = "lmao"
)
func (_type Type) String() string {
return string(_type)
}
// TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func TypeValidator(_type Type) error {
switch _type {
case TypeNone, TypeUpVote, TypeDownVote, TypeLmao:
return nil
default:
return fmt.Errorf("feedbackchathistoriesrecapsreactions: invalid enum value for type field: %q", _type)
}
}
// OrderOption defines the ordering options for the FeedbackChatHistoriesRecapsReactions queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByChatID orders the results by the chat_id field.
func ByChatID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldChatID, opts...).ToFunc()
}
// ByLogID orders the results by the log_id field.
func ByLogID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLogID, opts...).ToFunc()
}
// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}
// ByType orders the results by the type field.
func ByType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldType, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}