package v1

type AllowAndDenyIpRequest struct {
	Id     int    `json:"id" form:"id"`
	Ip     string `json:"ip" form:"ip" validate:"required,ip"`
	AllowOrDeny int `json:"allowOrDeny" form:"allowOrDeny" default:"0"`
	HostId int `json:"hostId" form:"hostId" validate:"required"`
	Uid    int `json:"uid" form:"uid" validate:"required"`
}

type DelAllowAndDenyIpRequest struct {
	HostId int `json:"hostId" form:"hostId" validate:"required"`
	Uid    int `json:"uid" form:"uid" validate:"required"`
	Ids []int `json:"ids" form:"ids" validate:"required,min=1,dive,required"`
}

type IpCountResult struct {
	Ip    string `bson:"ip"`   // MongoDB $group 的结果会放在 _id 字段
	Count int    `bson:"count"`
}