fix: some api bug
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"juwan-backend/pkg/types"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
@@ -26,10 +29,14 @@ func (WalletTransactions) Fields() []ent.Field {
|
||||
SchemaType(map[string]string{
|
||||
dialect.Postgres: "decimal(12,2)",
|
||||
}).Unique().Immutable(),
|
||||
field.Strings("description"),
|
||||
field.Other("description", types.TextArray{}).SchemaType(map[string]string{
|
||||
dialect.Postgres: "text[]",
|
||||
}).Optional(),
|
||||
field.Int64("order_id").Immutable().Unique(),
|
||||
field.Time("created_at"),
|
||||
field.String("search_text"),
|
||||
field.String("search_text").Optional().Immutable().Annotations(entsql.Annotation{
|
||||
Skip: true,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user