| | |
| | |
| | |
| |
|
| | package db |
| |
|
| | import ( |
| | "database/sql" |
| | ) |
| |
|
| | type File struct { |
| | ID string `json:"id"` |
| | SessionID string `json:"session_id"` |
| | Path string `json:"path"` |
| | Content string `json:"content"` |
| | Version int64 `json:"version"` |
| | CreatedAt int64 `json:"created_at"` |
| | UpdatedAt int64 `json:"updated_at"` |
| | } |
| |
|
| | type Message struct { |
| | ID string `json:"id"` |
| | SessionID string `json:"session_id"` |
| | Role string `json:"role"` |
| | Parts string `json:"parts"` |
| | Model sql.NullString `json:"model"` |
| | CreatedAt int64 `json:"created_at"` |
| | UpdatedAt int64 `json:"updated_at"` |
| | FinishedAt sql.NullInt64 `json:"finished_at"` |
| | Provider sql.NullString `json:"provider"` |
| | } |
| |
|
| | type Session struct { |
| | 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"` |
| | UpdatedAt int64 `json:"updated_at"` |
| | CreatedAt int64 `json:"created_at"` |
| | SummaryMessageID sql.NullString `json:"summary_message_id"` |
| | } |
| |
|