Apply .gitignore rules

This commit is contained in:
皮蛋13361098506
2025-01-06 16:21:36 +08:00
parent 1b77f62820
commit ccd2c530cf
580 changed files with 69806 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package model
// CommonResponse 公共请求结果对象
type CommonResponse struct {
// 错误码
Code ResultStatus `json:"code"`
// 错误提示信息
Message string `json:"message"`
// 服务器生成的请求Id
RequestId string `json:"requestId"`
}
// IsSuccess 请求结果是否成功
func (this *CommonResponse) IsSuccess() bool {
return this.Code == Success
}
// IsFailure 请求结果是否失败
func (this *CommonResponse) IsFailure() bool {
return this.Code != Success
}
// HasMessage 请求结果是否有信息
func (this *CommonResponse) HaveNoMessage() bool {
return this.Code == NoMessage
}