pembaruhan swagger dan tool
This commit is contained in:
66
internal/models/vclaim/peserta.go
Normal file
66
internal/models/vclaim/peserta.go
Normal file
@@ -0,0 +1,66 @@
|
||||
package models
|
||||
|
||||
// Peserta BPJS Models
|
||||
// Generated at: 2025-08-24 16:39:05
|
||||
// Category: vclaim
|
||||
|
||||
// Common Response Structure
|
||||
type PesertaResponse struct {
|
||||
Message string `json:"message"`
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type PesertaRawResponse struct {
|
||||
MetaData struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
} `json:"metaData"`
|
||||
Response interface{} `json:"response"`
|
||||
}
|
||||
|
||||
// Peserta POST Request Structure
|
||||
type PesertaPostRequest struct {
|
||||
TPeserta PesertaPost `json:"t_peserta" binding:"required"`
|
||||
}
|
||||
|
||||
type PesertaPost struct {
|
||||
// Add your specific fields here based on BPJS API requirements
|
||||
NoKartu string `json:"noKartu" binding:"required"`
|
||||
TglLayanan string `json:"tglLayanan" binding:"required"`
|
||||
JnsPelayanan string `json:"jnsPelayanan" binding:"required"`
|
||||
User string `json:"user" binding:"required"`
|
||||
}
|
||||
|
||||
// Peserta PUT Request Structure
|
||||
type PesertaPutRequest struct {
|
||||
TPeserta PesertaPut `json:"t_peserta" binding:"required"`
|
||||
}
|
||||
|
||||
type PesertaPut struct {
|
||||
ID string `json:"id" binding:"required"`
|
||||
NoKartu string `json:"noKartu"`
|
||||
TglLayanan string `json:"tglLayanan"`
|
||||
JnsPelayanan string `json:"jnsPelayanan"`
|
||||
User string `json:"user" binding:"required"`
|
||||
}
|
||||
|
||||
// Peserta DELETE Request Structure
|
||||
type PesertaDeleteRequest struct {
|
||||
TPeserta struct {
|
||||
ID string `json:"id" binding:"required"`
|
||||
User string `json:"user" binding:"required"`
|
||||
} `json:"t_peserta" binding:"required"`
|
||||
}
|
||||
|
||||
// Common Helper Structures
|
||||
|
||||
// Validation helpers
|
||||
func IsValidStatus(status string) bool {
|
||||
validStatuses := []string{"active", "inactive", "pending", "processed"}
|
||||
for _, v := range validStatuses {
|
||||
if v == status {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user