package models type ContentReq struct { ID uint `json:"id" form:"id"` Subject string `json:"subject" form:"subject"` Content string `json:"content" form:"content"` Referer string `json:"referer" form:"referer"` CategoryID uint `json:"categoryId" form:"categoryId"` Status int `json:"status" form:"status"` Sorter int `json:"sorter" form:"sorter"` Cover string `json:"cover" form:"cover"` Promotes []int `json:"promotes" form:"promotes"` } type ContentsQueryFilters struct { IDs []uint `json:"ids" form:"ids"` CategoryID uint `json:"categoryId" form:"categoryId"` Status []uint `json:"status" form:"status"` Promotes []int `json:"promotes" form:"promotes"` } type ContentsQuery struct { Pagination Pagination `json:"pagination" form:"pagination"` Sorter Sorter `json:"sorter" form:"sorter"` Filters ContentsQueryFilters `json:"filters" form:"filters"` WithCategory bool `json:"withCategory" form:"withCategory"'` WithUser bool `json:"withUser" form:"withUser"'` } var OrderText = map[string]string{ "ascend": "ASC", "desend": "DESC", }