/
runtime.go
304 lines (300 loc) · 21.2 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
// Code generated by ent, DO NOT EDIT.
package ent
import (
"time"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/account"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/app"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/appbinary"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/appinfo"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/appinst"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/appinstruntime"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/deviceinfo"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/feed"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/feedconfig"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/feeditem"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/file"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/image"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/notifyflow"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/notifyflowsource"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/notifyflowtarget"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/notifytarget"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/porterinstance"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/porterprivilege"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/schema"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/user"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/userdevice"
"github.com/tuihub/librarian/app/sephirah/internal/data/internal/ent/usersession"
)
// 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() {
accountFields := schema.Account{}.Fields()
_ = accountFields
// accountDescUpdatedAt is the schema descriptor for updated_at field.
accountDescUpdatedAt := accountFields[6].Descriptor()
// account.DefaultUpdatedAt holds the default value on creation for the updated_at field.
account.DefaultUpdatedAt = accountDescUpdatedAt.Default.(func() time.Time)
// account.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
account.UpdateDefaultUpdatedAt = accountDescUpdatedAt.UpdateDefault.(func() time.Time)
// accountDescCreatedAt is the schema descriptor for created_at field.
accountDescCreatedAt := accountFields[7].Descriptor()
// account.DefaultCreatedAt holds the default value on creation for the created_at field.
account.DefaultCreatedAt = accountDescCreatedAt.Default.(func() time.Time)
appFields := schema.App{}.Fields()
_ = appFields
// appDescUpdatedAt is the schema descriptor for updated_at field.
appDescUpdatedAt := appFields[4].Descriptor()
// app.DefaultUpdatedAt holds the default value on creation for the updated_at field.
app.DefaultUpdatedAt = appDescUpdatedAt.Default.(func() time.Time)
// app.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
app.UpdateDefaultUpdatedAt = appDescUpdatedAt.UpdateDefault.(func() time.Time)
// appDescCreatedAt is the schema descriptor for created_at field.
appDescCreatedAt := appFields[5].Descriptor()
// app.DefaultCreatedAt holds the default value on creation for the created_at field.
app.DefaultCreatedAt = appDescCreatedAt.Default.(func() time.Time)
appbinaryFields := schema.AppBinary{}.Fields()
_ = appbinaryFields
// appbinaryDescUpdatedAt is the schema descriptor for updated_at field.
appbinaryDescUpdatedAt := appbinaryFields[5].Descriptor()
// appbinary.DefaultUpdatedAt holds the default value on creation for the updated_at field.
appbinary.DefaultUpdatedAt = appbinaryDescUpdatedAt.Default.(func() time.Time)
// appbinary.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
appbinary.UpdateDefaultUpdatedAt = appbinaryDescUpdatedAt.UpdateDefault.(func() time.Time)
// appbinaryDescCreatedAt is the schema descriptor for created_at field.
appbinaryDescCreatedAt := appbinaryFields[6].Descriptor()
// appbinary.DefaultCreatedAt holds the default value on creation for the created_at field.
appbinary.DefaultCreatedAt = appbinaryDescCreatedAt.Default.(func() time.Time)
appinfoFields := schema.AppInfo{}.Fields()
_ = appinfoFields
// appinfoDescUpdatedAt is the schema descriptor for updated_at field.
appinfoDescUpdatedAt := appinfoFields[16].Descriptor()
// appinfo.DefaultUpdatedAt holds the default value on creation for the updated_at field.
appinfo.DefaultUpdatedAt = appinfoDescUpdatedAt.Default.(func() time.Time)
// appinfo.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
appinfo.UpdateDefaultUpdatedAt = appinfoDescUpdatedAt.UpdateDefault.(func() time.Time)
// appinfoDescCreatedAt is the schema descriptor for created_at field.
appinfoDescCreatedAt := appinfoFields[17].Descriptor()
// appinfo.DefaultCreatedAt holds the default value on creation for the created_at field.
appinfo.DefaultCreatedAt = appinfoDescCreatedAt.Default.(func() time.Time)
appinstFields := schema.AppInst{}.Fields()
_ = appinstFields
// appinstDescUpdatedAt is the schema descriptor for updated_at field.
appinstDescUpdatedAt := appinstFields[3].Descriptor()
// appinst.DefaultUpdatedAt holds the default value on creation for the updated_at field.
appinst.DefaultUpdatedAt = appinstDescUpdatedAt.Default.(func() time.Time)
// appinst.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
appinst.UpdateDefaultUpdatedAt = appinstDescUpdatedAt.UpdateDefault.(func() time.Time)
// appinstDescCreatedAt is the schema descriptor for created_at field.
appinstDescCreatedAt := appinstFields[4].Descriptor()
// appinst.DefaultCreatedAt holds the default value on creation for the created_at field.
appinst.DefaultCreatedAt = appinstDescCreatedAt.Default.(func() time.Time)
appinstruntimeFields := schema.AppInstRunTime{}.Fields()
_ = appinstruntimeFields
// appinstruntimeDescUpdatedAt is the schema descriptor for updated_at field.
appinstruntimeDescUpdatedAt := appinstruntimeFields[4].Descriptor()
// appinstruntime.DefaultUpdatedAt holds the default value on creation for the updated_at field.
appinstruntime.DefaultUpdatedAt = appinstruntimeDescUpdatedAt.Default.(func() time.Time)
// appinstruntime.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
appinstruntime.UpdateDefaultUpdatedAt = appinstruntimeDescUpdatedAt.UpdateDefault.(func() time.Time)
// appinstruntimeDescCreatedAt is the schema descriptor for created_at field.
appinstruntimeDescCreatedAt := appinstruntimeFields[5].Descriptor()
// appinstruntime.DefaultCreatedAt holds the default value on creation for the created_at field.
appinstruntime.DefaultCreatedAt = appinstruntimeDescCreatedAt.Default.(func() time.Time)
deviceinfoFields := schema.DeviceInfo{}.Fields()
_ = deviceinfoFields
// deviceinfoDescUpdatedAt is the schema descriptor for updated_at field.
deviceinfoDescUpdatedAt := deviceinfoFields[7].Descriptor()
// deviceinfo.DefaultUpdatedAt holds the default value on creation for the updated_at field.
deviceinfo.DefaultUpdatedAt = deviceinfoDescUpdatedAt.Default.(func() time.Time)
// deviceinfo.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
deviceinfo.UpdateDefaultUpdatedAt = deviceinfoDescUpdatedAt.UpdateDefault.(func() time.Time)
// deviceinfoDescCreatedAt is the schema descriptor for created_at field.
deviceinfoDescCreatedAt := deviceinfoFields[8].Descriptor()
// deviceinfo.DefaultCreatedAt holds the default value on creation for the created_at field.
deviceinfo.DefaultCreatedAt = deviceinfoDescCreatedAt.Default.(func() time.Time)
feedFields := schema.Feed{}.Fields()
_ = feedFields
// feedDescUpdatedAt is the schema descriptor for updated_at field.
feedDescUpdatedAt := feedFields[7].Descriptor()
// feed.DefaultUpdatedAt holds the default value on creation for the updated_at field.
feed.DefaultUpdatedAt = feedDescUpdatedAt.Default.(func() time.Time)
// feed.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
feed.UpdateDefaultUpdatedAt = feedDescUpdatedAt.UpdateDefault.(func() time.Time)
// feedDescCreatedAt is the schema descriptor for created_at field.
feedDescCreatedAt := feedFields[8].Descriptor()
// feed.DefaultCreatedAt holds the default value on creation for the created_at field.
feed.DefaultCreatedAt = feedDescCreatedAt.Default.(func() time.Time)
feedconfigFields := schema.FeedConfig{}.Fields()
_ = feedconfigFields
// feedconfigDescHideItems is the schema descriptor for hide_items field.
feedconfigDescHideItems := feedconfigFields[9].Descriptor()
// feedconfig.DefaultHideItems holds the default value on creation for the hide_items field.
feedconfig.DefaultHideItems = feedconfigDescHideItems.Default.(bool)
// feedconfigDescLatestPullAt is the schema descriptor for latest_pull_at field.
feedconfigDescLatestPullAt := feedconfigFields[10].Descriptor()
// feedconfig.DefaultLatestPullAt holds the default value on creation for the latest_pull_at field.
feedconfig.DefaultLatestPullAt = feedconfigDescLatestPullAt.Default.(time.Time)
// feedconfigDescNextPullBeginAt is the schema descriptor for next_pull_begin_at field.
feedconfigDescNextPullBeginAt := feedconfigFields[11].Descriptor()
// feedconfig.DefaultNextPullBeginAt holds the default value on creation for the next_pull_begin_at field.
feedconfig.DefaultNextPullBeginAt = feedconfigDescNextPullBeginAt.Default.(time.Time)
// feedconfigDescUpdatedAt is the schema descriptor for updated_at field.
feedconfigDescUpdatedAt := feedconfigFields[12].Descriptor()
// feedconfig.DefaultUpdatedAt holds the default value on creation for the updated_at field.
feedconfig.DefaultUpdatedAt = feedconfigDescUpdatedAt.Default.(func() time.Time)
// feedconfig.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
feedconfig.UpdateDefaultUpdatedAt = feedconfigDescUpdatedAt.UpdateDefault.(func() time.Time)
// feedconfigDescCreatedAt is the schema descriptor for created_at field.
feedconfigDescCreatedAt := feedconfigFields[13].Descriptor()
// feedconfig.DefaultCreatedAt holds the default value on creation for the created_at field.
feedconfig.DefaultCreatedAt = feedconfigDescCreatedAt.Default.(func() time.Time)
feeditemFields := schema.FeedItem{}.Fields()
_ = feeditemFields
// feeditemDescReadCount is the schema descriptor for read_count field.
feeditemDescReadCount := feeditemFields[15].Descriptor()
// feeditem.DefaultReadCount holds the default value on creation for the read_count field.
feeditem.DefaultReadCount = feeditemDescReadCount.Default.(int64)
// feeditemDescUpdatedAt is the schema descriptor for updated_at field.
feeditemDescUpdatedAt := feeditemFields[18].Descriptor()
// feeditem.DefaultUpdatedAt holds the default value on creation for the updated_at field.
feeditem.DefaultUpdatedAt = feeditemDescUpdatedAt.Default.(func() time.Time)
// feeditem.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
feeditem.UpdateDefaultUpdatedAt = feeditemDescUpdatedAt.UpdateDefault.(func() time.Time)
// feeditemDescCreatedAt is the schema descriptor for created_at field.
feeditemDescCreatedAt := feeditemFields[19].Descriptor()
// feeditem.DefaultCreatedAt holds the default value on creation for the created_at field.
feeditem.DefaultCreatedAt = feeditemDescCreatedAt.Default.(func() time.Time)
fileFields := schema.File{}.Fields()
_ = fileFields
// fileDescUpdatedAt is the schema descriptor for updated_at field.
fileDescUpdatedAt := fileFields[5].Descriptor()
// file.DefaultUpdatedAt holds the default value on creation for the updated_at field.
file.DefaultUpdatedAt = fileDescUpdatedAt.Default.(func() time.Time)
// file.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
file.UpdateDefaultUpdatedAt = fileDescUpdatedAt.UpdateDefault.(func() time.Time)
// fileDescCreatedAt is the schema descriptor for created_at field.
fileDescCreatedAt := fileFields[6].Descriptor()
// file.DefaultCreatedAt holds the default value on creation for the created_at field.
file.DefaultCreatedAt = fileDescCreatedAt.Default.(func() time.Time)
imageFields := schema.Image{}.Fields()
_ = imageFields
// imageDescUpdatedAt is the schema descriptor for updated_at field.
imageDescUpdatedAt := imageFields[4].Descriptor()
// image.DefaultUpdatedAt holds the default value on creation for the updated_at field.
image.DefaultUpdatedAt = imageDescUpdatedAt.Default.(func() time.Time)
// image.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
image.UpdateDefaultUpdatedAt = imageDescUpdatedAt.UpdateDefault.(func() time.Time)
// imageDescCreatedAt is the schema descriptor for created_at field.
imageDescCreatedAt := imageFields[5].Descriptor()
// image.DefaultCreatedAt holds the default value on creation for the created_at field.
image.DefaultCreatedAt = imageDescCreatedAt.Default.(func() time.Time)
notifyflowFields := schema.NotifyFlow{}.Fields()
_ = notifyflowFields
// notifyflowDescUpdatedAt is the schema descriptor for updated_at field.
notifyflowDescUpdatedAt := notifyflowFields[4].Descriptor()
// notifyflow.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifyflow.DefaultUpdatedAt = notifyflowDescUpdatedAt.Default.(func() time.Time)
// notifyflow.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifyflow.UpdateDefaultUpdatedAt = notifyflowDescUpdatedAt.UpdateDefault.(func() time.Time)
// notifyflowDescCreatedAt is the schema descriptor for created_at field.
notifyflowDescCreatedAt := notifyflowFields[5].Descriptor()
// notifyflow.DefaultCreatedAt holds the default value on creation for the created_at field.
notifyflow.DefaultCreatedAt = notifyflowDescCreatedAt.Default.(func() time.Time)
notifyflowsourceFields := schema.NotifyFlowSource{}.Fields()
_ = notifyflowsourceFields
// notifyflowsourceDescUpdatedAt is the schema descriptor for updated_at field.
notifyflowsourceDescUpdatedAt := notifyflowsourceFields[4].Descriptor()
// notifyflowsource.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifyflowsource.DefaultUpdatedAt = notifyflowsourceDescUpdatedAt.Default.(func() time.Time)
// notifyflowsource.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifyflowsource.UpdateDefaultUpdatedAt = notifyflowsourceDescUpdatedAt.UpdateDefault.(func() time.Time)
// notifyflowsourceDescCreatedAt is the schema descriptor for created_at field.
notifyflowsourceDescCreatedAt := notifyflowsourceFields[5].Descriptor()
// notifyflowsource.DefaultCreatedAt holds the default value on creation for the created_at field.
notifyflowsource.DefaultCreatedAt = notifyflowsourceDescCreatedAt.Default.(func() time.Time)
notifyflowtargetFields := schema.NotifyFlowTarget{}.Fields()
_ = notifyflowtargetFields
// notifyflowtargetDescUpdatedAt is the schema descriptor for updated_at field.
notifyflowtargetDescUpdatedAt := notifyflowtargetFields[5].Descriptor()
// notifyflowtarget.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifyflowtarget.DefaultUpdatedAt = notifyflowtargetDescUpdatedAt.Default.(func() time.Time)
// notifyflowtarget.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifyflowtarget.UpdateDefaultUpdatedAt = notifyflowtargetDescUpdatedAt.UpdateDefault.(func() time.Time)
// notifyflowtargetDescCreatedAt is the schema descriptor for created_at field.
notifyflowtargetDescCreatedAt := notifyflowtargetFields[6].Descriptor()
// notifyflowtarget.DefaultCreatedAt holds the default value on creation for the created_at field.
notifyflowtarget.DefaultCreatedAt = notifyflowtargetDescCreatedAt.Default.(func() time.Time)
notifytargetFields := schema.NotifyTarget{}.Fields()
_ = notifytargetFields
// notifytargetDescUpdatedAt is the schema descriptor for updated_at field.
notifytargetDescUpdatedAt := notifytargetFields[6].Descriptor()
// notifytarget.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifytarget.DefaultUpdatedAt = notifytargetDescUpdatedAt.Default.(func() time.Time)
// notifytarget.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifytarget.UpdateDefaultUpdatedAt = notifytargetDescUpdatedAt.UpdateDefault.(func() time.Time)
// notifytargetDescCreatedAt is the schema descriptor for created_at field.
notifytargetDescCreatedAt := notifytargetFields[7].Descriptor()
// notifytarget.DefaultCreatedAt holds the default value on creation for the created_at field.
notifytarget.DefaultCreatedAt = notifytargetDescCreatedAt.Default.(func() time.Time)
porterinstanceFields := schema.PorterInstance{}.Fields()
_ = porterinstanceFields
// porterinstanceDescUpdatedAt is the schema descriptor for updated_at field.
porterinstanceDescUpdatedAt := porterinstanceFields[7].Descriptor()
// porterinstance.DefaultUpdatedAt holds the default value on creation for the updated_at field.
porterinstance.DefaultUpdatedAt = porterinstanceDescUpdatedAt.Default.(func() time.Time)
// porterinstance.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
porterinstance.UpdateDefaultUpdatedAt = porterinstanceDescUpdatedAt.UpdateDefault.(func() time.Time)
// porterinstanceDescCreatedAt is the schema descriptor for created_at field.
porterinstanceDescCreatedAt := porterinstanceFields[8].Descriptor()
// porterinstance.DefaultCreatedAt holds the default value on creation for the created_at field.
porterinstance.DefaultCreatedAt = porterinstanceDescCreatedAt.Default.(func() time.Time)
porterprivilegeFields := schema.PorterPrivilege{}.Fields()
_ = porterprivilegeFields
// porterprivilegeDescUpdatedAt is the schema descriptor for updated_at field.
porterprivilegeDescUpdatedAt := porterprivilegeFields[3].Descriptor()
// porterprivilege.DefaultUpdatedAt holds the default value on creation for the updated_at field.
porterprivilege.DefaultUpdatedAt = porterprivilegeDescUpdatedAt.Default.(func() time.Time)
// porterprivilege.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
porterprivilege.UpdateDefaultUpdatedAt = porterprivilegeDescUpdatedAt.UpdateDefault.(func() time.Time)
// porterprivilegeDescCreatedAt is the schema descriptor for created_at field.
porterprivilegeDescCreatedAt := porterprivilegeFields[4].Descriptor()
// porterprivilege.DefaultCreatedAt holds the default value on creation for the created_at field.
porterprivilege.DefaultCreatedAt = porterprivilegeDescCreatedAt.Default.(func() time.Time)
userFields := schema.User{}.Fields()
_ = userFields
// userDescUpdatedAt is the schema descriptor for updated_at field.
userDescUpdatedAt := userFields[5].Descriptor()
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
// user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userFields[6].Descriptor()
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
userdeviceFields := schema.UserDevice{}.Fields()
_ = userdeviceFields
// userdeviceDescUpdatedAt is the schema descriptor for updated_at field.
userdeviceDescUpdatedAt := userdeviceFields[2].Descriptor()
// userdevice.DefaultUpdatedAt holds the default value on creation for the updated_at field.
userdevice.DefaultUpdatedAt = userdeviceDescUpdatedAt.Default.(func() time.Time)
// userdevice.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
userdevice.UpdateDefaultUpdatedAt = userdeviceDescUpdatedAt.UpdateDefault.(func() time.Time)
// userdeviceDescCreatedAt is the schema descriptor for created_at field.
userdeviceDescCreatedAt := userdeviceFields[3].Descriptor()
// userdevice.DefaultCreatedAt holds the default value on creation for the created_at field.
userdevice.DefaultCreatedAt = userdeviceDescCreatedAt.Default.(func() time.Time)
usersessionFields := schema.UserSession{}.Fields()
_ = usersessionFields
// usersessionDescUpdatedAt is the schema descriptor for updated_at field.
usersessionDescUpdatedAt := usersessionFields[4].Descriptor()
// usersession.DefaultUpdatedAt holds the default value on creation for the updated_at field.
usersession.DefaultUpdatedAt = usersessionDescUpdatedAt.Default.(func() time.Time)
// usersession.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
usersession.UpdateDefaultUpdatedAt = usersessionDescUpdatedAt.UpdateDefault.(func() time.Time)
// usersessionDescCreatedAt is the schema descriptor for created_at field.
usersessionDescCreatedAt := usersessionFields[5].Descriptor()
// usersession.DefaultCreatedAt holds the default value on creation for the created_at field.
usersession.DefaultCreatedAt = usersessionDescCreatedAt.Default.(func() time.Time)
}