feat: implement scenario-driven sales SOP platform

This commit is contained in:
Eric 1549169735@qq.com
2026-08-06 21:37:29 +08:00
parent 254469ab89
commit de5345607a
84 changed files with 7132 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
package response
import "github.com/gin-gonic/gin"
type Envelope struct {
Code string `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
func OK(c *gin.Context, data interface{}) {
c.JSON(200, Envelope{Code: "OK", Message: "success", Data: data})
}
func Created(c *gin.Context, data interface{}) {
c.JSON(201, Envelope{Code: "CREATED", Message: "created", Data: data})
}
func Error(c *gin.Context, status int, code, message string) {
c.AbortWithStatusJSON(status, Envelope{Code: code, Message: message})
}