Added Ent and user model.
This commit is contained in:
parent
259c666548
commit
79d2db3c1f
28 changed files with 4145 additions and 13 deletions
21
ent/runtime.go
Normal file
21
ent/runtime.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// Code generated by entc, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"goweb/ent/schema"
|
||||
"goweb/ent/user"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 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() {
|
||||
userFields := schema.User{}.Fields()
|
||||
_ = userFields
|
||||
// userDescCreatedAt is the schema descriptor for created_at field.
|
||||
userDescCreatedAt := userFields[2].Descriptor()
|
||||
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue