package libs

type ErrorInfo struct {
	Code int
	Data any
	Msg  string
}

var ErrorCode = map[string]*ErrorInfo{
	"LoginFailed":                {Code: 0, Data: "", Msg: "账号异常"},
	"LoginSuccessful":            {Code: 200, Data: "", Msg: "登录成功"},
	"NetworkTimeout":             {Code: 1, Data: "", Msg: "网络超时"},
	"AccountHasBeenTakenOffline": {Code: 2, Data: "", Msg: "账号已下线，请重新登录"},
	"OtherError":                 {Code: 3, Data: "", Msg: "其他错误"},
	"ChangeSuccessful":           {Code: 200, Data: "", Msg: "修改成功"},
	"ChangeFailed":               {Code: 0, Data: "", Msg: "修改失败"},
	"SendPostSuccessful":         {Code: 200, Data: "", Msg: "发推成功"},
	"SendPostFailed":             {Code: 200, Data: "", Msg: "发推失败"},
	"SimulationSuccessful":       {Code: 200, Data: "", Msg: "模拟成功"},
	"FollowSuccessful":           {Code: 200, Data: "", Msg: "关注成功"},
	"FollowFailed":               {Code: 200, Data: "", Msg: "关注失败"},
	"CommentSuccessful":          {Code: 200, Data: "", Msg: "评论成功"},
	"CommentFailed":              {Code: 200, Data: "", Msg: "评论失败"},
	"ParamsError":                {Code: 4, Data: "", Msg: "参数错误"},
	"SearchSuccessful":           {Code: 200, Data: "", Msg: "搜索成功"},
	"SearchFailed":               {Code: 200, Data: "", Msg: "搜索失败"},
	"ChangeLangSuccessful":       {Code: 200, Data: "", Msg: "修改语言成功"},
	"ChangeLangFailed":           {Code: 0, Data: "", Msg: "修改语言失败"},
	"MaintainAccountSuccessful":  {Code: 200, Data: "", Msg: "养号运行成功"},
	"MaintainAccountFailed":      {Code: 0, Data: "", Msg: "养号运行失败"},
	"RegisterFailed":             {Code: 0, Data: "", Msg: "注册失败"},
	"RegisterSuccessful":         {Code: 0, Data: "", Msg: "注册成功"},
	"BrowserCreationFailed":      {Code: 0, Data: "", Msg: "浏览器创建失败"},
	"MailboxUnavailable":         {Code: 0, Data: "", Msg: "邮箱不可用"},
	"AccountLocked":              {Code: 0, Data: "", Msg: "账号锁定"},
	"UnlockedSuccessfully":       {Code: 200, Data: "", Msg: "解锁成功"},
	"UnlockedFailed":             {Code: 0, Data: "", Msg: "解锁失败"},
	"ViewSuccessful":             {Code: 200, Data: "", Msg: "查看成功"},
	"NoPostsToView":              {Code: 0, Data: "", Msg: "没有可查看的推文"},
}
