package transfer
import(
	"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models"
	"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/proto/treasurer"
)
func ReceiptItemToProto(in models.Item) *treasurer.Item {
	return &treasurer.Item{
		Description: in.Description,
		Measure: in.Measure,
		Quantity: in.Quantity,
		Money: in.Money,
		Currency: in.Currency,
	}
}

func ReceiptItemsToProto(in []models.Item) []*treasurer.Item {
	result := make([]*treasurer.Item, len(in), len(in))
	for i, item := range in {
		result[i] = ReceiptItemToProto(item)
	}
	return result
}
