52 lines
1.6 KiB
Go
52 lines
1.6 KiB
Go
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"`
|
|
}
|