| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package controllers
- import (
- "github.com/gin-gonic/gin"
- "github.com/xormplus/xorm"
- "git.qianqiusoft.com/qianqiusoft/light-apiengine/engine"
- )
- // SysAttachmentController operations for SysAttachment
- type SysAttachmentController struct {
- Ctx *gin.Context
- Db *xorm.Engine
- engine *engine.ApiEngine
- }
- func NewSysAttachmentController(c *gin.Context, e *engine.ApiEngine) *SysAttachmentController {
- controller := &SysAttachmentController{c,e.OrmEngine,e}
- return controller
- }
- // Upload
- // @Title Upload
- // @Description 上传文件
- // @Success 200 {object} models.Account
- // @Failure 403 :id is empty
- // @router /upload [post]
- func (c *SysAttachmentController) Upload() {
- //
- SysAttachment_Upload(c)
- }
- // Download
- // @Title Download
- // @Description 下载文件
- // @Param id string false "文件ID"
- // @Success 200 {object} models.Account
- // @Failure 403 :id is empty
- // @router /download [get]
- func (c *SysAttachmentController) Download() {
- //
- SysAttachment_Download(c)
- }
- // Delete
- // @Title Delete
- // @Description 删除文件
- // @Param id string false "文件ID"
- // @Success 200 {object} models.Account
- // @Failure 403 :id is empty
- // @router /delete [get]
- func (c *SysAttachmentController) Delete() {
- //
- SysAttachment_Delete(c)
- }
|