Skip to content

Commit

Permalink
added folder data mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirari04 committed Jan 19, 2024
1 parent 93ff57b commit d35c4bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions models/Folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ 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 {
ParentFolderID uint `validate:"number" query:"ParentFolderID"`
}

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"`
}

0 comments on commit d35c4bd

Please sign in to comment.