/*
DESCRIPTION:
Any functions that are used internally by the use-case
*/
package vclaimsephist

import (
	e "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
)

func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.VclaimSepHist) {
	var inputSrc *e.CreateDto
	if inputT, ok := any(input).(*e.CreateDto); ok {
		inputSrc = inputT
	} else {
		inputTemp := any(input).(*e.UpdateDto)
		inputSrc = &inputTemp.CreateDto
	}

	data.RequestPayload = &inputSrc.RequestPayload
	data.ResponseBody = &inputSrc.ResponseBody
	data.Message = &inputSrc.Message
}
