Initial commit: img-infinite-canvas AI design workbench MVP
Moteva-style AI design workbench replica. Home prompt creates a project; the project page provides an infinite canvas with node drag, zoom/pan, a design chat panel, history replay, image asset upload, and project save/regenerate. - Backend: go-zero, DDD layering, sqlc/pgx, optional PostgreSQL; memory or Redis cache; asynq job queue; MinIO/S3/R2/OSS object storage; sky-valley/pi agent runtime adapter. - Frontend: Next.js App Router + Vite artifact build, TypeScript, i18n, shadcn/ui components, auth (OTP/Turnstile/Google/WeChat). - Deploy: Docker Compose and k3s manifests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.30.0
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
||||
type AgentMessage struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
Role string `json:"role"`
|
||||
MessageType string `json:"message_type"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
ThreadID string `json:"thread_id"`
|
||||
ActionID string `json:"action_id"`
|
||||
StepID string `json:"step_id"`
|
||||
ToolCallID string `json:"tool_call_id"`
|
||||
Name string `json:"name"`
|
||||
ToolHint string `json:"tool_hint"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
}
|
||||
|
||||
type CanvasConnection struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
FromNodeID string `json:"from_node_id"`
|
||||
ToNodeID string `json:"to_node_id"`
|
||||
}
|
||||
|
||||
type CanvasNode struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
NodeType string `json:"node_type"`
|
||||
Title string `json:"title"`
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Width float64 `json:"width"`
|
||||
Height float64 `json:"height"`
|
||||
Content string `json:"content"`
|
||||
Tone string `json:"tone"`
|
||||
Status string `json:"status"`
|
||||
SortOrder int32 `json:"sort_order"`
|
||||
ParentID string `json:"parent_id"`
|
||||
LayerRole string `json:"layer_role"`
|
||||
FontSize float64 `json:"font_size"`
|
||||
FontFamily string `json:"font_family"`
|
||||
FontWeight string `json:"font_weight"`
|
||||
Color string `json:"color"`
|
||||
TextAlign string `json:"text_align"`
|
||||
LineHeight float64 `json:"line_height"`
|
||||
LetterSpacing float64 `json:"letter_spacing"`
|
||||
TextDecoration string `json:"text_decoration"`
|
||||
TextTransform string `json:"text_transform"`
|
||||
Opacity float64 `json:"opacity"`
|
||||
FillColor string `json:"fill_color"`
|
||||
StrokeColor string `json:"stroke_color"`
|
||||
StrokeWidth float64 `json:"stroke_width"`
|
||||
StrokeStyle string `json:"stroke_style"`
|
||||
FlipX bool `json:"flip_x"`
|
||||
FlipY bool `json:"flip_y"`
|
||||
Rotation float64 `json:"rotation"`
|
||||
}
|
||||
|
||||
type CanvasSnapshot struct {
|
||||
ID string `json:"id"`
|
||||
ProjectID string `json:"project_id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
Version string `json:"version"`
|
||||
Canvas string `json:"canvas"`
|
||||
ViewportJson []byte `json:"viewport_json"`
|
||||
NodesJson []byte `json:"nodes_json"`
|
||||
ConnectionsJson []byte `json:"connections_json"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
}
|
||||
|
||||
type OutboxEvent struct {
|
||||
ID string `json:"id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
AggregateType string `json:"aggregate_type"`
|
||||
AggregateID string `json:"aggregate_id"`
|
||||
EventType string `json:"event_type"`
|
||||
ThreadID string `json:"thread_id"`
|
||||
PayloadJson []byte `json:"payload_json"`
|
||||
Status string `json:"status"`
|
||||
PublishedAt pgtype.Timestamptz `json:"published_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
ID string `json:"id"`
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
Title string `json:"title"`
|
||||
Brief string `json:"brief"`
|
||||
Status string `json:"status"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
Canvas string `json:"canvas"`
|
||||
Version string `json:"version"`
|
||||
SnapshotID string `json:"snapshot_id"`
|
||||
LastThreadID string `json:"last_thread_id"`
|
||||
ViewportX float64 `json:"viewport_x"`
|
||||
ViewportY float64 `json:"viewport_y"`
|
||||
ViewportK float64 `json:"viewport_k"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID pgtype.UUID `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user