cooperation_mode.go 1.1 KB
package transform

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
)

func TransformToCooperationModeDomainModelFromPgModels(cooperationModeModel *models.CooperationMode) (*domain.CooperationMode, error) {
	return &domain.CooperationMode{
		CooperationModeId:     cooperationModeModel.CooperationModeId,
		CooperationModeNumber: cooperationModeModel.CooperationModeNumber,
		CooperationModeName:   cooperationModeModel.CooperationModeName,
		Status:                cooperationModeModel.Status,
		Org:                   cooperationModeModel.Org,
		Company:               cooperationModeModel.Company,
		Remarks:               cooperationModeModel.Remarks,
		Operator:              cooperationModeModel.Operator,
		OperateTime:           cooperationModeModel.OperateTime,
		UpdatedAt:             cooperationModeModel.UpdatedAt,
		DeletedAt:             cooperationModeModel.DeletedAt,
		CreatedAt:             cooperationModeModel.CreatedAt,
	}, nil
}