优化结构
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user