Files
ttstd-infinite-canvas/backend/internal/model/canvas.go
T
2026-09-21 13:01:45 +08:00

14 lines
459 B
Go

package model
import "time"
// Canvas 一张画布。节点与连线以 JSON 存储,前端直接使用 React Flow 的结构。
type Canvas struct {
ID string `gorm:"primaryKey;size:64" json:"id"`
Name string `gorm:"size:255;not null" json:"name"`
Nodes JSONList `gorm:"type:text" json:"nodes"`
Edges JSONList `gorm:"type:text" json:"edges"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}