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

import (
	e "simrs-vx/internal/domain/main-entities/doctor-fee"
)

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

	data.Doctor_Id = inputSrc.Doctor_Id
	data.FeeType_Code = inputSrc.FeeType_Code
	data.Price = inputSrc.Price
	data.Item_Id = inputSrc.Item_Id
}
