package feature

import (
	"gitlab.alibaba-inc.com/pai_biz_arch/pairec/context"
	"gitlab.alibaba-inc.com/pai_biz_arch/pairec/module"
)

//CreateNewFeatureOp create new feature by Normalizer
type CreateNewFeatureOp struct {
	featureOp
}

// it create new feature store in user properties
func (op CreateNewFeatureOp) UserTransOp(featureName string, source string, remove bool, normalizer Normalizer, user *module.User, context *context.RecommendContext) {
	if normalizer != nil {
		user.AddProperty(featureName, normalizer.Apply(nil))
	}
}

func (op CreateNewFeatureOp) ItemTransOp(featureName string, source string, remove bool, normalizer Normalizer, user *module.User, item *module.Item, context *context.RecommendContext) {
}
