// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"
)

const TableNameKeyResult = "key_results"

// KeyResult mapped from table <key_results>
type KeyResult struct {
	ID              int64             `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UID             string            `gorm:"column:uid;not null" json:"uid"`
	Topic           string            `gorm:"column:topic;not null" json:"topic"`
	ObjectiveID     int64             `gorm:"column:objective_id;not null" json:"objective_id"`
	Sequence        int32             `gorm:"column:sequence;not null" json:"sequence"`
	Title           string            `gorm:"column:title;not null" json:"title"`
	Memo            string            `gorm:"column:memo;not null" json:"memo"`
	InitialValue    int32             `gorm:"column:initial_value;not null" json:"initial_value"`
	TargetValue     int32             `gorm:"column:target_value;not null" json:"target_value"`
	CurrentValue    int32             `gorm:"column:current_value;not null" json:"current_value"`
	ValueMode       ValueModeType     `gorm:"column:value_mode;not null" json:"value_mode"`
	Tag             string            `gorm:"column:tag;not null" json:"tag"`
	CreatedAt       time.Time         `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt       time.Time         `gorm:"column:updated_at;not null" json:"updated_at"`
	KeyResultValues []*KeyResultValue `gorm:"foreignKey:key_result_id" json:"key_result_values"`
	Todos           []*Todo           `gorm:"foreignKey:key_result_id" json:"todos"`
}

// TableName KeyResult's table name
func (*KeyResult) TableName() string {
	return TableNameKeyResult
}
