feat: 添加搜索收藏微服务

This commit is contained in:
zetaloop
2026-04-24 13:24:58 +08:00
parent 91fdd2a498
commit 53d0e791b4
58 changed files with 6239 additions and 57 deletions
+25
View File
@@ -0,0 +1,25 @@
// 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)
}