diff --git a/models/Folder.go b/models/Folder.go index 98fd6eb..6856dcf 100755 --- a/models/Folder.go +++ b/models/Folder.go @@ -10,8 +10,8 @@ type Folder struct { } type FolderCreateValidation struct { - Name string `validate:"required,min=1,max=120"` - ParentFolderID uint `validate:"number"` + Name string `validate:"required,min=1,max=120" json:"Name" form:"Name"` + ParentFolderID uint `validate:"number" json:"ParentFolderID" form:"ParentFolderID"` } type FolderListValidation struct { @@ -19,14 +19,14 @@ type FolderListValidation struct { } type FolderDeleteValidation struct { - FolderID uint `validate:"required,number"` + FolderID uint `validate:"required,number" json:"FolderID" form:"FolderID"` } type FoldersDeleteValidation struct { - FolderIDs []FolderDeleteValidation `validate:"required"` + FolderIDs []FolderDeleteValidation `validate:"required" json:"FolderIDs" form:"FolderIDs"` } type FolderUpdateValidation struct { - Name string `validate:"required,min=1,max=120"` - FolderID uint `validate:"required,number"` - ParentFolderID uint `validate:"number"` + Name string `validate:"required,min=1,max=120" json:"Name" form:"Name"` + FolderID uint `validate:"required,number" json:"FolderID" form:"FolderID"` + ParentFolderID uint `validate:"number" json:"ParentFolderID" form:"ParentFolderID"` }