package models type BaseResponse struct { Ret int Msg string ErrMsg string ErrCode string Data interface{} Success bool `description:"true 执行成功,false 执行失败"` IsSendEmail bool `description:"true 发送邮件,false 不发送邮件"` } type BaseResponseRef struct { Ret int Msg string ErrMsg string ErrCode string Data string } type BaseResponseResult struct { Ret int `description:"状态:200 成功,408 重新登录,403:为失败"` Msg string `description:"提示信息,对用户展示"` ErrMsg string `description:"错误信息,供开发定位问题"` ErrCode string `description:"错误编码,预留"` Data string `description:"返回数据,json格式字符串"` } func (r *BaseResponse) Init() *BaseResponse { return &BaseResponse{Ret: 403,IsSendEmail: true} } type BaseRequest struct { } func (br *BaseRequest) Init() *BaseRequest { return &BaseRequest{} }