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,47 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// OrderStateLogs holds the schema definition for the OrderStateLogs entity.
|
||||
type OrderStateLogs struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Annotations of the OrderStateLogs.
|
||||
func (OrderStateLogs) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{
|
||||
Table: "order_state_logs",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the OrderStateLogs.
|
||||
func (OrderStateLogs) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int64("id").Immutable().Unique(),
|
||||
field.Int64("order_id"),
|
||||
field.String("from_status").Optional().Nillable().MaxLen(30),
|
||||
field.String("to_status").MaxLen(30),
|
||||
field.String("action").MaxLen(50),
|
||||
field.Int64("actor_id"),
|
||||
field.String("actor_role").MaxLen(20),
|
||||
field.JSON("metadata", map[string]any{}).
|
||||
Optional().
|
||||
SchemaType(map[string]string{dialect.Postgres: "jsonb"}),
|
||||
field.Time("created_at").Default(time.Now).Immutable(),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the OrderStateLogs.
|
||||
func (OrderStateLogs) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user