From 4fc2b5f5bd293631b891f9333499f9c6f396d1ec Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sun, 24 Nov 2024 00:26:33 +0200 Subject: [PATCH] Add displayName to types.DbCard --- types/types.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/types/types.go b/types/types.go index 80fec34..f1fcdc1 100644 --- a/types/types.go +++ b/types/types.go @@ -24,13 +24,16 @@ type ErrorResponse struct { } type DbCard struct { - ID uint `json:"id" example:"1"` - Name string `json:"name" example:"CreditCard"` - Balance uint64 `json:"balance" example:"1000"` - HaveCreditLine bool `json:"have_credit_line" example:"true"` - CreditLine uint64 `json:"credit_line" example:"500000"` - LastDigits string `json:"last_digits" example:"1111"` - CurrencyID uint `json:"currency_id" example:"1"` + ID uint `json:"id" example:"1"` + Name string `json:"name" example:"CreditCard"` + Balance uint64 `json:"balance" example:"1000"` + HaveCreditLine bool `json:"have_credit_line" example:"true"` + CreditLine uint64 `json:"credit_line" example:"500000"` + LastDigits string `json:"last_digits" example:"1111"` + CurrencyID uint `json:"currency_id" example:"1"` + Currency DbCurrency `json:"currency"` + // Purely UI things + DisplayName string `json:"display_name" example:"CreditCard •4444"` } type DbCategory struct {