优化结构

This commit is contained in:
Yvan
2026-08-20 23:02:06 +08:00
parent 63dbb4cfbc
commit e65cf0b1d0
338 changed files with 622 additions and 481 deletions
-39
View File
@@ -1,39 +0,0 @@
package dto
import (
"encoding/json"
"time"
)
type AnnouncementRequest struct {
ID uint `json:"ID"`
Title string `json:"title"`
Content string `json:"content"`
UserID *int `json:"userID"`
Attachments json.RawMessage `json:"attachments"`
}
type AnnouncementSearchRequest struct {
Page int `form:"page"`
PageSize int `form:"pageSize"`
StartCreatedAt *time.Time `form:"startCreatedAt"`
EndCreatedAt *time.Time `form:"endCreatedAt"`
}
type AnnouncementResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
// Keep the soft-delete slot in the transport shape while omitting it from
// JSON responses.
DeletedAt any `json:"-"`
Title string `json:"title"`
Content string `json:"content"`
UserID *int `json:"userID"`
Attachments any `json:"attachments"`
}
type SelectOptionResponse struct {
Label string `json:"label"`
Value uint `json:"value"`
}