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

import (
	e "simrs-vx/internal/domain/main-entities/mcu-order-sub-item"
)

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

	data.McuSubSrc_Code = inputSrc.McuSubSrc_Code
	data.McuOrderItem_Id = inputSrc.McuOrderItem_Id
	data.Result = inputSrc.Result
	data.Status_Code = inputSrc.Status_Code
}
