base.go 308 B

1234567891011121314151617181920
  1. package models
  2. type BaseResponse struct {
  3. Ret int
  4. Msg string
  5. ErrMsg string
  6. ErrCode string
  7. Data interface{}
  8. }
  9. func (r *BaseResponse) Init() *BaseResponse {
  10. return &BaseResponse{Ret: 403}
  11. }
  12. type BaseRequest struct {
  13. }
  14. func (br *BaseRequest) Init() *BaseRequest {
  15. return &BaseRequest{}
  16. }