Creat Service BPJS

This commit is contained in:
2025-08-18 18:09:41 +07:00
parent f953f6d646
commit 1c4f65ffd8
19 changed files with 1073 additions and 3323 deletions

View File

@@ -30,150 +30,6 @@ definitions:
username:
type: string
type: object
api-service_internal_models_order.AggregateData:
properties:
by_status:
additionalProperties:
type: integer
type: object
created_today:
type: integer
last_updated:
type: string
total_active:
type: integer
total_draft:
type: integer
total_inactive:
type: integer
updated_today:
type: integer
type: object
api-service_internal_models_order.ErrorResponse:
properties:
code:
type: integer
error:
type: string
message:
type: string
timestamp:
type: string
type: object
api-service_internal_models_order.MetaResponse:
properties:
current_page:
type: integer
has_next:
type: boolean
has_prev:
type: boolean
limit:
type: integer
offset:
type: integer
total:
type: integer
total_pages:
type: integer
type: object
api-service_internal_models_order.NullableInt32:
properties:
int32:
type: integer
valid:
type: boolean
type: object
api-service_internal_models_order.Order:
properties:
date_created:
$ref: '#/definitions/sql.NullTime'
date_updated:
$ref: '#/definitions/sql.NullTime'
id:
type: string
name:
$ref: '#/definitions/sql.NullString'
sort:
$ref: '#/definitions/api-service_internal_models_order.NullableInt32'
status:
type: string
user_created:
$ref: '#/definitions/sql.NullString'
user_updated:
$ref: '#/definitions/sql.NullString'
type: object
api-service_internal_models_order.OrderCreateRequest:
properties:
name:
maxLength: 255
minLength: 1
type: string
status:
enum:
- draft
- active
- inactive
type: string
required:
- status
type: object
api-service_internal_models_order.OrderCreateResponse:
properties:
data:
$ref: '#/definitions/api-service_internal_models_order.Order'
message:
type: string
type: object
api-service_internal_models_order.OrderDeleteResponse:
properties:
id:
type: string
message:
type: string
type: object
api-service_internal_models_order.OrderGetByIDResponse:
properties:
data:
$ref: '#/definitions/api-service_internal_models_order.Order'
message:
type: string
type: object
api-service_internal_models_order.OrderGetResponse:
properties:
data:
items:
$ref: '#/definitions/api-service_internal_models_order.Order'
type: array
message:
type: string
meta:
$ref: '#/definitions/api-service_internal_models_order.MetaResponse'
summary:
$ref: '#/definitions/api-service_internal_models_order.AggregateData'
type: object
api-service_internal_models_order.OrderUpdateRequest:
properties:
name:
maxLength: 255
minLength: 1
type: string
status:
enum:
- draft
- active
- inactive
type: string
required:
- status
type: object
api-service_internal_models_order.OrderUpdateResponse:
properties:
data:
$ref: '#/definitions/api-service_internal_models_order.Order'
message:
type: string
type: object
api-service_internal_models_retribusi.AggregateData:
properties:
by_dinas:
@@ -466,39 +322,6 @@ info:
title: API Service
version: 1.0.0
paths:
/api/v1/Order/{id}:
get:
consumes:
- application/json
description: Returns a single order by ID
parameters:
- description: Order ID (UUID)
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Success response
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderGetByIDResponse'
"400":
description: Invalid ID format
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"404":
description: order not found
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Get Order by ID
tags:
- Order
/api/v1/auth/login:
post:
consumes:
@@ -622,177 +445,48 @@ paths:
summary: Register new user
tags:
- Authentication
/api/v1/order/{id}:
delete:
consumes:
- application/json
description: Soft deletes a order by setting status to 'deleted'
parameters:
- description: Order ID (UUID)
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Order deleted successfully
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderDeleteResponse'
"400":
description: Invalid ID format
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"404":
description: Order not found
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Delete order
tags:
- order
put:
consumes:
- application/json
description: Updates an existing order record
parameters:
- description: Order ID (UUID)
in: path
name: id
required: true
type: string
- description: Order update request
in: body
name: request
required: true
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderUpdateRequest'
produces:
- application/json
responses:
"200":
description: Order updated successfully
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderUpdateResponse'
"400":
description: Bad request or validation error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"404":
description: Order not found
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Update order
tags:
- order
/api/v1/orders:
/api/v1/bpjs/Peserta/nik/{nik}/tglSEP/{tglSEP}:
get:
consumes:
- application/json
description: Returns a paginated list of orders with optional summary statistics
description: Search participant data based on Population NIK and service date
parameters:
- default: 10
description: Limit (max 100)
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
- default: false
description: Include aggregation summary
in: query
name: include_summary
type: boolean
- description: Filter by status
in: query
name: status
- description: NIK KTP
in: path
name: nik
required: true
type: string
- description: Search in multiple fields
in: query
name: search
- description: 'Service date/SEP date (format: yyyy-MM-dd)'
in: path
name: tglSEP
required: true
type: string
produces:
- application/json
responses:
"200":
description: Success response
description: Participant data
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderGetResponse'
additionalProperties: true
type: object
"400":
description: Bad request
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
additionalProperties: true
type: object
"404":
description: Participant not found
schema:
additionalProperties: true
type: object
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Get order with pagination and optional aggregation
additionalProperties: true
type: object
summary: Get participant data by NIK
tags:
- order
post:
consumes:
- application/json
description: Creates a new order record
parameters:
- description: Order creation request
in: body
name: request
required: true
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderCreateRequest'
produces:
- application/json
responses:
"201":
description: Order created successfully
schema:
$ref: '#/definitions/api-service_internal_models_order.OrderCreateResponse'
"400":
description: Bad request or validation error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Create order
tags:
- order
/api/v1/orders/stats:
get:
consumes:
- application/json
description: Returns comprehensive statistics about order data
parameters:
- description: Filter statistics by status
in: query
name: status
type: string
produces:
- application/json
responses:
"200":
description: Statistics data
schema:
$ref: '#/definitions/api-service_internal_models_order.AggregateData'
"500":
description: Internal server error
schema:
$ref: '#/definitions/api-service_internal_models_order.ErrorResponse'
summary: Get order statistics
tags:
- order
- bpjs
/api/v1/retribusi/{id}:
delete:
consumes: