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

import (
	e "simrs-vx/internal/domain/main-entities/procedure-room-order-item"
)

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

	data.ProcedureRoomOrder_Id = inputSrc.ProcedureRoomOrder_Id
	data.ProcedureRoom_Code = inputSrc.ProcedureRoom_Code
	data.Note = inputSrc.Note
}
