没时间,没做

This commit is contained in:
suguo.yao 2020-04-12 18:21:42 +08:00
parent d9aa3f813a
commit 660ed0a9cb
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"yyjishu.com/rubbish-class/rubbish"
)
//swagger:response
type Community struct {
gorm.Model
Name string `gorm:"type:varchar(20);"`

View File

@ -28,6 +28,12 @@ func CommunityListHandler(c *gin.Context) {
//CommunityCreateHandler 社区创建
func CommunityCreateHandler(c *gin.Context) {
// swagger:route POST /community/create community
//
// 社区创建
//
// Responses:
// 200: Community
var model community.Community
if err := c.ShouldBindJSON(&model); err != nil {
c.AbortWithStatusJSON(http.StatusBadRequest, nil)