package store

import (
	"encoding/json"
	"time"
)

// WorkflowChannelStatus holds the workflow state columns from the channels table.
type WorkflowChannelStatus struct {
	WorkflowID      *string         `json:"workflow_id"`
	WorkflowVersion *int            `json:"workflow_version"`
	CurrentStage    int             `json:"current_stage"`
	StageData       json.RawMessage `json:"stage_data"`
	Status          string          `json:"status"`
	LastActivityAt  *string         `json:"last_activity_at"`
	StageEnteredAt  *string         `json:"stage_entered_at,omitempty"`
}

// WorkflowAssignment is a row from the workflow_assignments table.
type WorkflowAssignment struct {
	ID             string          `json:"id"`
	ChannelID      string          `json:"channel_id"`
	Stage          int             `json:"stage"`
	TeamID         string          `json:"team_id"`
	AssignedTo     *string         `json:"assigned_to"`
	Status         string          `json:"status"`
	ReviewComments json.RawMessage `json:"review_comments"`
	CreatedAt      time.Time       `json:"created_at"`
	ClaimedAt      *time.Time      `json:"claimed_at"`
	CompletedAt    *time.Time      `json:"completed_at"`
}
