verify.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package utils
  2. var (
  3. // sys
  4. PageInfoVerify = Rules{"Page": {NotEmpty()}, "PageSize": {NotEmpty()}}
  5. IdVerify = Rules{"ID": []string{NotEmpty()}}
  6. ApiVerify = Rules{"Path": {NotEmpty()}, "Description": {NotEmpty()}, "ApiGroup": {NotEmpty()}, "Action": {NotEmpty()}, "Type": {NotEmpty()}}
  7. DeptVerify = Rules{"ParentId": {Ge("0")}, "DeptName": {NotEmpty()}}
  8. MenuVerify = Rules{"Title": {NotEmpty()}, "MenuType": {NotEmpty()}, "ParentId": {Ge("0")}, "Sort": {Ge("0")}}
  9. UpdateMenuVerify = Rules{"MenuID": {NotEmpty()}, "ParentId": {Ge("0")}}
  10. RoleIdVerify = Rules{"RoleID": {NotEmpty()}}
  11. RoleVerify = Rules{"RoleName": {NotEmpty()}}
  12. RoleDataScopeVerify = Rules{"RoleID": {NotEmpty()}, "DataScope": {NotEmpty()}}
  13. LoginVerify = Rules{"Username": {NotEmpty()}, "Password": {NotEmpty()}}
  14. RegisterVerify = Rules{"Username": {NotEmpty()}, "UserName": {NotEmpty()}, "Password": {NotEmpty()}}
  15. ChangePasswordVerify = Rules{"Password": {NotEmpty()}, "NewPassword": {NotEmpty()}}
  16. IdsVerify = Rules{"IDs": {NotEmpty()}}
  17. GetGridsVerify = Rules{"CabinetID": {NotEmpty()}}
  18. WSVerify = Rules{"UserID": {NotEmpty()}, "DeptID": {NotEmpty()}}
  19. // bus
  20. LeaveLogVerify = Rules{"StartTimeStr": {NotEmpty()}, "EndTimeStr": {NotEmpty()}, "StaffID": {Ge("0")}}
  21. StaffVerify = Rules{"Name": {NotEmpty()}}
  22. CabinetVerify = Rules{"Number": {NotEmpty()}, "DepartmentID": {NotEmpty()}, "Name": {NotEmpty()}}
  23. CabinetTimeVerify = Rules{"CabinetID": {NotEmpty()}, "ActTimeStr": {NotEmpty()}, "Act": {NotEmpty()}, "Repeat": {NotEmpty()}, "UseRule": {NotEmpty()}}
  24. WorkTimeVerify = Rules{"WeekDay": {NotEmpty()}, "StartTimeStr": {NotEmpty()}, "EndTimeStr": {NotEmpty()}, "WorkDay": {NotEmpty()}}
  25. SpecialTimeVerify = Rules{"Name": {NotEmpty()}, "StartTimeStr": {NotEmpty()}, "EndTimeStr": {NotEmpty()}, "WorkDay": {NotEmpty()}}
  26. CustomerVerify = Rules{"CustomerName": {NotEmpty()}, "CustomerPhoneData": {NotEmpty()}}
  27. AutoCodeVerify = Rules{"Abbreviation": {NotEmpty()}, "StructName": {NotEmpty()}, "PackageName": {NotEmpty()}, "Fields": {NotEmpty()}}
  28. AutoPackageVerify = Rules{"PackageName": {NotEmpty()}}
  29. AuthorityVerify = Rules{"AuthorityId": {NotEmpty()}, "AuthorityName": {NotEmpty()}}
  30. OldAuthorityVerify = Rules{"OldAuthorityId": {NotEmpty()}}
  31. SetUserAuthorityVerify = Rules{"AuthorityId": {NotEmpty()}}
  32. )