package userfes

import (
	e "simrs-vx/internal/domain/main-entities/user-fes"
)

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