init push
This commit is contained in:
74
internal/transport/http/dto/dul_response_dto.go
Normal file
74
internal/transport/http/dto/dul_response_dto.go
Normal file
@@ -0,0 +1,74 @@
|
||||
package dto
|
||||
|
||||
type DULImage struct {
|
||||
UUID string `json:"uuid"`
|
||||
DownloadURL string `json:"download_url,omitempty"`
|
||||
OriginalSizeBytes int64 `json:"original_size_bytes,omitempty"`
|
||||
ThumbnailDownloadURL string `json:"thumbnail_download_url,omitempty"`
|
||||
}
|
||||
|
||||
type DULAttributes struct {
|
||||
No uint64 `json:"no"`
|
||||
Name string `json:"name"`
|
||||
Date string `json:"date" example:"2026-05-25"`
|
||||
Info string `json:"info,omitempty"`
|
||||
Base DULBaseRef `json:"base"`
|
||||
Images []DULImage `json:"images"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
}
|
||||
|
||||
type DULBaseRef struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category,omitempty"`
|
||||
}
|
||||
|
||||
type DULResource struct {
|
||||
Type string `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Attributes DULAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
type DULResponse struct {
|
||||
Data DULResource `json:"data"`
|
||||
}
|
||||
|
||||
type DULDeleteResponse struct {
|
||||
Data struct {
|
||||
Type string `json:"type" example:"dul_delete"`
|
||||
Attributes struct {
|
||||
Deleted bool `json:"deleted" example:"true"`
|
||||
} `json:"attributes"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type DULGroup struct {
|
||||
Base DULBaseRef `json:"base"`
|
||||
DULs []DULResource `json:"duls"`
|
||||
}
|
||||
|
||||
type DULListResponse struct {
|
||||
Data []DULGroup `json:"data"`
|
||||
Meta struct {
|
||||
PageNumber int `json:"page_number" example:"1"`
|
||||
PageSize int `json:"page_size" example:"20"`
|
||||
Total int64 `json:"total" example:"120"`
|
||||
TotalBases int `json:"total_bases" example:"8"`
|
||||
} `json:"meta"`
|
||||
}
|
||||
|
||||
type DULDataTableResponse struct {
|
||||
Data []DULGroup `json:"data"`
|
||||
Meta struct {
|
||||
Draw int `json:"draw" example:"1"`
|
||||
PageNumber int `json:"page_number" example:"1"`
|
||||
PageSize int `json:"page_size" example:"20"`
|
||||
Total int64 `json:"total" example:"120"`
|
||||
TotalBases int `json:"total_bases" example:"8"`
|
||||
RecordsTotal int64 `json:"records_total,omitempty" example:"120"`
|
||||
RecordsFiltered int64 `json:"records_filtered,omitempty" example:"120"`
|
||||
} `json:"meta"`
|
||||
}
|
||||
Reference in New Issue
Block a user