Refactor order and tenant ledger models to use consts for Currency and Type fields; add new UserStatus values; implement comprehensive test cases for content, creator, order, super, and wallet services.
This commit is contained in:
@@ -30,7 +30,7 @@ func newOrder(db *gorm.DB, opts ...gen.DOOption) orderQuery {
|
||||
_orderQuery.UserID = field.NewInt64(tableName, "user_id")
|
||||
_orderQuery.Type = field.NewField(tableName, "type")
|
||||
_orderQuery.Status = field.NewField(tableName, "status")
|
||||
_orderQuery.Currency = field.NewString(tableName, "currency")
|
||||
_orderQuery.Currency = field.NewField(tableName, "currency")
|
||||
_orderQuery.AmountOriginal = field.NewInt64(tableName, "amount_original")
|
||||
_orderQuery.AmountDiscount = field.NewInt64(tableName, "amount_discount")
|
||||
_orderQuery.AmountPaid = field.NewInt64(tableName, "amount_paid")
|
||||
@@ -58,7 +58,7 @@ type orderQuery struct {
|
||||
UserID field.Int64
|
||||
Type field.Field
|
||||
Status field.Field
|
||||
Currency field.String
|
||||
Currency field.Field
|
||||
AmountOriginal field.Int64
|
||||
AmountDiscount field.Int64
|
||||
AmountPaid field.Int64
|
||||
@@ -92,7 +92,7 @@ func (o *orderQuery) updateTableName(table string) *orderQuery {
|
||||
o.UserID = field.NewInt64(table, "user_id")
|
||||
o.Type = field.NewField(table, "type")
|
||||
o.Status = field.NewField(table, "status")
|
||||
o.Currency = field.NewString(table, "currency")
|
||||
o.Currency = field.NewField(table, "currency")
|
||||
o.AmountOriginal = field.NewInt64(table, "amount_original")
|
||||
o.AmountDiscount = field.NewInt64(table, "amount_discount")
|
||||
o.AmountPaid = field.NewInt64(table, "amount_paid")
|
||||
|
||||
Reference in New Issue
Block a user