优化结构

This commit is contained in:
Yvan
2026-08-21 08:54:29 +08:00
parent c968f9f24e
commit 77e192b6c0
167 changed files with 3657 additions and 1528 deletions
@@ -0,0 +1,39 @@
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"`
}