package gen import ( "git.qianqiusoft.com/qianqiusoft/light-apiengine/controllers/partial" "git.qianqiusoft.com/qianqiusoft/light-apiengine/entitys" "github.com/gin-gonic/gin" "github.com/xormplus/xorm" ) // SysAttachmentController operations for SysAttachment type SysAttachmentController struct { Db *xorm.Engine } func NewSysAttachmentController(db *xorm.Engine) *SysAttachmentController { controller := &SysAttachmentController{db} return controller } // Upload // @Title Upload // @Description 上传文件 // @Success 200 {object} models.Account // @Failure 403 :id is empty // @router /upload [post] func (c *SysAttachmentController) Upload(ctx *gin.Context) { // partial.SysAttachment_Upload(&entitys.CtrlContext{ctx, c.Db}) } // 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(ctx *gin.Context) { // partial.SysAttachment_Download(&entitys.CtrlContext{ctx, c.Db}) } // 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(ctx *gin.Context) { // partial.SysAttachment_Delete(&entitys.CtrlContext{ctx, c.Db}) }