notice_setting.go 973 字节
package transform

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

func TransformToNoticeSettingDomainModelFromPgModels(noticeSettingModel *models.NoticeSetting) (*domain.NoticeSetting, error) {
	return &domain.NoticeSetting{
		CompanyId:        noticeSettingModel.CompanyId,
		Content:          noticeSettingModel.Content,
		IsPush:           noticeSettingModel.IsPush,
		Module:           noticeSettingModel.Module,
		ModuleName:       noticeSettingModel.ModuleName,
		ModuleAction:     noticeSettingModel.ModuleAction,
		ModuleActionName: noticeSettingModel.ModuleActionName,
		NoticeSettingId:  noticeSettingModel.NoticeSettingId,
		OrgId:            noticeSettingModel.OrgId,
		CreatedAt:        noticeSettingModel.CreatedAt,
		DeletedAt:        noticeSettingModel.DeletedAt,
		UpdatedAt:        noticeSettingModel.UpdatedAt,
	}, nil
}