<commit_before>package transition

import (
	"errors"
	"fmt"
	"strings"

	"github.com/jinzhu/gorm"
)

type Transition struct {
	State           string
	StateChangeLogs []StateChangeLog `sql:"-"`
}

func (transition *Transition) SetState(name string) {
	transition.State = name
}

func (transition Transition) GetState() string {
	return transition.State
}

type StateChangeLog struct {
	gorm.Model
	ReferTable string
	ReferId    string
	From       string
	To         string
	Note       string `sql:"size:1024"`
}

type Stater interface {
	SetState(name string)
	GetState() string
}

func New(value interface{}) *StateMachine {
	return &StateMachine{<commit_msg>Add audited.AuditedModel for StateChangeLog<commit_after>package transition

import (
	"errors"
	"fmt"
	"strings"

	"github.com/jinzhu/gorm"
	"github.com/qor/qor/audited"
)

type Transition struct {
	State           string
	StateChangeLogs []StateChangeLog `sql:"-"`
}

func (transition *Transition) SetState(name string) {
	transition.State = name
}

func (transition Transition) GetState() string {
	return transition.State
}

type StateChangeLog struct {
	gorm.Model
	ReferTable string
	ReferId    string
	From       string
	To         string
	Note       string `sql:"size:1024"`
	audited.AuditedModel
}

type Stater interface {
	SetState(name string)
	GetState() string
}

func New(value interface{}) *StateMachine {
	return &StateMachine{
{'fraction_non_alphanumeric': 0.09829059829059829, 'fraction_numerical': 0.005698005698005698, 'mean_word_length': 3.9471830985915495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3710381', 'n_tokens_mistral': 467, 'n_tokens_neox': 454, 'n_words': 118}