// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.31.1

package gen

import (
	"database/sql"
	"time"

	"github.com/aoagents/agent-orchestrator/backend/internal/cdc"
	"github.com/aoagents/agent-orchestrator/backend/internal/domain"
)

type ChangeLog struct {
	Seq       int64
	ProjectID domain.ProjectID
	SessionID *domain.SessionID
	EventType cdc.EventType
	Payload   string
	CreatedAt time.Time
}

type Notification struct {
	ID        string
	SessionID domain.SessionID
	ProjectID domain.ProjectID
	PRURL     string
	Type      domain.NotificationType
	Title     string
	Body      string
	Status    domain.NotificationStatus
	CreatedAt time.Time
}

type PR struct {
	URL                      string
	SessionID                domain.SessionID
	Number                   int64
	PRState                  domain.PRState
	ReviewDecision           domain.ReviewDecision
	CIState                  domain.CIState
	Mergeability             domain.Mergeability
	UpdatedAt                time.Time
	Provider                 string
	Host                     string
	Repo                     string
	SourceBranch             string
	TargetBranch             string
	HeadSha                  string
	Title                    string
	Additions                int64
	Deletions                int64
	ChangedFiles             int64
	Author                   string
	BaseSha                  string
	MergeCommitSha           string
	IsDraft                  int64
	IsMerged                 int64
	IsClosed                 int64
	ProviderState            string
	ProviderMergeable        string
	ProviderMergeStateStatus string
	HtmlURL                  string
	CreatedAtProvider        sql.NullTime
	UpdatedAtProvider        sql.NullTime
	MergedAtProvider         sql.NullTime
	ClosedAtProvider         sql.NullTime
	MetadataHash             string
	CIHash                   string
	ReviewHash               string
	ObservedAt               sql.NullTime
	CIObservedAt             sql.NullTime
	ReviewObservedAt         sql.NullTime
	LastNudgeSignature       string
}

type PRCheck struct {
	PRURL      string
	Name       string
	CommitHash string
	Status     domain.PRCheckStatus
	URL        string
	LogTail    string
	CreatedAt  time.Time
	Conclusion string
	Details    string
}

type PRComment struct {
	PRURL     string
	CommentID string
	Author    string
	File      string
	Line      int64
	Body      string
	Resolved  bool
	CreatedAt time.Time
	ThreadID  string
	URL       string
	IsBot     int64
}

type PRReviewThread struct {
	PRURL        string
	ThreadID     string
	Path         string
	Line         int64
	Resolved     int64
	IsBot        int64
	SemanticHash string
	UpdatedAt    time.Time
}

type Project struct {
	ID            domain.ProjectID
	Path          string
	RepoOriginURL string
	DisplayName   string
	RegisteredAt  time.Time
	ArchivedAt    sql.NullTime
	Config        sql.NullString
	Kind          string
}

type Review struct {
	ID               string
	SessionID        domain.SessionID
	ProjectID        domain.ProjectID
	Harness          domain.ReviewerHarness
	PRURL            string
	ReviewerHandleID string
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type ReviewRun struct {
	ID        string
	ReviewID  string
	SessionID domain.SessionID
	Harness   domain.ReviewerHarness
	PRURL     string
	TargetSha string
	Status    domain.ReviewRunStatus
	Verdict   domain.ReviewVerdict
	Body      string
	CreatedAt time.Time
}

type Session struct {
	ID              domain.SessionID
	ProjectID       domain.ProjectID
	Num             int64
	IssueID         domain.IssueID
	Kind            domain.SessionKind
	Harness         domain.AgentHarness
	ActivityState   domain.ActivityState
	ActivityLastAt  time.Time
	IsTerminated    bool
	Branch          string
	WorkspacePath   string
	RuntimeHandleID string
	AgentSessionID  string
	Prompt          string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	DisplayName     string
	FirstSignalAt   sql.NullTime
}

type SessionWorktree struct {
	SessionID    domain.SessionID
	RepoName     string
	Branch       string
	BaseSha      string
	WorktreePath string
	PreservedRef string
	State        string
}

type TelemetryEvent struct {
	ID          string
	OccurredAt  time.Time
	Name        string
	Source      string
	Level       string
	ProjectID   sql.NullString
	SessionID   sql.NullString
	RequestID   string
	PayloadJson string
}

type WorkspaceRepo struct {
	ProjectID     domain.ProjectID
	Name          string
	RelativePath  string
	RepoOriginURL string
	RegisteredAt  time.Time
}
