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:
@@ -29,7 +29,7 @@ func newTenantLedger(db *gorm.DB, opts ...gen.DOOption) tenantLedgerQuery {
|
||||
_tenantLedgerQuery.TenantID = field.NewInt64(tableName, "tenant_id")
|
||||
_tenantLedgerQuery.UserID = field.NewInt64(tableName, "user_id")
|
||||
_tenantLedgerQuery.OrderID = field.NewInt64(tableName, "order_id")
|
||||
_tenantLedgerQuery.Type = field.NewString(tableName, "type")
|
||||
_tenantLedgerQuery.Type = field.NewField(tableName, "type")
|
||||
_tenantLedgerQuery.Amount = field.NewInt64(tableName, "amount")
|
||||
_tenantLedgerQuery.BalanceBefore = field.NewInt64(tableName, "balance_before")
|
||||
_tenantLedgerQuery.BalanceAfter = field.NewInt64(tableName, "balance_after")
|
||||
@@ -56,7 +56,7 @@ type tenantLedgerQuery struct {
|
||||
TenantID field.Int64
|
||||
UserID field.Int64
|
||||
OrderID field.Int64
|
||||
Type field.String
|
||||
Type field.Field
|
||||
Amount field.Int64
|
||||
BalanceBefore field.Int64
|
||||
BalanceAfter field.Int64
|
||||
@@ -89,7 +89,7 @@ func (t *tenantLedgerQuery) updateTableName(table string) *tenantLedgerQuery {
|
||||
t.TenantID = field.NewInt64(table, "tenant_id")
|
||||
t.UserID = field.NewInt64(table, "user_id")
|
||||
t.OrderID = field.NewInt64(table, "order_id")
|
||||
t.Type = field.NewString(table, "type")
|
||||
t.Type = field.NewField(table, "type")
|
||||
t.Amount = field.NewInt64(table, "amount")
|
||||
t.BalanceBefore = field.NewInt64(table, "balance_before")
|
||||
t.BalanceAfter = field.NewInt64(table, "balance_after")
|
||||
|
||||
Reference in New Issue
Block a user