package helpers

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

type Result struct {
	Code int
	Msg string
	Data interface{}
}

func Return(ctx *gin.Context, code int, msg string, data interface{})  {
	ctx.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg": msg,
		"data":data,
	})
}