46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package cards
|
|
|
|
import "time"
|
|
|
|
type CardDTO struct {
|
|
Id int64 `json:"id"`
|
|
UserId *int64 `json:"userId"`
|
|
Number string `json:"number"`
|
|
Name string `json:"name"`
|
|
Month string `json:"month"`
|
|
Year *string `json:"year"`
|
|
Type *string `json:"type"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
type CreateCardDTO struct {
|
|
UserId *int64 `json:"userId"`
|
|
Number string `json:"number" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
Month string `json:"month" binding:"required"`
|
|
Year *string `json:"year"`
|
|
Type *string `json:"type"`
|
|
}
|
|
|
|
type UpdateCardDTO struct {
|
|
UserId *int64 `json:"userId"`
|
|
Number string `json:"number" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
Month string `json:"month" binding:"required"`
|
|
Year *string `json:"year"`
|
|
Type *string `json:"type"`
|
|
}
|
|
|
|
type ListFilter struct {
|
|
UserId *int64
|
|
Type *string
|
|
Page int
|
|
Limit int
|
|
}
|
|
|
|
type ListCardDTO struct {
|
|
Count int64 `json:"count"`
|
|
Cards []CardDTO `json:"cards"`
|
|
}
|