Documentation ¶
Index ¶
- Variables
- type AnnouncementHandler
- func (h *AnnouncementHandler) DeleteAnnouncement(c *gin.Context)
- func (h *AnnouncementHandler) GetAnnouncement(c *gin.Context)
- func (h *AnnouncementHandler) ListAnnouncement(c *gin.Context)
- func (h *AnnouncementHandler) PostAnnouncement(c *gin.Context)
- func (h *AnnouncementHandler) PutAnnouncement(c *gin.Context)
- func (h *AnnouncementHandler) RegistRouter(rg *gin.RouterGroup)
Constants ¶
This section is empty.
Variables ¶
var ( SearchFields = []string{"Username", "Email"} FilterFields = []string{"Username"} PreloadFields = []string{"Tenants", "SystemRole"} OrderFields = []string{"Username", "ID"} ModelName = "User" PrimaryKeyName = "user_id" )
Functions ¶
This section is empty.
Types ¶
type AnnouncementHandler ¶
type AnnouncementHandler struct {
base.BaseHandler
}
func (*AnnouncementHandler) DeleteAnnouncement ¶
func (h *AnnouncementHandler) DeleteAnnouncement(c *gin.Context)
DeleteAnnouncement 删除公告 @Tags Announcement @Summary 删除公告 @Description 删除公告 @Accept json @Produce json @Param id path uint true "公告 id" @Success 200 {object} handlers.ResponseStruct{Data=string} "resp" @Router /v1/announcement/{id} [delete] @Security JWT
func (*AnnouncementHandler) GetAnnouncement ¶
func (h *AnnouncementHandler) GetAnnouncement(c *gin.Context)
GetAnnouncement 获取单个公告 @Tags Announcement @Summary 获取单个公告 @Description 获取单个公告 @Accept json @Produce json @Param id path uint true "公告 id" @Success 200 {object} handlers.ResponseStruct{Data=models.Announcement} "resp" @Router /v1/announcement/{id} [get] @Security JWT
func (*AnnouncementHandler) ListAnnouncement ¶
func (h *AnnouncementHandler) ListAnnouncement(c *gin.Context)
ListAnnouncement 公告列表 @Tags Announcement @Summary 公告列表 @Description 公告列表 @Accept json @Produce json @Param active query bool true "是否为活跃中的公告" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.Announcement}} "resp" @Router /v1/announcement [get] @Security JWT
func (*AnnouncementHandler) PostAnnouncement ¶
func (h *AnnouncementHandler) PostAnnouncement(c *gin.Context)
PostAnnouncement 发布公告 @Tags Announcement @Summary 发布公告 @Description 发布公告 @Accept json @Produce json @Param form body models.Announcement true "公告内容" @Success 200 {object} handlers.ResponseStruct{Data=string} "resp" @Router /v1/announcement [post] @Security JWT
func (*AnnouncementHandler) PutAnnouncement ¶
func (h *AnnouncementHandler) PutAnnouncement(c *gin.Context)
PutAnnouncement 更新公告 @Tags Announcement @Summary 更新公告 @Description 更新公告 @Accept json @Produce json @Param id path uint true "公告 id" @Param form body models.Announcement true "公告内容" @Success 200 {object} handlers.ResponseStruct{Data=string} "resp" @Router /v1/announcement/{id} [put] @Security JWT
func (*AnnouncementHandler) RegistRouter ¶
func (h *AnnouncementHandler) RegistRouter(rg *gin.RouterGroup)