Files
juwan-backend/app/wallet/rpc/internal/models/migrate/schema.go
T
wwweww 19cc7a778c 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`.
2026-02-28 18:35:56 +08:00

53 lines
2.0 KiB
Go

// 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() {
}