opencode/internal/db/models.go

57 lines
1.8 KiB
Go
Raw Normal View History

2025-03-24 02:19:08 +08:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
2025-03-24 02:19:08 +08:00
package db
2025-03-28 05:35:48 +08:00
import (
"database/sql"
)
2025-04-13 17:29:20 +08:00
type File struct {
2025-05-14 02:08:43 +08:00
ID string `json:"id"`
SessionID string `json:"session_id"`
Path string `json:"path"`
Content string `json:"content"`
Version string `json:"version"`
IsNew sql.NullInt64 `json:"is_new"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
2025-04-13 17:29:20 +08:00
}
2025-05-10 02:37:13 +08:00
type Log struct {
ID string `json:"id"`
SessionID sql.NullString `json:"session_id"`
2025-05-14 02:08:43 +08:00
Timestamp string `json:"timestamp"`
2025-05-10 02:37:13 +08:00
Level string `json:"level"`
Message string `json:"message"`
Attributes sql.NullString `json:"attributes"`
2025-05-14 02:08:43 +08:00
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
2025-05-10 02:37:13 +08:00
}
2025-03-24 05:25:31 +08:00
type Message struct {
2025-04-12 08:01:45 +08:00
ID string `json:"id"`
SessionID string `json:"session_id"`
Role string `json:"role"`
Parts string `json:"parts"`
Model sql.NullString `json:"model"`
2025-05-14 02:08:43 +08:00
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
FinishedAt sql.NullString `json:"finished_at"`
2025-03-24 05:25:31 +08:00
}
2025-03-24 02:19:08 +08:00
type Session struct {
2025-03-28 05:35:48 +08:00
ID string `json:"id"`
ParentSessionID sql.NullString `json:"parent_session_id"`
Title string `json:"title"`
MessageCount int64 `json:"message_count"`
PromptTokens int64 `json:"prompt_tokens"`
CompletionTokens int64 `json:"completion_tokens"`
Cost float64 `json:"cost"`
Summary sql.NullString `json:"summary"`
2025-05-14 02:08:43 +08:00
SummarizedAt sql.NullString `json:"summarized_at"`
UpdatedAt string `json:"updated_at"`
CreatedAt string `json:"created_at"`
2025-03-24 02:19:08 +08:00
}