repository attachment api
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package contract
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type CreateRepositoryAttachmentRequest struct {
|
||||
FileURL string `json:"file_url" validate:"required"`
|
||||
FileName string `json:"file_name" validate:"required"`
|
||||
FileType string `json:"file_type" validate:"required"`
|
||||
Category string `json:"category" validate:"required"`
|
||||
}
|
||||
|
||||
type RepositoryAttachmentsResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
FileURL string `json:"file_url"`
|
||||
FileName string `json:"file_name"`
|
||||
FileType string `json:"file_type"`
|
||||
Category string `json:"category"`
|
||||
UploadBy uuid.UUID `json:"upload_by"`
|
||||
UploadAt time.Time `json:"upload_at"`
|
||||
}
|
||||
|
||||
type ListRepositoryAttachmentsResponse struct {
|
||||
Attachments []RepositoryAttachmentsResponse `json:"attachments"`
|
||||
Pagination PaginationResponse `json:"pagination"`
|
||||
}
|
||||
|
||||
type ListRepositoryAttachmentsRequest struct {
|
||||
Page int `json:"page"`
|
||||
Limit int `json:"limit"`
|
||||
Search *string `json:"search,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user