Skip to content

Commit

Permalink
fix(reconciliation): fix json tags (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas authored Dec 8, 2023
1 parent 381ff07 commit 6c12a2e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions ee/reconciliation/internal/models/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
)

type Policy struct {
bun.BaseModel `bun:"reconciliations.policy"`
bun.BaseModel `bun:"reconciliations.policy" json:"-"`

// Policy Related fields
ID uuid.UUID `bun:",pk,nullzero"`
CreatedAt time.Time `bun:",notnull"`
Name string `bun:",notnull"`
ID uuid.UUID `bun:",pk,nullzero" json:"id"`
CreatedAt time.Time `bun:",notnull" json:"createdAt"`
Name string `bun:",notnull" json:"name"`

// Reconciliation Needed fields
LedgerName string `bun:",notnull"`
LedgerQuery map[string]interface{} `bun:",type:jsonb,notnull"`
PaymentsPoolID uuid.UUID `bun:",notnull"`
LedgerName string `bun:",notnull" json:"ledgerName"`
LedgerQuery map[string]interface{} `bun:",type:jsonb,notnull" json:"ledgerQuery"`
PaymentsPoolID uuid.UUID `bun:",notnull" json:"paymentsPoolID"`
}
18 changes: 9 additions & 9 deletions ee/reconciliation/internal/models/reconciliation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ func (r ReconciliationStatus) String() string {
}

type Reconciliation struct {
bun.BaseModel `bun:"reconciliations.reconciliation"`
bun.BaseModel `bun:"reconciliations.reconciliation" json:"-"`

ID uuid.UUID `bun:",pk,nullzero"`
PolicyID uuid.UUID `bun:",nullzero"`
CreatedAt time.Time `bun:",nullzero"`
ReconciledAt time.Time `bun:",nullzero"`
Status ReconciliationStatus
LedgerBalances map[string]*big.Int `bun:",jsonb"`
PaymentsBalances map[string]*big.Int `bun:",jsonb"`
Error string
ID uuid.UUID `bun:",pk,nullzero" json:"id"`
PolicyID uuid.UUID `bun:",nullzero" json:"policyID"`
CreatedAt time.Time `bun:",nullzero" json:"createdAt"`
ReconciledAt time.Time `bun:",nullzero" json:"reconciledAt"`
Status ReconciliationStatus `json:"status"`
LedgerBalances map[string]*big.Int `bun:",jsonb" json:"ledgerBalances" `
PaymentsBalances map[string]*big.Int `bun:",jsonb" json:"paymentsBalances" `
Error string `json:"error"`
}

1 comment on commit 6c12a2e

@vercel
Copy link

@vercel vercel bot commented on 6c12a2e Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.