mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
fix: refactor labels to use common entries between model and dto
This commit is contained in:
19
internal/handlers/dto/annotations.go
Normal file
19
internal/handlers/dto/annotations.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package dto
|
||||
|
||||
import "github.com/glueops/autoglue/internal/common"
|
||||
|
||||
type AnnotationResponse struct {
|
||||
common.AuditFields
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type CreateAnnotationRequest struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type UpdateAnnotationRequest struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
package dto
|
||||
|
||||
import "github.com/google/uuid"
|
||||
import (
|
||||
"github.com/glueops/autoglue/internal/common"
|
||||
)
|
||||
|
||||
type LabelResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OrganizationID uuid.UUID `json:"organization_id"`
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
common.AuditFields
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type CreateLabelRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user