package entity

import "time"

type SentimentResult struct {
	Id                  int64     `json:"id"`
	TitlePositive       float32   `json:"title_positive"`
	TitleNeutral        float32   `json:"title_neutral"`
	TitleNegative       float32   `json:"title_negative"`
	DescriptionPositive float32   `json:"description_positive"`
	DescriptionNeutral  float32   `json:"description_neutral"`
	DescriptionNegative float32   `json:"description_negative"`
	CreatedAt           time.Time `json:"created_at"`
	NewItemId           int64     `json:"new_item_id"`
}

func NewSentimentResult(id int64, titlePositive, titleNeutral, titleNegative, descriptionPositive, descriptionNeutral, descriptionNegative float32, createdAt time.Time, newItemId int64) *SentimentResult {
	return &SentimentResult{
		Id:                  int64(id),
		TitlePositive:       titlePositive,
		TitleNeutral:        titleNeutral,
		TitleNegative:       titleNegative,
		DescriptionPositive: descriptionPositive,
		DescriptionNeutral:  descriptionNeutral,
		DescriptionNegative: descriptionNegative,
		CreatedAt:           createdAt,
		NewItemId:           int64(newItemId),
	}
}
