package forms

import "strings"

type UserAccountBanListReq struct {
	ListReq
	ID     int64  `json:"id" form:"id"`
	OpenId string `json:"openId" form:"openId"`
	AccId  int64  `json:"accId" form:"accId"`
}

func (req *UserAccountBanListReq) Check() error {
	if req.AccId > 0 {
		req.ID = 0
		req.OpenId = ""
	}

	if req.OpenId != "" {
		req.ID = 0
	}

	req.OpenId = strings.ReplaceAll(req.OpenId, "@wx", "")
	return nil
}

type UserAccountBanListRes struct {
	ListRes
}
