add resume entity
This commit is contained in:
No files matched your search
@@ -0,0 +1,64 @@
|
||||
package resume
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
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"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl"`
|
||||
}
|
||||
|
||||
func (d Resume) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Value: d.Value,
|
||||
FileUrl: d.FileUrl,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Resume) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package resume
|
||||
|
||||
import (
|
||||
"simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Resume struct {
|
||||
core.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl" gorm:"size:1024"`
|
||||
}
|
||||
@@ -82,6 +82,7 @@ import (
|
||||
regency "simrs-vx/internal/domain/main-entities/regency"
|
||||
rehab "simrs-vx/internal/domain/main-entities/rehab"
|
||||
responsibledoctorhist "simrs-vx/internal/domain/main-entities/responsible-doctor-hist"
|
||||
resume "simrs-vx/internal/domain/main-entities/resume"
|
||||
room "simrs-vx/internal/domain/main-entities/room"
|
||||
sbar "simrs-vx/internal/domain/main-entities/sbar"
|
||||
soapi "simrs-vx/internal/domain/main-entities/soapi"
|
||||
@@ -213,5 +214,6 @@ func getMainEntities() []any {
|
||||
&chemoprotocol.ChemoProtocol{},
|
||||
&fileattachemnt.EncounterDocument{},
|
||||
&vclaimsepcontrolletter.VclaimSepControlLetter{},
|
||||
&resume.Resume{},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user