func (t *Transaction) GetLife() int {
	return t.GetIntParameter("rip") - t.GetIntParameter("born")
}
GetLife get transact time of life, rip - born
package objects
import (
	utils "github.com/soldatov-s/go-gpss/internal"
)
type Parameter struct {
	Name  string       
	Value interface{}  
}
type Transaction struct {
	pipe       *Pipeline               
	parameters map[string]interface{}  
}
func NewTransaction(pipe *Pipeline) *Transaction {
	t := &Transaction{
		pipe:       pipe,
		parameters: make(map[string]interface{}),
	}
	t.parameters["id"] = pipe.NewID()
	t.parameters["born"] = pipe.ModelTime
	t.parameters["advance"] = 0
	t.parameters["timequeue"] = 0
	t.parameters["ticks"] = 0
	t.parameters["rip"] = 0
	t.parameters["holder"] = ""
	t.parameters["part"] = 0
	t.parameters["parts"] = 0
	t.parameters["parent_id"] = 0
	return t
}
func (t *Transaction) Copy() *Transaction {
	copyTr := &Transaction{}
	copyTr.pipe = t.pipe
	copyTr.parameters = make(map[string]interface{})
	for key, value := range t.parameters {
		copyTr.parameters[key] = value
	}
	return copyTr
}
func (t *Transaction) SetID(id int) {
	t.SetParameter("id", id)
}
func (t *Transaction) GetID() int {
	return t.GetIntParameter("id")
}