Files
nl-blogs/server/models/snippet.go
2026-01-15 13:51:44 +08:00

26 lines
595 B
Go

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"`
}