feat: add RequestForInformationObjectionReplies
This commit is contained in:
parent
ebac85837d
commit
e2088d737e
|
|
@ -0,0 +1,14 @@
|
|||
package entity
|
||||
|
||||
import "time"
|
||||
|
||||
type RequestForInformationObjectionReplies struct {
|
||||
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
||||
RequestForInformationObjectionId int `json:"request_for_information_objection_id" gorm:"type:int4"`
|
||||
Response string `json:"response" gorm:"type:varchar"`
|
||||
StatusId int `json:"status_id" gorm:"type:int4"`
|
||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||
IsActive *bool `json:"is_active" gorm:"type:bool"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
||||
}
|
||||
|
|
@ -12,6 +12,8 @@ type Users struct {
|
|||
WorkType string `json:"work_type" gorm:"type:varchar"`
|
||||
GenderType string `json:"gender_type" gorm:"type:varchar"`
|
||||
IdentityType string `json:"identity_type" gorm:"type:varchar"`
|
||||
IdentityGroup string `json:"identity_group" gorm:"type:varchar"`
|
||||
IdentityGroupNumber string `json:"identity_group_number" gorm:"type:varchar"`
|
||||
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"`
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ func Models() []interface{} {
|
|||
entity.RequestForInformationItems{},
|
||||
entity.RequestForInformationReplies{},
|
||||
entity.RequestForInformationObjection{},
|
||||
entity.RequestForInformationObjectionReplies{},
|
||||
entity.UserLevels{},
|
||||
entity.UserRoles{},
|
||||
entity.UserRoleAccesses{},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package controller
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/service"
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
RequestForInformationObjectionReplies RequestForInformationObjectionRepliesController
|
||||
}
|
||||
|
||||
func NewController(RequestForInformationObjectionRepliesService service.RequestForInformationObjectionRepliesService, log zerolog.Logger) *Controller {
|
||||
return &Controller{
|
||||
RequestForInformationObjectionReplies: NewRequestForInformationObjectionRepliesController(RequestForInformationObjectionRepliesService, log),
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
package controller
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/rs/zerolog"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/request"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/service"
|
||||
"go-humas-be/utils/paginator"
|
||||
utilRes "go-humas-be/utils/response"
|
||||
utilVal "go-humas-be/utils/validator"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type requestForInformationObjectionRepliesController struct {
|
||||
requestForInformationObjectionRepliesService service.RequestForInformationObjectionRepliesService
|
||||
Log zerolog.Logger
|
||||
}
|
||||
|
||||
type RequestForInformationObjectionRepliesController interface {
|
||||
All(c *fiber.Ctx) error
|
||||
Show(c *fiber.Ctx) error
|
||||
Save(c *fiber.Ctx) error
|
||||
Update(c *fiber.Ctx) error
|
||||
Delete(c *fiber.Ctx) error
|
||||
}
|
||||
|
||||
func NewRequestForInformationObjectionRepliesController(requestForInformationObjectionRepliesService service.RequestForInformationObjectionRepliesService, log zerolog.Logger) RequestForInformationObjectionRepliesController {
|
||||
return &requestForInformationObjectionRepliesController{
|
||||
requestForInformationObjectionRepliesService: requestForInformationObjectionRepliesService,
|
||||
Log: log,
|
||||
}
|
||||
}
|
||||
|
||||
// All get all RequestForInformationObjectionReplies
|
||||
// @Summary Get all RequestForInformationObjectionReplies
|
||||
// @Description API for getting all RequestForInformationObjectionReplies
|
||||
// @Tags RequestForInformationObjectionReplies
|
||||
// @Security Bearer
|
||||
// @Param req query request.RequestForInformationObjectionRepliesQueryRequest false "query parameters"
|
||||
// @Param req query paginator.Pagination false "pagination parameters"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
// @Failure 500 {object} response.InternalServerError
|
||||
// @Router /request-for-information-objection-replies [get]
|
||||
func (_i *requestForInformationObjectionRepliesController) All(c *fiber.Ctx) error {
|
||||
paginate, err := paginator.Paginate(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
reqContext := request.RequestForInformationObjectionRepliesQueryRequestContext{
|
||||
RequestForInformationObjectionId: c.Query("requestForInformationObjectionId"),
|
||||
Response: c.Query("response"),
|
||||
StatusId: c.Query("statusId"),
|
||||
}
|
||||
req := reqContext.ToParamRequest()
|
||||
req.Pagination = paginate
|
||||
|
||||
requestForInformationObjectionRepliesData, paging, err := _i.requestForInformationObjectionRepliesService.All(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return utilRes.Resp(c, utilRes.Response{
|
||||
Success: true,
|
||||
Messages: utilRes.Messages{"RequestForInformationObjectionReplies list successfully retrieved"},
|
||||
Data: requestForInformationObjectionRepliesData,
|
||||
Meta: paging,
|
||||
})
|
||||
}
|
||||
|
||||
// Show get one RequestForInformationObjectionReplies
|
||||
// @Summary Get one RequestForInformationObjectionReplies
|
||||
// @Description API for getting one RequestForInformationObjectionReplies
|
||||
// @Tags RequestForInformationObjectionReplies
|
||||
// @Security Bearer
|
||||
// @Param id path int true "RequestForInformationObjectionReplies ID"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
// @Failure 500 {object} response.InternalServerError
|
||||
// @Router /request-for-information-objection-replies/{id} [get]
|
||||
func (_i *requestForInformationObjectionRepliesController) Show(c *fiber.Ctx) error {
|
||||
id, err := strconv.ParseUint(c.Params("id"), 10, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
requestForInformationObjectionRepliesData, err := _i.requestForInformationObjectionRepliesService.Show(uint(id))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return utilRes.Resp(c, utilRes.Response{
|
||||
Success: true,
|
||||
Messages: utilRes.Messages{"RequestForInformationObjectionReplies successfully retrieved"},
|
||||
Data: requestForInformationObjectionRepliesData,
|
||||
})
|
||||
}
|
||||
|
||||
// Save create RequestForInformationObjectionReplies
|
||||
// @Summary Create RequestForInformationObjectionReplies
|
||||
// @Description API for create RequestForInformationObjectionReplies
|
||||
// @Tags RequestForInformationObjectionReplies
|
||||
// @Security Bearer
|
||||
// @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>)
|
||||
// @Param payload body request.RequestForInformationObjectionRepliesCreateRequest true "Required payload"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
// @Failure 500 {object} response.InternalServerError
|
||||
// @Router /request-for-information-objection-replies [post]
|
||||
func (_i *requestForInformationObjectionRepliesController) Save(c *fiber.Ctx) error {
|
||||
req := new(request.RequestForInformationObjectionRepliesCreateRequest)
|
||||
if err := utilVal.ParseAndValidate(c, req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
authToken := c.Get("Authorization")
|
||||
dataResult, err := _i.requestForInformationObjectionRepliesService.Save(*req, authToken)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return utilRes.Resp(c, utilRes.Response{
|
||||
Success: true,
|
||||
Messages: utilRes.Messages{"RequestForInformationObjectionReplies successfully created"},
|
||||
Data: dataResult,
|
||||
})
|
||||
}
|
||||
|
||||
// Update update RequestForInformationObjectionReplies
|
||||
// @Summary update RequestForInformationObjectionReplies
|
||||
// @Description API for update RequestForInformationObjectionReplies
|
||||
// @Tags RequestForInformationObjectionReplies
|
||||
// @Security Bearer
|
||||
// @Param payload body request.RequestForInformationObjectionRepliesUpdateRequest true "Required payload"
|
||||
// @Param id path int true "RequestForInformationObjectionReplies ID"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
// @Failure 500 {object} response.InternalServerError
|
||||
// @Router /request-for-information-objection-replies/{id} [put]
|
||||
func (_i *requestForInformationObjectionRepliesController) Update(c *fiber.Ctx) error {
|
||||
id, err := strconv.ParseUint(c.Params("id"), 10, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req := new(request.RequestForInformationObjectionRepliesUpdateRequest)
|
||||
if err := utilVal.ParseAndValidate(c, req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = _i.requestForInformationObjectionRepliesService.Update(uint(id), *req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return utilRes.Resp(c, utilRes.Response{
|
||||
Success: true,
|
||||
Messages: utilRes.Messages{"RequestForInformationObjectionReplies successfully updated"},
|
||||
})
|
||||
}
|
||||
|
||||
// Delete delete RequestForInformationObjectionReplies
|
||||
// @Summary delete RequestForInformationObjectionReplies
|
||||
// @Description API for delete RequestForInformationObjectionReplies
|
||||
// @Tags RequestForInformationObjectionReplies
|
||||
// @Security Bearer
|
||||
// @Param id path int true "RequestForInformationObjectionReplies ID"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
// @Failure 500 {object} response.InternalServerError
|
||||
// @Router /request-for-information-objection-replies/{id} [delete]
|
||||
func (_i *requestForInformationObjectionRepliesController) Delete(c *fiber.Ctx) error {
|
||||
id, err := strconv.ParseUint(c.Params("id"), 10, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = _i.requestForInformationObjectionRepliesService.Delete(uint(id))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return utilRes.Resp(c, utilRes.Response{
|
||||
Success: true,
|
||||
Messages: utilRes.Messages{"RequestForInformationObjectionReplies successfully deleted"},
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package mapper
|
||||
|
||||
import (
|
||||
"go-humas-be/app/database/entity"
|
||||
res "go-humas-be/app/module/request_for_information_objection_replies/response"
|
||||
)
|
||||
|
||||
func RequestForInformationObjectionRepliesResponseMapper(requestForInformationObjectionRepliesReq *entity.RequestForInformationObjectionReplies) (requestForInformationObjectionRepliesRes *res.RequestForInformationObjectionRepliesResponse) {
|
||||
if requestForInformationObjectionRepliesReq != nil {
|
||||
requestForInformationObjectionRepliesRes = &res.RequestForInformationObjectionRepliesResponse{
|
||||
ID: requestForInformationObjectionRepliesReq.ID,
|
||||
RequestForInformationObjectionId: requestForInformationObjectionRepliesReq.RequestForInformationObjectionId,
|
||||
Response: requestForInformationObjectionRepliesReq.Response,
|
||||
StatusId: requestForInformationObjectionRepliesReq.StatusId,
|
||||
CreatedById: requestForInformationObjectionRepliesReq.CreatedById,
|
||||
IsActive: requestForInformationObjectionRepliesReq.IsActive,
|
||||
CreatedAt: requestForInformationObjectionRepliesReq.CreatedAt,
|
||||
UpdatedAt: requestForInformationObjectionRepliesReq.UpdatedAt,
|
||||
}
|
||||
}
|
||||
return requestForInformationObjectionRepliesRes
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/rs/zerolog"
|
||||
"go-humas-be/app/database"
|
||||
"go-humas-be/app/database/entity"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/request"
|
||||
"go-humas-be/utils/paginator"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type requestForInformationObjectionRepliesRepository struct {
|
||||
DB *database.Database
|
||||
Log zerolog.Logger
|
||||
}
|
||||
|
||||
// RequestForInformationObjectionRepliesRepository define interface of IRequestForInformationObjectionRepliesRepository
|
||||
type RequestForInformationObjectionRepliesRepository interface {
|
||||
GetAll(req request.RequestForInformationObjectionRepliesQueryRequest) (requestForInformationObjectionRepliess []*entity.RequestForInformationObjectionReplies, paging paginator.Pagination, err error)
|
||||
FindOne(id uint) (requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies, err error)
|
||||
Create(requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies) (requestForInformationObjectionRepliesReturn *entity.RequestForInformationObjectionReplies, err error)
|
||||
Update(id uint, requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies) (err error)
|
||||
Delete(id uint) (err error)
|
||||
}
|
||||
|
||||
func NewRequestForInformationObjectionRepliesRepository(db *database.Database, logger zerolog.Logger) RequestForInformationObjectionRepliesRepository {
|
||||
return &requestForInformationObjectionRepliesRepository{
|
||||
DB: db,
|
||||
Log: logger,
|
||||
}
|
||||
}
|
||||
|
||||
// implement interface of IRequestForInformationObjectionRepliesRepository
|
||||
func (_i *requestForInformationObjectionRepliesRepository) GetAll(req request.RequestForInformationObjectionRepliesQueryRequest) (requestForInformationObjectionRepliess []*entity.RequestForInformationObjectionReplies, paging paginator.Pagination, err error) {
|
||||
var count int64
|
||||
|
||||
query := _i.DB.DB.Model(&entity.RequestForInformationObjectionReplies{})
|
||||
query = query.Where("is_active = ?", true)
|
||||
|
||||
if req.RequestForInformationObjectionId != nil {
|
||||
query = query.Where("request_for_information_objection_id = ?", req.RequestForInformationObjectionId)
|
||||
}
|
||||
if req.Response != nil && *req.Response != "" {
|
||||
response := strings.ToLower(*req.Response)
|
||||
query = query.Where("LOWER(response) LIKE ?", "%"+strings.ToLower(response)+"%")
|
||||
}
|
||||
if req.StatusId != nil {
|
||||
query = query.Where("status_id = ?", req.StatusId)
|
||||
}
|
||||
if req.CreatedById != nil {
|
||||
query = query.Where("created_by_id = ?", req.CreatedById)
|
||||
}
|
||||
query.Count(&count)
|
||||
|
||||
if req.Pagination.SortBy != "" {
|
||||
direction := "ASC"
|
||||
if req.Pagination.Sort == "desc" {
|
||||
direction = "DESC"
|
||||
}
|
||||
query.Order(fmt.Sprintf("%s %s", req.Pagination.SortBy, direction))
|
||||
}
|
||||
|
||||
req.Pagination.Count = count
|
||||
req.Pagination = paginator.Paging(req.Pagination)
|
||||
|
||||
err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&requestForInformationObjectionRepliess).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
paging = *req.Pagination
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesRepository) FindOne(id uint) (requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies, err error) {
|
||||
if err := _i.DB.DB.First(&requestForInformationObjectionReplies, id).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return requestForInformationObjectionReplies, nil
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesRepository) Create(requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies) (requestForInformationObjectionRepliesReturn *entity.RequestForInformationObjectionReplies, err error) {
|
||||
result := _i.DB.DB.Create(requestForInformationObjectionReplies)
|
||||
return requestForInformationObjectionReplies, result.Error
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesRepository) Update(id uint, requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies) (err error) {
|
||||
return _i.DB.DB.Model(&entity.RequestForInformationObjectionReplies{}).
|
||||
Where(&entity.RequestForInformationObjectionReplies{ID: id}).
|
||||
Updates(requestForInformationObjectionReplies).Error
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesRepository) Delete(id uint) error {
|
||||
return _i.DB.DB.Delete(&entity.RequestForInformationObjectionReplies{}, id).Error
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package request
|
||||
|
||||
import (
|
||||
"go-humas-be/app/database/entity"
|
||||
"go-humas-be/utils/paginator"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
type RequestForInformationObjectionRepliesGeneric interface {
|
||||
ToEntity()
|
||||
}
|
||||
|
||||
type RequestForInformationObjectionRepliesQueryRequest struct {
|
||||
RequestForInformationObjectionId *int `json:"requestForInformationObjectionId"`
|
||||
Response *string `json:"response"`
|
||||
StatusId *int `json:"statusId"`
|
||||
CreatedById *int `json:"createdById"`
|
||||
Pagination *paginator.Pagination `json:"pagination"`
|
||||
}
|
||||
|
||||
type RequestForInformationObjectionRepliesCreateRequest struct {
|
||||
RequestForInformationObjectionId int `json:"requestForInformationObjectionId" validate:"required"`
|
||||
Response string `json:"response" validate:"required"`
|
||||
StatusId int `json:"statusId" validate:"required"`
|
||||
CreatedById int `json:"createdById" validate:"required"`
|
||||
}
|
||||
|
||||
func (req RequestForInformationObjectionRepliesCreateRequest) ToEntity() *entity.RequestForInformationObjectionReplies {
|
||||
return &entity.RequestForInformationObjectionReplies{
|
||||
RequestForInformationObjectionId: req.RequestForInformationObjectionId,
|
||||
Response: req.Response,
|
||||
StatusId: req.StatusId,
|
||||
IsActive: func() *bool { b := true; return &b }(),
|
||||
}
|
||||
}
|
||||
|
||||
type RequestForInformationObjectionRepliesUpdateRequest struct {
|
||||
ID uint `json:"id" validate:"required"`
|
||||
RequestForInformationObjectionId int `json:"requestForInformationObjectionId" validate:"required"`
|
||||
Response string `json:"response" validate:"required"`
|
||||
StatusId int `json:"statusId" validate:"required"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (req RequestForInformationObjectionRepliesUpdateRequest) ToEntity() *entity.RequestForInformationObjectionReplies {
|
||||
return &entity.RequestForInformationObjectionReplies{
|
||||
ID: req.ID,
|
||||
RequestForInformationObjectionId: req.RequestForInformationObjectionId,
|
||||
Response: req.Response,
|
||||
StatusId: req.StatusId,
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
type RequestForInformationObjectionRepliesQueryRequestContext struct {
|
||||
RequestForInformationObjectionId string `json:"requestForInformationObjectionId"`
|
||||
Response string `json:"response"`
|
||||
StatusId string `json:"statusId"`
|
||||
CreatedById string `json:"createdById"`
|
||||
}
|
||||
|
||||
func (req RequestForInformationObjectionRepliesQueryRequestContext) ToParamRequest() RequestForInformationObjectionRepliesQueryRequest {
|
||||
var request RequestForInformationObjectionRepliesQueryRequest
|
||||
|
||||
if requestForInformationObjectionIdStr := req.RequestForInformationObjectionId; requestForInformationObjectionIdStr != "" {
|
||||
requestForInformationObjectionId, err := strconv.Atoi(requestForInformationObjectionIdStr)
|
||||
if err == nil {
|
||||
request.RequestForInformationObjectionId = &requestForInformationObjectionId
|
||||
}
|
||||
}
|
||||
if response := req.Response; response != "" {
|
||||
request.Response = &response
|
||||
}
|
||||
if statusIdStr := req.StatusId; statusIdStr != "" {
|
||||
statusId, err := strconv.Atoi(statusIdStr)
|
||||
if err == nil {
|
||||
request.StatusId = &statusId
|
||||
}
|
||||
}
|
||||
if createdByIdStr := req.CreatedById; createdByIdStr != "" {
|
||||
createdById, err := strconv.Atoi(createdByIdStr)
|
||||
if err == nil {
|
||||
request.CreatedById = &createdById
|
||||
}
|
||||
}
|
||||
|
||||
return request
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package request_for_information_objection_replies
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/controller"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/repository"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/service"
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
// struct of RequestForInformationObjectionRepliesRouter
|
||||
type RequestForInformationObjectionRepliesRouter struct {
|
||||
App fiber.Router
|
||||
Controller *controller.Controller
|
||||
}
|
||||
|
||||
// register bulky of RequestForInformationObjectionReplies module
|
||||
var NewRequestForInformationObjectionRepliesModule = fx.Options(
|
||||
// register repository of RequestForInformationObjectionReplies module
|
||||
fx.Provide(repository.NewRequestForInformationObjectionRepliesRepository),
|
||||
|
||||
// register service of RequestForInformationObjectionReplies module
|
||||
fx.Provide(service.NewRequestForInformationObjectionRepliesService),
|
||||
|
||||
// register controller of RequestForInformationObjectionReplies module
|
||||
fx.Provide(controller.NewController),
|
||||
|
||||
// register router of RequestForInformationObjectionReplies module
|
||||
fx.Provide(NewRequestForInformationObjectionRepliesRouter),
|
||||
)
|
||||
|
||||
// init RequestForInformationObjectionRepliesRouter
|
||||
func NewRequestForInformationObjectionRepliesRouter(fiber *fiber.App, controller *controller.Controller) *RequestForInformationObjectionRepliesRouter {
|
||||
return &RequestForInformationObjectionRepliesRouter{
|
||||
App: fiber,
|
||||
Controller: controller,
|
||||
}
|
||||
}
|
||||
|
||||
// register routes of RequestForInformationObjectionReplies module
|
||||
func (_i *RequestForInformationObjectionRepliesRouter) RegisterRequestForInformationObjectionRepliesRoutes() {
|
||||
// define controllers
|
||||
requestForInformationObjectionRepliesController := _i.Controller.RequestForInformationObjectionReplies
|
||||
|
||||
// define routes
|
||||
_i.App.Route("/request-for-information-objection-replies", func(router fiber.Router) {
|
||||
router.Get("/", requestForInformationObjectionRepliesController.All)
|
||||
router.Get("/:id", requestForInformationObjectionRepliesController.Show)
|
||||
router.Post("/", requestForInformationObjectionRepliesController.Save)
|
||||
router.Put("/:id", requestForInformationObjectionRepliesController.Update)
|
||||
router.Delete("/:id", requestForInformationObjectionRepliesController.Delete)
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package response
|
||||
|
||||
import "time"
|
||||
|
||||
type RequestForInformationObjectionRepliesResponse struct {
|
||||
ID uint `json:"id"`
|
||||
RequestForInformationObjectionId int `json:"requestForInformationObjectionId"`
|
||||
Response string `json:"response"`
|
||||
StatusId int `json:"statusId"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
IsActive *bool `json:"isActive"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog"
|
||||
"go-humas-be/app/database/entity"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/mapper"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/repository"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/request"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies/response"
|
||||
usersRepository "go-humas-be/app/module/users/repository"
|
||||
"go-humas-be/utils/paginator"
|
||||
|
||||
utilSvc "go-humas-be/utils/service"
|
||||
)
|
||||
|
||||
// RequestForInformationObjectionRepliesService
|
||||
type requestForInformationObjectionRepliesService struct {
|
||||
Repo repository.RequestForInformationObjectionRepliesRepository
|
||||
UsersRepo usersRepository.UsersRepository
|
||||
Log zerolog.Logger
|
||||
}
|
||||
|
||||
// RequestForInformationObjectionRepliesService define interface of IRequestForInformationObjectionRepliesService
|
||||
type RequestForInformationObjectionRepliesService interface {
|
||||
All(req request.RequestForInformationObjectionRepliesQueryRequest) (requestForInformationObjectionReplies []*response.RequestForInformationObjectionRepliesResponse, paging paginator.Pagination, err error)
|
||||
Show(id uint) (requestForInformationObjectionReplies *response.RequestForInformationObjectionRepliesResponse, err error)
|
||||
Save(req request.RequestForInformationObjectionRepliesCreateRequest, authToken string) (requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies, err error)
|
||||
Update(id uint, req request.RequestForInformationObjectionRepliesUpdateRequest) (err error)
|
||||
Delete(id uint) error
|
||||
}
|
||||
|
||||
// NewRequestForInformationObjectionRepliesService init RequestForInformationObjectionRepliesService
|
||||
func NewRequestForInformationObjectionRepliesService(repo repository.RequestForInformationObjectionRepliesRepository, log zerolog.Logger, usersRepo usersRepository.UsersRepository) RequestForInformationObjectionRepliesService {
|
||||
|
||||
return &requestForInformationObjectionRepliesService{
|
||||
Repo: repo,
|
||||
Log: log,
|
||||
UsersRepo: usersRepo,
|
||||
}
|
||||
}
|
||||
|
||||
// All implement interface of RequestForInformationObjectionRepliesService
|
||||
func (_i *requestForInformationObjectionRepliesService) All(req request.RequestForInformationObjectionRepliesQueryRequest) (requestForInformationObjectionRepliess []*response.RequestForInformationObjectionRepliesResponse, paging paginator.Pagination, err error) {
|
||||
results, paging, err := _i.Repo.GetAll(req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, result := range results {
|
||||
requestForInformationObjectionRepliess = append(requestForInformationObjectionRepliess, mapper.RequestForInformationObjectionRepliesResponseMapper(result))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesService) Show(id uint) (requestForInformationObjectionReplies *response.RequestForInformationObjectionRepliesResponse, err error) {
|
||||
result, err := _i.Repo.FindOne(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mapper.RequestForInformationObjectionRepliesResponseMapper(result), nil
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesService) Save(req request.RequestForInformationObjectionRepliesCreateRequest, authToken string) (requestForInformationObjectionReplies *entity.RequestForInformationObjectionReplies, err error) {
|
||||
_i.Log.Info().Interface("data", req).Msg("")
|
||||
|
||||
newReq := req.ToEntity()
|
||||
|
||||
createdBy := utilSvc.GetUserInfo(_i.Log, _i.UsersRepo, authToken)
|
||||
newReq.CreatedById = &createdBy.ID
|
||||
|
||||
return _i.Repo.Create(newReq)
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesService) Update(id uint, req request.RequestForInformationObjectionRepliesUpdateRequest) (err error) {
|
||||
_i.Log.Info().Interface("data", req).Msg("")
|
||||
return _i.Repo.Update(id, req.ToEntity())
|
||||
}
|
||||
|
||||
func (_i *requestForInformationObjectionRepliesService) Delete(id uint) error {
|
||||
result, err := _i.Repo.FindOne(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
isActive := false
|
||||
result.IsActive = &isActive
|
||||
return _i.Repo.Update(id, result)
|
||||
}
|
||||
|
|
@ -53,8 +53,12 @@ func (_i *usersController) All(c *fiber.Ctx) error {
|
|||
Username: c.Query("username"),
|
||||
Email: c.Query("email"),
|
||||
Fullname: c.Query("fullname"),
|
||||
Address: c.Query("address"),
|
||||
PhoneNumber: c.Query("phoneNumber"),
|
||||
WorkType: c.Query("workType"),
|
||||
GenderType: c.Query("genderType"),
|
||||
IdentityType: c.Query("identityType"),
|
||||
IdentityGroup: c.Query("identityGroup"),
|
||||
IdentityGroupNumber: c.Query("identityGroupNumber"),
|
||||
IdentityNumber: c.Query("identityNumber"),
|
||||
UserRoleId: c.Query("userRoleId"),
|
||||
StatusId: c.Query("statusId"),
|
||||
|
|
|
|||
|
|
@ -53,6 +53,21 @@ func (_i *usersRepository) GetAll(req request.UsersQueryRequest) (userss []*enti
|
|||
if req.PhoneNumber != nil && *req.PhoneNumber != "" {
|
||||
query = query.Where("phone_number = ?", req.PhoneNumber)
|
||||
}
|
||||
if req.WorkType != nil && *req.WorkType != "" {
|
||||
query = query.Where("work_type = ?", req.WorkType)
|
||||
}
|
||||
if req.GenderType != nil && *req.GenderType != "" {
|
||||
query = query.Where("gender_type = ?", req.GenderType)
|
||||
}
|
||||
if req.IdentityType != nil && *req.IdentityType != "" {
|
||||
query = query.Where("identity_type = ?", req.IdentityType)
|
||||
}
|
||||
if req.IdentityGroup != nil && *req.IdentityGroup != "" {
|
||||
query = query.Where("identity_group = ?", req.IdentityGroup)
|
||||
}
|
||||
if req.IdentityGroupNumber != nil && *req.IdentityGroupNumber != "" {
|
||||
query = query.Where("identity_group_number = ?", req.IdentityGroupNumber)
|
||||
}
|
||||
if req.IdentityNumber != nil && *req.IdentityNumber != "" {
|
||||
query = query.Where("identity_number = ?", req.IdentityNumber)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ type UsersQueryRequest struct {
|
|||
Email *string `json:"email"`
|
||||
Fullname *string `json:"fullname"`
|
||||
PhoneNumber *string `json:"phoneNumber"`
|
||||
WorkType *string `json:"workType"`
|
||||
GenderType *string `json:"genderType"`
|
||||
IdentityType *string `json:"identityType"`
|
||||
IdentityGroup *string `json:"identityGroup"`
|
||||
IdentityGroupNumber *string `json:"identityGroupNumber"`
|
||||
IdentityNumber *string `json:"identityNumber"`
|
||||
UserRoleId *int `json:"userRoleId"`
|
||||
StatusId *int `json:"statusId"`
|
||||
|
|
@ -31,6 +36,8 @@ type UsersCreateRequest struct {
|
|||
WorkType string `json:"workType" validate:"required"`
|
||||
GenderType string `json:"genderType" validate:"required"`
|
||||
IdentityType string `json:"identityType" validate:"required"`
|
||||
IdentityGroup string `json:"identityGroup" validate:"required"`
|
||||
IdentityGroupNumber string `json:"identityGroupNumber" validate:"required"`
|
||||
IdentityNumber string `json:"identityNumber" validate:"required"`
|
||||
DateOfBirth string `json:"dateOfBirth" validate:"required"`
|
||||
LastEducation string `json:"lastEducation" validate:"required"`
|
||||
|
|
@ -49,6 +56,8 @@ func (req UsersCreateRequest) ToEntity() *entity.Users {
|
|||
WorkType: req.WorkType,
|
||||
GenderType: req.GenderType,
|
||||
IdentityType: req.IdentityType,
|
||||
IdentityGroup: req.IdentityGroup,
|
||||
IdentityGroupNumber: req.IdentityGroupNumber,
|
||||
IdentityNumber: req.IdentityNumber,
|
||||
DateOfBirth: req.DateOfBirth,
|
||||
LastEducation: req.LastEducation,
|
||||
|
|
@ -66,6 +75,8 @@ type UsersUpdateRequest struct {
|
|||
WorkType string `json:"workType" validate:"required"`
|
||||
GenderType string `json:"genderType" validate:"required"`
|
||||
IdentityType string `json:"identityType" validate:"required"`
|
||||
IdentityGroup string `json:"identityGroup" validate:"required"`
|
||||
IdentityGroupNumber string `json:"identityGroupNumber" validate:"required"`
|
||||
IdentityNumber string `json:"identityNumber" validate:"required"`
|
||||
DateOfBirth string `json:"dateOfBirth" validate:"required"`
|
||||
LastEducation string `json:"lastEducation" validate:"required"`
|
||||
|
|
@ -84,6 +95,8 @@ func (req UsersUpdateRequest) ToEntity() *entity.Users {
|
|||
WorkType: req.WorkType,
|
||||
GenderType: req.GenderType,
|
||||
IdentityType: req.IdentityType,
|
||||
IdentityGroup: req.IdentityGroup,
|
||||
IdentityGroupNumber: req.IdentityGroupNumber,
|
||||
IdentityNumber: req.IdentityNumber,
|
||||
DateOfBirth: req.DateOfBirth,
|
||||
LastEducation: req.LastEducation,
|
||||
|
|
@ -104,8 +117,12 @@ type UsersQueryRequestContext struct {
|
|||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
Fullname string `json:"fullname"`
|
||||
Address string `json:"address"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
WorkType string `json:"workType"`
|
||||
GenderType string `json:"genderType"`
|
||||
IdentityType string `json:"identityType"`
|
||||
IdentityGroup string `json:"identityGroup"`
|
||||
IdentityGroupNumber string `json:"identityGroupNumber"`
|
||||
IdentityNumber string `json:"identityNumber"`
|
||||
UserRoleId string `json:"userRoleId"`
|
||||
StatusId string `json:"statusId"`
|
||||
|
|
@ -126,6 +143,21 @@ func (req UsersQueryRequestContext) ToParamRequest() UsersQueryRequest {
|
|||
if phoneNumber := req.PhoneNumber; phoneNumber != "" {
|
||||
request.PhoneNumber = &phoneNumber
|
||||
}
|
||||
if workType := req.WorkType; workType != "" {
|
||||
request.WorkType = &workType
|
||||
}
|
||||
if genderType := req.GenderType; genderType != "" {
|
||||
request.GenderType = &genderType
|
||||
}
|
||||
if identityType := req.IdentityType; identityType != "" {
|
||||
request.IdentityType = &identityType
|
||||
}
|
||||
if identityGroup := req.IdentityGroup; identityGroup != "" {
|
||||
request.IdentityGroup = &identityGroup
|
||||
}
|
||||
if identityGroupNumber := req.IdentityGroupNumber; identityGroupNumber != "" {
|
||||
request.IdentityGroupNumber = &identityGroupNumber
|
||||
}
|
||||
if identityNumber := req.IdentityNumber; identityNumber != "" {
|
||||
request.IdentityNumber = &identityNumber
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import (
|
|||
"go-humas-be/app/module/provinces"
|
||||
"go-humas-be/app/module/request_for_information_items"
|
||||
"go-humas-be/app/module/request_for_information_objection"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies"
|
||||
"go-humas-be/app/module/request_for_information_replies"
|
||||
"go-humas-be/app/module/request_for_informations"
|
||||
"go-humas-be/app/module/user_levels"
|
||||
|
|
@ -51,6 +52,7 @@ type Router struct {
|
|||
RequestForInformationItemsRouter *request_for_information_items.RequestForInformationItemsRouter
|
||||
RequestForInformationRepliesRouter *request_for_information_replies.RequestForInformationRepliesRouter
|
||||
RequestForInformationObjectionRouter *request_for_information_objection.RequestForInformationObjectionRouter
|
||||
RequestForInformationObjectionRepliesRouter *request_for_information_objection_replies.RequestForInformationObjectionRepliesRouter
|
||||
UserLevelsRouter *user_levels.UserLevelsRouter
|
||||
UserRoleAccessesRouter *user_role_accesses.UserRoleAccessesRouter
|
||||
UserRolesRouter *user_roles.UserRolesRouter
|
||||
|
|
@ -79,6 +81,7 @@ func NewRouter(
|
|||
requestForInformationItemsRouter *request_for_information_items.RequestForInformationItemsRouter,
|
||||
requestForInformationRepliesRouter *request_for_information_replies.RequestForInformationRepliesRouter,
|
||||
requestForInformationObjectionRouter *request_for_information_objection.RequestForInformationObjectionRouter,
|
||||
requestForInformationObjectionRepliesRouter *request_for_information_objection_replies.RequestForInformationObjectionRepliesRouter,
|
||||
userLevelsRouter *user_levels.UserLevelsRouter,
|
||||
userRoleAccessesRouter *user_role_accesses.UserRoleAccessesRouter,
|
||||
userRolesRouter *user_roles.UserRolesRouter,
|
||||
|
|
@ -105,6 +108,7 @@ func NewRouter(
|
|||
RequestForInformationItemsRouter: requestForInformationItemsRouter,
|
||||
RequestForInformationRepliesRouter: requestForInformationRepliesRouter,
|
||||
RequestForInformationObjectionRouter: requestForInformationObjectionRouter,
|
||||
RequestForInformationObjectionRepliesRouter: requestForInformationObjectionRepliesRouter,
|
||||
UserLevelsRouter: userLevelsRouter,
|
||||
UserRoleAccessesRouter: userRoleAccessesRouter,
|
||||
UserRolesRouter: userRolesRouter,
|
||||
|
|
@ -141,6 +145,7 @@ func (r *Router) Register() {
|
|||
r.RequestForInformationItemsRouter.RegisterRequestForInformationItemsRoutes()
|
||||
r.RequestForInformationRepliesRouter.RegisterRequestForInformationRepliesRoutes()
|
||||
r.RequestForInformationObjectionRouter.RegisterRequestForInformationObjectionRoutes()
|
||||
r.RequestForInformationObjectionRepliesRouter.RegisterRequestForInformationObjectionRepliesRoutes()
|
||||
r.UserLevelsRouter.RegisterUserLevelsRoutes()
|
||||
r.UserRoleAccessesRouter.RegisterUserRoleAccessesRoutes()
|
||||
r.UsersRouter.RegisterUsersRoutes()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ body-limit = 104857600 # "100 * 1024 * 1024"
|
|||
|
||||
[db.postgres]
|
||||
dsn = "postgresql://humas_polri:P@ssw0rd.1@103.82.242.92:5432/humas_polri" # <driver>://<username>:<password>@<host>:<port>/<database>
|
||||
migrate = false
|
||||
migrate = true
|
||||
seed = false
|
||||
|
||||
[logger]
|
||||
|
|
|
|||
|
|
@ -5768,6 +5768,317 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection-replies": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for getting all RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Get all RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "createdById",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "requestForInformationObjectionId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "response",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "statusId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "nextPage",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "previousPage",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sortBy",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "totalPage",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for create RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Create RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cAdd access token here\u003e",
|
||||
"description": "Insert your access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Required payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.RequestForInformationObjectionRepliesCreateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection-replies/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for getting one RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Get one RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for update RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "update RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Required payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.RequestForInformationObjectionRepliesUpdateRequest"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for delete RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "delete RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
|
@ -7741,11 +8052,31 @@ const docTemplate = `{
|
|||
"name": "fullname",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "genderType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityGroup",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityGroupNumber",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityNumber",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "phoneNumber",
|
||||
|
|
@ -7766,6 +8097,11 @@ const docTemplate = `{
|
|||
"name": "username",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "workType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
|
|
@ -8767,6 +9103,55 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionRepliesCreateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"createdById",
|
||||
"requestForInformationObjectionId",
|
||||
"response",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requestForInformationObjectionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"response": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionRepliesUpdateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"requestForInformationObjectionId",
|
||||
"response",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requestForInformationObjectionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"response": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionUpdateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -9128,6 +9513,8 @@ const docTemplate = `{
|
|||
"email",
|
||||
"fullname",
|
||||
"genderType",
|
||||
"identityGroup",
|
||||
"identityGroupNumber",
|
||||
"identityNumber",
|
||||
"identityType",
|
||||
"lastEducation",
|
||||
|
|
@ -9154,6 +9541,12 @@ const docTemplate = `{
|
|||
"genderType": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroupNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -9191,6 +9584,8 @@ const docTemplate = `{
|
|||
"email",
|
||||
"fullname",
|
||||
"genderType",
|
||||
"identityGroup",
|
||||
"identityGroupNumber",
|
||||
"identityNumber",
|
||||
"identityType",
|
||||
"lastEducation",
|
||||
|
|
@ -9216,6 +9611,12 @@ const docTemplate = `{
|
|||
"genderType": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroupNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5757,6 +5757,317 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection-replies": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for getting all RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Get all RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "createdById",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "requestForInformationObjectionId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "response",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "statusId",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "nextPage",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "previousPage",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sortBy",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "totalPage",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for create RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Create RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cAdd access token here\u003e",
|
||||
"description": "Insert your access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Required payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.RequestForInformationObjectionRepliesCreateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection-replies/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for getting one RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "Get one RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for update RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "update RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Required payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.RequestForInformationObjectionRepliesUpdateRequest"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "API for delete RequestForInformationObjectionReplies",
|
||||
"tags": [
|
||||
"RequestForInformationObjectionReplies"
|
||||
],
|
||||
"summary": "delete RequestForInformationObjectionReplies",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "RequestForInformationObjectionReplies ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.BadRequestError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.UnauthorizedError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/request-for-information-objection/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
|
@ -7730,11 +8041,31 @@
|
|||
"name": "fullname",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "genderType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityGroup",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityGroupNumber",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityNumber",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "identityType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "phoneNumber",
|
||||
|
|
@ -7755,6 +8086,11 @@
|
|||
"name": "username",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "workType",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "count",
|
||||
|
|
@ -8756,6 +9092,55 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionRepliesCreateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"createdById",
|
||||
"requestForInformationObjectionId",
|
||||
"response",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requestForInformationObjectionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"response": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionRepliesUpdateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"requestForInformationObjectionId",
|
||||
"response",
|
||||
"statusId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requestForInformationObjectionId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"response": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.RequestForInformationObjectionUpdateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -9117,6 +9502,8 @@
|
|||
"email",
|
||||
"fullname",
|
||||
"genderType",
|
||||
"identityGroup",
|
||||
"identityGroupNumber",
|
||||
"identityNumber",
|
||||
"identityType",
|
||||
"lastEducation",
|
||||
|
|
@ -9143,6 +9530,12 @@
|
|||
"genderType": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroupNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -9180,6 +9573,8 @@
|
|||
"email",
|
||||
"fullname",
|
||||
"genderType",
|
||||
"identityGroup",
|
||||
"identityGroupNumber",
|
||||
"identityNumber",
|
||||
"identityType",
|
||||
"lastEducation",
|
||||
|
|
@ -9205,6 +9600,12 @@
|
|||
"genderType": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityGroupNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"identityNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -423,6 +423,40 @@ definitions:
|
|||
- secondaryReason
|
||||
- statusId
|
||||
type: object
|
||||
request.RequestForInformationObjectionRepliesCreateRequest:
|
||||
properties:
|
||||
createdById:
|
||||
type: integer
|
||||
requestForInformationObjectionId:
|
||||
type: integer
|
||||
response:
|
||||
type: string
|
||||
statusId:
|
||||
type: integer
|
||||
required:
|
||||
- createdById
|
||||
- requestForInformationObjectionId
|
||||
- response
|
||||
- statusId
|
||||
type: object
|
||||
request.RequestForInformationObjectionRepliesUpdateRequest:
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
requestForInformationObjectionId:
|
||||
type: integer
|
||||
response:
|
||||
type: string
|
||||
statusId:
|
||||
type: integer
|
||||
updated_at:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- requestForInformationObjectionId
|
||||
- response
|
||||
- statusId
|
||||
type: object
|
||||
request.RequestForInformationObjectionUpdateRequest:
|
||||
properties:
|
||||
documentName:
|
||||
|
|
@ -684,6 +718,10 @@ definitions:
|
|||
type: string
|
||||
genderType:
|
||||
type: string
|
||||
identityGroup:
|
||||
type: string
|
||||
identityGroupNumber:
|
||||
type: string
|
||||
identityNumber:
|
||||
type: string
|
||||
identityType:
|
||||
|
|
@ -708,6 +746,8 @@ definitions:
|
|||
- email
|
||||
- fullname
|
||||
- genderType
|
||||
- identityGroup
|
||||
- identityGroupNumber
|
||||
- identityNumber
|
||||
- identityType
|
||||
- lastEducation
|
||||
|
|
@ -730,6 +770,10 @@ definitions:
|
|||
type: string
|
||||
genderType:
|
||||
type: string
|
||||
identityGroup:
|
||||
type: string
|
||||
identityGroupNumber:
|
||||
type: string
|
||||
identityNumber:
|
||||
type: string
|
||||
identityType:
|
||||
|
|
@ -754,6 +798,8 @@ definitions:
|
|||
- email
|
||||
- fullname
|
||||
- genderType
|
||||
- identityGroup
|
||||
- identityGroupNumber
|
||||
- identityNumber
|
||||
- identityType
|
||||
- lastEducation
|
||||
|
|
@ -4453,6 +4499,202 @@ paths:
|
|||
summary: Create RequestForInformationObjection
|
||||
tags:
|
||||
- RequestForInformationObjection
|
||||
/request-for-information-objection-replies:
|
||||
get:
|
||||
description: API for getting all RequestForInformationObjectionReplies
|
||||
parameters:
|
||||
- in: query
|
||||
name: createdById
|
||||
type: integer
|
||||
- in: query
|
||||
name: requestForInformationObjectionId
|
||||
type: integer
|
||||
- in: query
|
||||
name: response
|
||||
type: string
|
||||
- in: query
|
||||
name: statusId
|
||||
type: integer
|
||||
- in: query
|
||||
name: count
|
||||
type: integer
|
||||
- in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- in: query
|
||||
name: nextPage
|
||||
type: integer
|
||||
- in: query
|
||||
name: page
|
||||
type: integer
|
||||
- in: query
|
||||
name: previousPage
|
||||
type: integer
|
||||
- in: query
|
||||
name: sort
|
||||
type: string
|
||||
- in: query
|
||||
name: sortBy
|
||||
type: string
|
||||
- in: query
|
||||
name: totalPage
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/response.BadRequestError'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/response.UnauthorizedError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.InternalServerError'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get all RequestForInformationObjectionReplies
|
||||
tags:
|
||||
- RequestForInformationObjectionReplies
|
||||
post:
|
||||
description: API for create RequestForInformationObjectionReplies
|
||||
parameters:
|
||||
- default: Bearer <Add access token here>
|
||||
description: Insert your access token
|
||||
in: header
|
||||
name: Authorization
|
||||
required: true
|
||||
type: string
|
||||
- description: Required payload
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/request.RequestForInformationObjectionRepliesCreateRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/response.BadRequestError'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/response.UnauthorizedError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.InternalServerError'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create RequestForInformationObjectionReplies
|
||||
tags:
|
||||
- RequestForInformationObjectionReplies
|
||||
/request-for-information-objection-replies/{id}:
|
||||
delete:
|
||||
description: API for delete RequestForInformationObjectionReplies
|
||||
parameters:
|
||||
- description: RequestForInformationObjectionReplies ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/response.BadRequestError'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/response.UnauthorizedError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.InternalServerError'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: delete RequestForInformationObjectionReplies
|
||||
tags:
|
||||
- RequestForInformationObjectionReplies
|
||||
get:
|
||||
description: API for getting one RequestForInformationObjectionReplies
|
||||
parameters:
|
||||
- description: RequestForInformationObjectionReplies ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/response.BadRequestError'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/response.UnauthorizedError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.InternalServerError'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get one RequestForInformationObjectionReplies
|
||||
tags:
|
||||
- RequestForInformationObjectionReplies
|
||||
put:
|
||||
description: API for update RequestForInformationObjectionReplies
|
||||
parameters:
|
||||
- description: Required payload
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/request.RequestForInformationObjectionRepliesUpdateRequest'
|
||||
- description: RequestForInformationObjectionReplies ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/response.BadRequestError'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/response.UnauthorizedError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.InternalServerError'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: update RequestForInformationObjectionReplies
|
||||
tags:
|
||||
- RequestForInformationObjectionReplies
|
||||
/request-for-information-objection/{id}:
|
||||
delete:
|
||||
description: API for delete RequestForInformationObjection
|
||||
|
|
@ -5698,9 +5940,21 @@ paths:
|
|||
- in: query
|
||||
name: fullname
|
||||
type: string
|
||||
- in: query
|
||||
name: genderType
|
||||
type: string
|
||||
- in: query
|
||||
name: identityGroup
|
||||
type: string
|
||||
- in: query
|
||||
name: identityGroupNumber
|
||||
type: string
|
||||
- in: query
|
||||
name: identityNumber
|
||||
type: string
|
||||
- in: query
|
||||
name: identityType
|
||||
type: string
|
||||
- in: query
|
||||
name: phoneNumber
|
||||
type: string
|
||||
|
|
@ -5713,6 +5967,9 @@ paths:
|
|||
- in: query
|
||||
name: username
|
||||
type: string
|
||||
- in: query
|
||||
name: workType
|
||||
type: string
|
||||
- in: query
|
||||
name: count
|
||||
type: integer
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -21,6 +21,7 @@ import (
|
|||
"go-humas-be/app/module/provinces"
|
||||
"go-humas-be/app/module/request_for_information_items"
|
||||
"go-humas-be/app/module/request_for_information_objection"
|
||||
"go-humas-be/app/module/request_for_information_objection_replies"
|
||||
"go-humas-be/app/module/request_for_information_replies"
|
||||
"go-humas-be/app/module/request_for_informations"
|
||||
"go-humas-be/app/module/user_levels"
|
||||
|
|
@ -81,6 +82,7 @@ func main() {
|
|||
request_for_information_items.NewRequestForInformationItemsModule,
|
||||
request_for_information_replies.NewRequestForInformationRepliesModule,
|
||||
request_for_information_objection.NewRequestForInformationObjectionModule,
|
||||
request_for_information_objection_replies.NewRequestForInformationObjectionRepliesModule,
|
||||
|
||||
// start aplication
|
||||
fx.Invoke(webserver.Start),
|
||||
|
|
|
|||
Loading…
Reference in New Issue