- Introduced new API endpoints for rendering textures, avatars, capes, and previews, enhancing the texture handling capabilities. - Implemented corresponding service methods in the TextureHandler to process rendering requests and return appropriate responses. - Updated the TextureRenderService interface to include methods for rendering textures, avatars, and capes, along with their respective parameters. - Enhanced error handling for invalid texture IDs and added support for different rendering types and formats. - Updated go.mod to include the webp library for image processing.
32 lines
604 B
Go
32 lines
604 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// BaseModel 基础模型
|
|
// 包含 uint 类型的 ID 和标准时间字段,但时间字段不通过 JSON 返回给前端
|
|
type BaseModel struct {
|
|
// ID 主键
|
|
ID uint `gorm:"primarykey" json:"id"`
|
|
|
|
// CreatedAt 创建时间 (不返回给前端)
|
|
CreatedAt time.Time `gorm:"column:created_at" json:"-"`
|
|
|
|
// UpdatedAt 更新时间 (不返回给前端)
|
|
UpdatedAt time.Time `gorm:"column:updated_at" json:"-"`
|
|
|
|
// DeletedAt 删除时间 (软删除,不返回给前端)
|
|
DeletedAt gorm.DeletedAt `gorm:"index;column:deleted_at" json:"-"`
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|