初始化

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

51
server/models/work.go Normal file
View File

@@ -0,0 +1,51 @@
package models
import (
"time"
)
// Work 作品模型
type Work struct {
ID string `json:"id"`
Title string `json:"title"`
Category string `json:"category"`
Year string `json:"year"`
HeroImg string `json:"heroImg"`
Description string `json:"desc"`
IsFeatured int `json:"isFeatured"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// WorkTechStack 作品技术栈模型
type WorkTechStack struct {
ID uint `json:"id"`
WorkID string `json:"workId"`
Category string `json:"category"`
Item string `json:"item"`
CreatedAt time.Time `json:"createdAt"`
}
// WorkGallery 作品图库模型
type WorkGallery struct {
ID uint `json:"id"`
WorkID string `json:"workId"`
ImageURL string `json:"imageUrl"`
SortOrder uint `json:"sortOrder"`
Description string `json:"description"`
CreatedAt time.Time `json:"createdAt"`
}
// WorkResponse 作品响应模型,包含关联数据
type WorkResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Category string `json:"category"`
Year string `json:"year"`
HeroImg string `json:"heroImg"`
Desc string `json:"desc"`
TechStack []map[string]interface{} `json:"techStack"`
Gallery []string `json:"gallery"`
Links map[string]interface{} `json:"links"`
Next string `json:"next"`
}