26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
import (
|
|
"juwan-backend/app/search/rpc/internal/models/favorites"
|
|
"juwan-backend/app/search/rpc/internal/models/schema"
|
|
"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() {
|
|
favoritesFields := schema.Favorites{}.Fields()
|
|
_ = favoritesFields
|
|
// favoritesDescTargetType is the schema descriptor for target_type field.
|
|
favoritesDescTargetType := favoritesFields[2].Descriptor()
|
|
// favorites.TargetTypeValidator is a validator for the "target_type" field. It is called by the builders before save.
|
|
favorites.TargetTypeValidator = favoritesDescTargetType.Validators[0].(func(string) error)
|
|
// favoritesDescCreatedAt is the schema descriptor for created_at field.
|
|
favoritesDescCreatedAt := favoritesFields[4].Descriptor()
|
|
// favorites.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
favorites.DefaultCreatedAt = favoritesDescCreatedAt.Default.(func() time.Time)
|
|
}
|