Files
online-backend/internal/cards/paymentcard/dto.go
T
guwandykandCursor 0098422798
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
Enrich cards API responses with joined relations and share common helpers.
Nest user/branch/cardType/cardState on card, order, pin-order, and visa-master
reads; accept flexible dates/IDs on pin create; widen pin region; ignore undefined
list query params; extract internal/cards/shared to remove duplicated types and helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 12:46:50 +05:00

42 lines
1.1 KiB
Go

package paymentcard
import "online-back/internal/cards/shared"
type PaymentCardDTO struct {
Id int64 `json:"id"`
Price string `json:"price"`
Title shared.LocalizedText `json:"title"`
Notes string `json:"notes"`
Active bool `json:"active"`
}
type CreatePaymentCardDTO struct {
Price string `json:"price" binding:"required"`
Title shared.LocalizedText `json:"title" binding:"required"`
Notes string `json:"notes"`
Active *bool `json:"active"`
}
type UpdatePaymentCardDTO struct {
Price string `json:"price" binding:"required"`
Title shared.LocalizedText `json:"title" binding:"required"`
Notes string `json:"notes"`
Active bool `json:"active"`
}
type UpdatePaymentCardActiveDTO struct {
Active bool `json:"active"`
}
type ListFilter struct {
CardName string
Active *bool
Page int
Limit int
}
type ListPaymentCardDTO struct {
Count int64 `json:"count"`
PaymentCards []PaymentCardDTO `json:"paymentCards"`
}