19cc7a778c
- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`. - Added new API server implementations for objectstory, player, and shop services. - Introduced configuration files for new APIs in `etc/*.yaml`. - Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`. - Removed unused user update handler and user API files. - Added utility functions for context management and HTTP header parsing. - Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
44 lines
2.2 KiB
Go
44 lines
2.2 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
import (
|
|
"juwan-backend/app/game/rpc/internal/models/games"
|
|
"juwan-backend/app/game/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() {
|
|
gamesFields := schema.Games{}.Fields()
|
|
_ = gamesFields
|
|
// gamesDescName is the schema descriptor for name field.
|
|
gamesDescName := gamesFields[1].Descriptor()
|
|
// games.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
|
games.NameValidator = gamesDescName.Validators[0].(func(string) error)
|
|
// gamesDescCategory is the schema descriptor for category field.
|
|
gamesDescCategory := gamesFields[3].Descriptor()
|
|
// games.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
|
|
games.CategoryValidator = gamesDescCategory.Validators[0].(func(string) error)
|
|
// gamesDescSortOrder is the schema descriptor for sort_order field.
|
|
gamesDescSortOrder := gamesFields[4].Descriptor()
|
|
// games.DefaultSortOrder holds the default value on creation for the sort_order field.
|
|
games.DefaultSortOrder = gamesDescSortOrder.Default.(int)
|
|
// gamesDescIsActive is the schema descriptor for is_active field.
|
|
gamesDescIsActive := gamesFields[5].Descriptor()
|
|
// games.DefaultIsActive holds the default value on creation for the is_active field.
|
|
games.DefaultIsActive = gamesDescIsActive.Default.(bool)
|
|
// gamesDescCreatedAt is the schema descriptor for created_at field.
|
|
gamesDescCreatedAt := gamesFields[6].Descriptor()
|
|
// games.DefaultCreatedAt holds the default value on creation for the created_at field.
|
|
games.DefaultCreatedAt = gamesDescCreatedAt.Default.(func() time.Time)
|
|
// gamesDescUpdatedAt is the schema descriptor for updated_at field.
|
|
gamesDescUpdatedAt := gamesFields[7].Descriptor()
|
|
// games.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
|
games.DefaultUpdatedAt = gamesDescUpdatedAt.Default.(func() time.Time)
|
|
// games.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
|
games.UpdateDefaultUpdatedAt = gamesDescUpdatedAt.UpdateDefault.(func() time.Time)
|
|
}
|