notice_setting.go 855 字节
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,
		ModuleAction:    noticeSettingModel.ModuleAction,
		NoticeSettingId: noticeSettingModel.NoticeSettingId,
		OrgId:           noticeSettingModel.OrgId,
		CreatedAt:       noticeSettingModel.CreatedAt,
		DeletedAt:       noticeSettingModel.DeletedAt,
		UpdatedAt:       noticeSettingModel.UpdatedAt,
	}, nil
}