初始化

This commit is contained in:
李琦
2026-01-15 13:51:44 +08:00
commit b7b6d3e39e
156 changed files with 38913 additions and 0 deletions

25
server/models/snippet.go Normal file
View File

@@ -0,0 +1,25 @@
package models
import (
"time"
)
// Snippet 代码片段模型
type Snippet struct {
ID string `json:"id"`
Title string `json:"title"`
Code string `json:"code"`
Type string `json:"type"`
Description string `json:"description"`
ViewCount uint `json:"viewCount"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// SnippetResponse 代码片段响应模型
type SnippetResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Code string `json:"code"`
Type string `json:"type"`
}