package threads_account

import (
	"haixun-backend/internal/model/own_post_formula/domain/entity"
	"haixun-backend/internal/types"
)

func toOwnPostFormulaReviewData(item *entity.Review) types.OwnPostFormulaReviewData {
	if item == nil {
		return types.OwnPostFormulaReviewData{}
	}
	return types.OwnPostFormulaReviewData{
		MediaID:         item.MediaID,
		ReviewedAt:      item.UpdateAt,
		Summary:         item.Summary,
		Wins:            item.Wins,
		Improvements:    item.Improvements,
		Formula:         item.Formula,
		PostTemplate:    item.PostTemplate,
		HookPattern:     item.HookPattern,
		Structure:       item.Structure,
		ReplicationTips: item.ReplicationTips,
		Avoid:           item.Avoid,
	}
}
