Merge branch 'migration-vanilia' of https://github.com/dikstub-rssa/simrs-be into feat/sync-from-simx-160
This commit is contained in:
@@ -0,0 +1,73 @@
|
|||||||
|
package vclaimsep
|
||||||
|
|
||||||
|
import (
|
||||||
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
|
evsh "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CreateDto struct {
|
||||||
|
Encounter_Id *uint `json:"encounter_id"`
|
||||||
|
Number *string `json:"number" validate:"maxLength=19"`
|
||||||
|
RequestPayload []byte `json:"requestPayload" validate:"maxLength=1024"`
|
||||||
|
|
||||||
|
VclaimSepHist evsh.CreateDto
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReadListDto struct {
|
||||||
|
FilterDto
|
||||||
|
Includes string `json:"includes"`
|
||||||
|
Sort string `json:"sort"`
|
||||||
|
Pagination ecore.Pagination
|
||||||
|
}
|
||||||
|
|
||||||
|
type FilterDto struct {
|
||||||
|
Number *string `json:"number"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReadDetailDto struct {
|
||||||
|
Id uint `json:"id"`
|
||||||
|
Number *string `json:"number"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateDto struct {
|
||||||
|
Id uint `json:"id"`
|
||||||
|
CreateDto
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeleteDto struct {
|
||||||
|
Id uint `json:"id"`
|
||||||
|
Number *string `json:"number"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MetaDto struct {
|
||||||
|
PageNumber int `json:"page_number"`
|
||||||
|
PageSize int `json:"page_size"`
|
||||||
|
Count int `json:"count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResponseDto struct {
|
||||||
|
ecore.Main
|
||||||
|
Encounter_Id *uint `json:"encounter_id"`
|
||||||
|
Number *string `json:"number"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d VclaimSep) ToResponse() ResponseDto {
|
||||||
|
resp := ResponseDto{
|
||||||
|
Encounter_Id: d.Encounter_Id,
|
||||||
|
Number: d.Number,
|
||||||
|
}
|
||||||
|
resp.Main = d.Main
|
||||||
|
return resp
|
||||||
|
}
|
||||||
|
|
||||||
|
func ToResponseList(data []VclaimSep) []ResponseDto {
|
||||||
|
resp := make([]ResponseDto, len(data))
|
||||||
|
for i, u := range data {
|
||||||
|
resp[i] = u.ToResponse()
|
||||||
|
}
|
||||||
|
return resp
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c CreateDto) IsMessageSuccess() bool {
|
||||||
|
return c.VclaimSepHist.Message == "Sukses"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user