Refactor: Remove deprecated gRPC service files and implement new API structure
- 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`.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
// WalletTransactions holds the schema definition for the WalletTransactions entity.
|
||||
type WalletTransactions struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the WalletTransactions.
|
||||
func (WalletTransactions) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("id").Immutable().Unique(),
|
||||
field.Int64("user_id").Immutable().Unique(),
|
||||
field.String("type"),
|
||||
field.Other("amount", decimal.Decimal{}).
|
||||
SchemaType(map[string]string{
|
||||
dialect.Postgres: "decimal(12,2",
|
||||
}).Unique().Immutable(),
|
||||
field.Other("balance_after", decimal.Decimal{}).
|
||||
SchemaType(map[string]string{
|
||||
dialect.Postgres: "decimal(12,2)",
|
||||
}).Unique().Immutable(),
|
||||
field.Strings("description"),
|
||||
field.Int64("order_id").Immutable().Unique(),
|
||||
field.Time("created_at"),
|
||||
field.String("search_text"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the WalletTransactions.
|
||||
func (WalletTransactions) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user