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,52 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
var (
|
||||
// WalletsColumns holds the columns for the "wallets" table.
|
||||
WalletsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "user_id", Type: field.TypeInt64, Unique: true},
|
||||
{Name: "balance", Type: field.TypeOther, SchemaType: map[string]string{"postgres": "decimal(12,2)"}},
|
||||
{Name: "frozen_balance", Type: field.TypeOther, SchemaType: map[string]string{"postgres": "decimal(12,2)"}},
|
||||
{Name: "version", Type: field.TypeInt, Default: 1},
|
||||
{Name: "updated_at", Type: field.TypeTime},
|
||||
}
|
||||
// WalletsTable holds the schema information for the "wallets" table.
|
||||
WalletsTable = &schema.Table{
|
||||
Name: "wallets",
|
||||
Columns: WalletsColumns,
|
||||
PrimaryKey: []*schema.Column{WalletsColumns[0]},
|
||||
}
|
||||
// WalletTransactionsColumns holds the columns for the "wallet_transactions" table.
|
||||
WalletTransactionsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeString, Unique: true},
|
||||
{Name: "user_id", Type: field.TypeInt64, Unique: true},
|
||||
{Name: "type", Type: field.TypeString},
|
||||
{Name: "amount", Type: field.TypeOther, Unique: true, SchemaType: map[string]string{"postgres": "decimal(12,2"}},
|
||||
{Name: "balance_after", Type: field.TypeOther, Unique: true, SchemaType: map[string]string{"postgres": "decimal(12,2)"}},
|
||||
{Name: "description", Type: field.TypeJSON},
|
||||
{Name: "order_id", Type: field.TypeInt64, Unique: true},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "search_text", Type: field.TypeString},
|
||||
}
|
||||
// WalletTransactionsTable holds the schema information for the "wallet_transactions" table.
|
||||
WalletTransactionsTable = &schema.Table{
|
||||
Name: "wallet_transactions",
|
||||
Columns: WalletTransactionsColumns,
|
||||
PrimaryKey: []*schema.Column{WalletTransactionsColumns[0]},
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
WalletsTable,
|
||||
WalletTransactionsTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
}
|
||||
Reference in New Issue
Block a user