feat: fixing ppid data, users, master menu, etc
This commit is contained in:
parent
e89f66d49a
commit
a50142eeba
|
|
@ -7,8 +7,9 @@ type MasterMenus struct {
|
|||
Name string `json:"name" gorm:"type:varchar"`
|
||||
Description string `json:"description" gorm:"type:varchar"`
|
||||
ModuleId int `json:"module_id" gorm:"type:int4"`
|
||||
ParentMenuId int `json:"parent_menu_id" gorm:"type:int4"`
|
||||
Icon string `json:"icon" gorm:"type:varchar"`
|
||||
ParentMenuId *int `json:"parent_menu_id" gorm:"type:int4"`
|
||||
Icon *string `json:"icon" gorm:"type:varchar"`
|
||||
Group string `json:"group" gorm:"type:varchar"`
|
||||
Position *int `json:"position" gorm:"type:int4"`
|
||||
StatusId int `json:"status_id" gorm:"type:int4"`
|
||||
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ type PpidDatas struct {
|
|||
Slug string `json:"slug" gorm:"type:varchar"`
|
||||
CategoryId uint `json:"category_id" gorm:"type:int4"`
|
||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||
LevelGroupId *int `json:"level_group_id" gorm:"type:int4"`
|
||||
LevelGroupId *uint `json:"level_group_id" gorm:"type:int4"`
|
||||
Group *string `json:"group" gorm:"type:varchar"`
|
||||
NeedApprovalFromUserRole *string `json:"need_approval_from_user_role" gorm:"type:varchar"`
|
||||
NeedApprovalFromUserLevel *string `json:"need_approval_from_user_level" gorm:"type:varchar"`
|
||||
BackApprovalToUserRole *int `json:"back_approval_to_user_role" gorm:"type:varchar"`
|
||||
BackApprovalToUserLevel *int `json:"back_approval_to_user_level" gorm:"type:varchar"`
|
||||
BackApprovalToUserRole *string `json:"back_approval_to_user_role" gorm:"type:varchar"`
|
||||
BackApprovalToUserLevel *string `json:"back_approval_to_user_level" gorm:"type:varchar"`
|
||||
IsPublish *bool `json:"is_publish" gorm:"type:bool;default:false"`
|
||||
PublishLevel *int `json:"publish_level" gorm:"type:int4"`
|
||||
PublishedAt *time.Time `json:"published_at" gorm:"type:timestamp"`
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ type Users struct {
|
|||
IdentityNumber string `json:"identity_number" gorm:"type:varchar"`
|
||||
DateOfBirth string `json:"date_of_birth" gorm:"type:varchar"`
|
||||
LastEducation string `json:"last_education" gorm:"type:varchar"`
|
||||
UserRoleId int `json:"user_role_id" gorm:"type:int4"`
|
||||
UserLevelId int `json:"user_level_id" gorm:"type:int4"`
|
||||
UserRoleId uint `json:"user_role_id" gorm:"type:int4"`
|
||||
UserLevelId uint `json:"user_level_id" gorm:"type:int4"`
|
||||
KeycloakId *string `json:"keycloak_id" gorm:"type:varchar"`
|
||||
StatusId *int `json:"status_id" gorm:"type:int4;default:1"`
|
||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ type masterMenusRepository struct {
|
|||
type MasterMenusRepository interface {
|
||||
GetAll(req request.MasterMenusQueryRequest) (masterMenuss []*entity.MasterMenus, paging paginator.Pagination, err error)
|
||||
FindOne(id uint) (masterMenus *entity.MasterMenus, err error)
|
||||
FindLastMenuPosition() (position *int, err error)
|
||||
Create(masterMenus *entity.MasterMenus) (err error)
|
||||
Update(id uint, masterMenus *entity.MasterMenus) (err error)
|
||||
Delete(id uint) (err error)
|
||||
|
|
@ -83,6 +84,15 @@ func (_i *masterMenusRepository) FindOne(id uint) (masterMenus *entity.MasterMen
|
|||
return masterMenus, nil
|
||||
}
|
||||
|
||||
func (_i *masterMenusRepository) FindLastMenuPosition() (position *int, err error) {
|
||||
var masterMenus *entity.MasterMenus
|
||||
if err := _i.DB.DB.Where("position IS NOT NULL").Order(fmt.Sprintf("%s %s", "position", "DESC")).First(&masterMenus).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return masterMenus.Position, nil
|
||||
}
|
||||
|
||||
func (_i *masterMenusRepository) Create(masterMenus *entity.MasterMenus) (err error) {
|
||||
return _i.DB.DB.Create(masterMenus).Error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ type MasterMenusCreateRequest struct {
|
|||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
ModuleId int `json:"moduleId" validate:"required"`
|
||||
ParentMenuId int `json:"parentMenuId" validate:"required"`
|
||||
Icon string `json:"icon" validate:"required"`
|
||||
Group string `json:"group" validate:"required"`
|
||||
StatusId int `json:"statusId" validate:"required"`
|
||||
Position *int `json:"position"`
|
||||
ParentMenuId *int `json:"parentMenuId"`
|
||||
Icon *string `json:"icon"`
|
||||
}
|
||||
|
||||
func (req MasterMenusCreateRequest) ToEntity() *entity.MasterMenus {
|
||||
|
|
@ -37,7 +37,7 @@ func (req MasterMenusCreateRequest) ToEntity() *entity.MasterMenus {
|
|||
ModuleId: req.ModuleId,
|
||||
ParentMenuId: req.ParentMenuId,
|
||||
Icon: req.Icon,
|
||||
Position: req.Position,
|
||||
Group: req.Group,
|
||||
StatusId: req.StatusId,
|
||||
}
|
||||
}
|
||||
|
|
@ -47,10 +47,10 @@ type MasterMenusUpdateRequest struct {
|
|||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
ModuleId int `json:"moduleId" validate:"required"`
|
||||
ParentMenuId int `json:"parentMenuId" validate:"required"`
|
||||
Icon string `json:"icon" validate:"required"`
|
||||
Group string `json:"group" validate:"required"`
|
||||
StatusId int `json:"statusId" validate:"required"`
|
||||
Position *int `json:"position"`
|
||||
ParentMenuId *int `json:"parentMenuId"`
|
||||
Icon *string `json:"icon"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ func (req MasterMenusUpdateRequest) ToEntity() *entity.MasterMenus {
|
|||
ModuleId: req.ModuleId,
|
||||
ParentMenuId: req.ParentMenuId,
|
||||
Icon: req.Icon,
|
||||
Position: req.Position,
|
||||
Group: req.Group,
|
||||
StatusId: req.StatusId,
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ type MasterMenusResponse struct {
|
|||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ModuleId int `json:"module_id"`
|
||||
ParentMenuId int `json:"parent_menu_id"`
|
||||
Icon string `json:"icon"`
|
||||
ParentMenuId *int `json:"parent_menu_id"`
|
||||
Icon *string `json:"icon"`
|
||||
Position *int `json:"position"`
|
||||
StatusId int `json:"status_id"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
|
|
|
|||
|
|
@ -59,7 +59,18 @@ func (_i *masterMenusService) Show(id uint) (masterMenus *response.MasterMenusRe
|
|||
func (_i *masterMenusService) Save(req request.MasterMenusCreateRequest) (err error) {
|
||||
_i.Log.Info().Interface("data", req).Msg("")
|
||||
|
||||
return _i.Repo.Create(req.ToEntity())
|
||||
newReq := req.ToEntity()
|
||||
var latestPosition, _ = _i.Repo.FindLastMenuPosition()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*latestPosition = *latestPosition + 1
|
||||
|
||||
if latestPosition != nil {
|
||||
newReq.Position = latestPosition
|
||||
}
|
||||
|
||||
return _i.Repo.Create(newReq)
|
||||
}
|
||||
|
||||
func (_i *masterMenusService) Update(id uint, req request.MasterMenusUpdateRequest) (err error) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ func NewPpidDatasController(ppidDatasService service.PpidDatasService) PpidDatas
|
|||
// @Description API for getting all PpidDatas
|
||||
// @Tags PPID Data
|
||||
// @Security Bearer
|
||||
// @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>)
|
||||
// @Param req query request.PpidDatasQueryRequest false "query parameters"
|
||||
// @Param req query paginator.Pagination false "pagination parameters"
|
||||
// @Success 200 {object} response.Response
|
||||
|
|
@ -49,11 +50,15 @@ func (_i *ppidDatasController) All(c *fiber.Ctx) error {
|
|||
return err
|
||||
}
|
||||
|
||||
authToken := c.Get("Authorization")
|
||||
|
||||
reqContext := request.PpidDatasQueryRequestContext{
|
||||
Title: c.Query("title"),
|
||||
Description: c.Query("description"),
|
||||
CategoryId: c.Query("categoryId"),
|
||||
CreatedById: c.Query("createdById"),
|
||||
UserId: c.Query("userId"),
|
||||
UserRoleId: c.Query("userRoleId"),
|
||||
UserLevelId: c.Query("userLevelId"),
|
||||
StatusId: c.Query("statusId"),
|
||||
IsPublish: c.Query("isPublish"),
|
||||
}
|
||||
|
|
@ -61,7 +66,7 @@ func (_i *ppidDatasController) All(c *fiber.Ctx) error {
|
|||
req := reqContext.ToParamRequest()
|
||||
req.Pagination = paginate
|
||||
|
||||
ppidDatasData, paging, err := _i.ppidDatasService.All(req)
|
||||
ppidDatasData, paging, err := _i.ppidDatasService.All(req, authToken)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"go-humas-be/app/database/entity"
|
||||
"go-humas-be/app/module/ppid_datas/request"
|
||||
"go-humas-be/utils/paginator"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -61,8 +62,15 @@ func (_i *ppidDatasRepository) GetAll(req request.PpidDatasQueryRequest) (ppidDa
|
|||
if req.StatusId != nil {
|
||||
query = query.Where("status_id = ?", req.StatusId)
|
||||
}
|
||||
if req.CreatedById != nil {
|
||||
query = query.Where("created_by_id = ?", req.CreatedById)
|
||||
if req.UserId != nil {
|
||||
userRoleIdStr := strconv.Itoa(int(*req.UserRoleId))
|
||||
userLevelIdStr := strconv.Itoa(int(*req.UserLevelId))
|
||||
query = query.
|
||||
Where("created_by_id = ?", req.UserId).
|
||||
Or("need_approval_from_user_role LIKE ?", ":"+userRoleIdStr+":").
|
||||
Or("need_approval_from_user_level LIKE ?", userLevelIdStr).
|
||||
Or("back_approval_to_user_role = ?", userRoleIdStr).
|
||||
Or("back_approval_to_user_level = ?", userLevelIdStr)
|
||||
}
|
||||
query.Count(&count)
|
||||
|
||||
|
|
@ -77,7 +85,11 @@ func (_i *ppidDatasRepository) GetAll(req request.PpidDatasQueryRequest) (ppidDa
|
|||
req.Pagination.Count = count
|
||||
req.Pagination = paginator.Paging(req.Pagination)
|
||||
|
||||
err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&ppidDatass).Error
|
||||
if req.Pagination.Limit == 0 {
|
||||
query.Limit(req.Pagination.Limit)
|
||||
}
|
||||
|
||||
err = query.Offset(req.Pagination.Offset).Find(&ppidDatass).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ type PpidDatasQueryRequest struct {
|
|||
CategoryId *int `json:"categoryId"`
|
||||
LevelGroupId *int `json:"levelGroupId"`
|
||||
Group *string `json:"group"`
|
||||
CreatedById *int `json:"createdById"`
|
||||
UserId *uint `json:"userId"`
|
||||
UserRoleId *uint `json:"userRoleId"`
|
||||
UserLevelId *uint `json:"userLevelId"`
|
||||
StatusId *int `json:"statusId"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
Pagination *paginator.Pagination `json:"pagination"`
|
||||
|
|
@ -29,7 +31,7 @@ type PpidDatasCreateRequest struct {
|
|||
Slug string `json:"slug" validate:"required"`
|
||||
CategoryId uint `json:"categoryId" validate:"required"`
|
||||
StatusId int `json:"statusId" validate:"required"`
|
||||
LevelGroupId *int `json:"levelGroupId"`
|
||||
LevelGroupId *uint `json:"levelGroupId"`
|
||||
Group *string `json:"group"`
|
||||
}
|
||||
|
||||
|
|
@ -54,12 +56,12 @@ type PpidDatasUpdateRequest struct {
|
|||
StatusId int `json:"statusId" validate:"required"`
|
||||
NeedApprovalFromUserRole *string `json:"needApprovalFrom"`
|
||||
NeedApprovalFromUserLevel *string `json:"needApprovalFromUserLevel"`
|
||||
BackApprovalToUserRole *int `json:"backApprovalToUserRole"`
|
||||
BackApprovalToUserLevel *int `json:"backApprovalToUserLevel"`
|
||||
BackApprovalToUserRole *string `json:"backApprovalToUserRole"`
|
||||
BackApprovalToUserLevel *string `json:"backApprovalToUserLevel"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
PublishLevel *int `json:"publishLevel"`
|
||||
PublishedAt *time.Time `json:"publishedAt"`
|
||||
LevelGroupId *int `json:"levelGroupId"`
|
||||
LevelGroupId *uint `json:"levelGroupId"`
|
||||
Group *string `json:"group"`
|
||||
}
|
||||
|
||||
|
|
@ -89,6 +91,9 @@ type PpidDatasQueryRequestContext struct {
|
|||
CategoryId string `json:"categoryId"`
|
||||
Group string `json:"group"`
|
||||
CreatedById string `json:"createdById"`
|
||||
UserId string `json:"userId"`
|
||||
UserRoleId string `json:"userRoleId"`
|
||||
UserLevelId string `json:"userLevelId"`
|
||||
StatusId string `json:"statusId"`
|
||||
IsPublish string `json:"isPublish"`
|
||||
}
|
||||
|
|
@ -123,10 +128,25 @@ func (req PpidDatasQueryRequestContext) ToParamRequest() PpidDatasQueryRequest {
|
|||
request.StatusId = &statusId
|
||||
}
|
||||
}
|
||||
if createdByIdStr := req.CreatedById; createdByIdStr != "" {
|
||||
createdById, err := strconv.Atoi(createdByIdStr)
|
||||
if userIdStr := req.UserId; userIdStr != "" {
|
||||
userId, err := strconv.Atoi(userIdStr)
|
||||
if err == nil {
|
||||
request.CreatedById = &createdById
|
||||
userIdUint := uint(userId)
|
||||
request.UserId = &userIdUint
|
||||
}
|
||||
}
|
||||
if userRoleIdStr := req.UserRoleId; userRoleIdStr != "" {
|
||||
userRoleId, err := strconv.Atoi(userRoleIdStr)
|
||||
if err == nil {
|
||||
userRoleIdUint := uint(userRoleId)
|
||||
request.UserRoleId = &userRoleIdUint
|
||||
}
|
||||
}
|
||||
if userLevelIdStr := req.UserLevelId; userLevelIdStr != "" {
|
||||
userLevelId, err := strconv.Atoi(userLevelIdStr)
|
||||
if err == nil {
|
||||
userLevelIdUint := uint(userLevelId)
|
||||
request.UserLevelId = &userLevelIdUint
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type ppidDatasService struct {
|
|||
|
||||
// PpidDatasService define interface of IPpidDatasService
|
||||
type PpidDatasService interface {
|
||||
All(req request.PpidDatasQueryRequest) (ppidDatas []*response.PpidDatasResponse, paging paginator.Pagination, err error)
|
||||
All(req request.PpidDatasQueryRequest, authToken string) (ppidDatas []*response.PpidDatasResponse, paging paginator.Pagination, err error)
|
||||
Show(id string) (ppidDatas *response.PpidDatasResponse, err error)
|
||||
Save(req request.PpidDatasCreateRequest, authToken string) (ppidDatas *entity.PpidDatas, err error)
|
||||
Update(id uint, req request.PpidDatasUpdateRequest) (err error)
|
||||
|
|
@ -64,7 +64,13 @@ func NewPpidDatasService(
|
|||
}
|
||||
|
||||
// All implement interface of PpidDatasService
|
||||
func (_i *ppidDatasService) All(req request.PpidDatasQueryRequest) (ppidDatass []*response.PpidDatasResponse, paging paginator.Pagination, err error) {
|
||||
func (_i *ppidDatasService) All(req request.PpidDatasQueryRequest, authToken string) (ppidDatass []*response.PpidDatasResponse, paging paginator.Pagination, err error) {
|
||||
|
||||
user := utilSvc.GetUserInfo(_i.Log, _i.UsersRepo, authToken)
|
||||
req.UserId = &user.ID
|
||||
req.UserRoleId = &user.UserRoleId
|
||||
req.UserLevelId = &user.UserLevelId
|
||||
|
||||
results, paging, err := _i.Repo.GetAll(req)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
@ -170,17 +176,17 @@ func (_i *ppidDatasService) UpdateApprovalStatus(req requestPpidApproval.PpidDat
|
|||
roleId := strconv.FormatUint(uint64(role.UserRoleId), 10)
|
||||
needApprovalFromUserRole = append(needApprovalFromUserRole, roleId)
|
||||
}
|
||||
needApprovalFromUserRoleStr := strings.Join(needApprovalFromUserRole, "/")
|
||||
ppidData.NeedApprovalFromUserRole = &needApprovalFromUserRoleStr
|
||||
needApprovalFromUserRoleStr := strings.Join(needApprovalFromUserRole, ":")
|
||||
*ppidData.NeedApprovalFromUserRole = ":" + needApprovalFromUserRoleStr + ":"
|
||||
}
|
||||
} else if req.ApprovalStatusId == 2 {
|
||||
createdBy, _ := _i.UsersRepo.FindOne(*ppidData.CreatedById)
|
||||
if createdBy != nil {
|
||||
needApprovalFromUserLevel := strconv.FormatUint(uint64(createdBy.UserLevelId), 10)
|
||||
ppidData.NeedApprovalFromUserLevel = &needApprovalFromUserLevel
|
||||
backApprovalFromUserRole := strconv.FormatUint(uint64(createdBy.UserRoleId), 10)
|
||||
ppidData.BackApprovalToUserRole = &backApprovalFromUserRole
|
||||
|
||||
needApprovalFromUserRole := strconv.FormatUint(uint64(createdBy.UserRoleId), 10)
|
||||
ppidData.NeedApprovalFromUserRole = &needApprovalFromUserRole
|
||||
needApprovalFromUserLevel := strconv.FormatUint(uint64(createdBy.UserLevelId), 10)
|
||||
ppidData.BackApprovalToUserLevel = &needApprovalFromUserLevel
|
||||
}
|
||||
} else {
|
||||
isPublish := false
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ type UsersCreateRequest struct {
|
|||
IdentityNumber string `json:"identityNumber" validate:"required"`
|
||||
DateOfBirth string `json:"dateOfBirth" validate:"required"`
|
||||
LastEducation string `json:"lastEducation" validate:"required"`
|
||||
UserRoleId int `json:"userRoleId" validate:"required"`
|
||||
UserLevelId int `json:"userLevelId" validate:"required"`
|
||||
UserRoleId uint `json:"userRoleId" validate:"required"`
|
||||
UserLevelId uint `json:"userLevelId" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
}
|
||||
|
||||
|
|
@ -69,8 +69,8 @@ type UsersUpdateRequest struct {
|
|||
IdentityNumber string `json:"identityNumber" validate:"required"`
|
||||
DateOfBirth string `json:"dateOfBirth" validate:"required"`
|
||||
LastEducation string `json:"lastEducation" validate:"required"`
|
||||
UserRoleId int `json:"userRoleId" validate:"required"`
|
||||
UserLevelId int `json:"userLevelId" validate:"required"`
|
||||
UserRoleId uint `json:"userRoleId" validate:"required"`
|
||||
UserLevelId uint `json:"userLevelId" validate:"required"`
|
||||
StatusId *int `json:"statusId"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ type UsersResponse struct {
|
|||
DateOfBirth string `json:"dateOfBirth"`
|
||||
LastEducation string `json:"lastEducation"`
|
||||
KeycloakId *string `json:"keycloakId"`
|
||||
UserRoleId int `json:"userRoleId"`
|
||||
StatusId *int `json:"status_id"`
|
||||
UserLevelId int `json:"userLevelId"`
|
||||
UserRoleId uint `json:"userRoleId"`
|
||||
UserLevelId uint `json:"userLevelId"`
|
||||
StatusId *int `json:"statusId"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
ProfilePicturePath *string `json:"profilePicturePath"`
|
||||
IsActive *bool `json:"isActive"`
|
||||
|
|
|
|||
|
|
@ -4471,13 +4471,16 @@ const docTemplate = `{
|
|||
"summary": "Get all PpidDatas",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "categoryId",
|
||||
"in": "query"
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cAdd access token here\u003e",
|
||||
"description": "Insert your access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "createdById",
|
||||
"name": "categoryId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
|
|
@ -4510,6 +4513,21 @@ const docTemplate = `{
|
|||
"name": "title",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userLevelId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userRoleId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
|
|
@ -6859,16 +6877,18 @@ const docTemplate = `{
|
|||
"type": "object",
|
||||
"required": [
|
||||
"description",
|
||||
"icon",
|
||||
"group",
|
||||
"moduleId",
|
||||
"name",
|
||||
"parentMenuId",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -6881,9 +6901,6 @@ const docTemplate = `{
|
|||
"parentMenuId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"position": {
|
||||
"type": "integer"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4460,13 +4460,16 @@
|
|||
"summary": "Get all PpidDatas",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "categoryId",
|
||||
"in": "query"
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cAdd access token here\u003e",
|
||||
"description": "Insert your access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "createdById",
|
||||
"name": "categoryId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
|
|
@ -4499,6 +4502,21 @@
|
|||
"name": "title",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userLevelId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "userRoleId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
|
|
@ -6848,16 +6866,18 @@
|
|||
"type": "object",
|
||||
"required": [
|
||||
"description",
|
||||
"icon",
|
||||
"group",
|
||||
"moduleId",
|
||||
"name",
|
||||
"parentMenuId",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -6870,9 +6890,6 @@
|
|||
"parentMenuId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"position": {
|
||||
"type": "integer"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,6 +169,8 @@ definitions:
|
|||
properties:
|
||||
description:
|
||||
type: string
|
||||
group:
|
||||
type: string
|
||||
icon:
|
||||
type: string
|
||||
moduleId:
|
||||
|
|
@ -177,16 +179,13 @@ definitions:
|
|||
type: string
|
||||
parentMenuId:
|
||||
type: integer
|
||||
position:
|
||||
type: integer
|
||||
statusId:
|
||||
type: integer
|
||||
required:
|
||||
- description
|
||||
- icon
|
||||
- group
|
||||
- moduleId
|
||||
- name
|
||||
- parentMenuId
|
||||
- statusId
|
||||
type: object
|
||||
request.MasterModulesCreateRequest:
|
||||
|
|
@ -3435,12 +3434,15 @@ paths:
|
|||
get:
|
||||
description: API for getting all PpidDatas
|
||||
parameters:
|
||||
- default: Bearer <Add access token here>
|
||||
description: Insert your access token
|
||||
in: header
|
||||
name: Authorization
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: categoryId
|
||||
type: integer
|
||||
- in: query
|
||||
name: createdById
|
||||
type: integer
|
||||
- in: query
|
||||
name: description
|
||||
type: string
|
||||
|
|
@ -3459,6 +3461,15 @@ paths:
|
|||
- in: query
|
||||
name: title
|
||||
type: string
|
||||
- in: query
|
||||
name: userId
|
||||
type: integer
|
||||
- in: query
|
||||
name: userLevelId
|
||||
type: integer
|
||||
- in: query
|
||||
name: userRoleId
|
||||
type: integer
|
||||
- in: query
|
||||
name: count
|
||||
type: integer
|
||||
|
|
|
|||
Loading…
Reference in New Issue