blog_backend_api/controller/hardware.go

27 lines
541 B
Go
Raw Normal View History

2020-03-21 03:17:24 +00:00
package controller
import (
"github.com/gin-gonic/gin"
"time"
)
// this api is based on elasticsearch
type Hardware struct {
ID int32 `json:"id"`
BuyDate time.Time `json:"buy_date"` //购入时间
Name string `json:"name"` // 名字
Desc string `json:"desc"` // 描述
Pic string `json:"pic"` // 图片
Doc string `json:"doc"` //文档资料
}
func AddHardware(c *gin.Context) {
resp := RespBase{"unkown error",-231,nil}
defer func() {
c.JSON(200,resp)
}()
resp.Data = docTypes
resp.Msg = "OK"
resp.Status = 0
}