Files
online-backend/internal/cards/reasonscard/dto.go
2026-07-15 18:08:19 +05:00

45 lines
1.1 KiB
Go

package reasonscard
import "time"
type LocalizedText struct {
En string `json:"en"`
Ru string `json:"ru"`
Tm string `json:"tm"`
}
type ReasonCardDTO struct {
Id int64 `json:"id"`
Title LocalizedText `json:"title"`
Price string `json:"price"`
Notes string `json:"notes"`
Active bool `json:"active"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type CreateReasonCardDTO struct {
Title LocalizedText `json:"title" binding:"required"`
Price string `json:"price" binding:"required"`
Notes string `json:"notes"`
Active *bool `json:"active"`
}
type UpdateReasonCardDTO struct {
Title LocalizedText `json:"title" binding:"required"`
Price string `json:"price" binding:"required"`
Notes string `json:"notes"`
Active bool `json:"active"`
}
type ListFilter struct {
ReasonName string
Page int
Limit int
}
type ListReasonCardDTO struct {
Count int64 `json:"count"`
ReasonCards []ReasonCardDTO `json:"reasonCards"`
}