// 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 TableNameWorkflow = "workflow"

// Workflow mapped from table <workflow>
type Workflow 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"`
	Flag            string             `gorm:"column:flag;not null" json:"flag"`
	Name            string             `gorm:"column:name;not null" json:"name"`
	Describe        string             `gorm:"column:describe;not null" json:"describe"`
	SuccessfulCount int32              `gorm:"column:successful_count;not null" json:"successful_count"`
	FailedCount     int32              `gorm:"column:failed_count;not null" json:"failed_count"`
	RunningCount    int32              `gorm:"column:running_count;not null" json:"running_count"`
	CanceledCount   int32              `gorm:"column:canceled_count;not null" json:"canceled_count"`
	State           WorkflowState      `gorm:"column:state;not null" json:"state"`
	CreatedAt       time.Time          `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt       time.Time          `gorm:"column:updated_at;not null" json:"updated_at"`
	Dag             []*Dag             `gorm:"foreignKey:workflow_id" json:"dag"`
	Triggers        []*WorkflowTrigger `gorm:"foreignKey:workflow_id" json:"triggers"`
}

// TableName Workflow's table name
func (*Workflow) TableName() string {
	return TableNameWorkflow
}
