package v1

type GameShieldSubmitRequest struct {
	HostId  int    `json:"host_id" form:"host_id" binding:"required"`
	Domain  string `json:"domain" form:"domain"`
	AppName string `json:"app_name" form:"app_name" binding:"required"`
	RuleId  int    `json:"rule_id" form:"rule_id"`
	Id      int    `json:"id" form:"id"`
	Uid     int    `json:"uid" form:"uid"`
	Comment string `json:"comment" form:"comment"`
}

type BackendItem struct {
	Protocol        string `json:"protocol" form:"protocol"`
	Host            string `json:"host" form:"host"`
	ProxyAddr       string `json:"proxy_addr" form:"proxy_addr"`
	SdkPort         int    `json:"sdk_port" form:"sdk_port"`
	SourceMachineIP string `json:"source_machineIP" form:"source_machineIP"`
	ConnectPort     int    `json:"connect_port" form:"connect_port"`
}

type GameShieldSubmitResponse struct {
	RoleId int `json:"role_id"`
}

type GetGameShieldRuleIdRequest struct {
	AppName string `json:"app_name" form:"app_name"`
	Name    string `json:"name" form:"name"`
	HostId  int    `json:"host_id" form:"host_id"`
}

type GetGameShieldRequiredResponse struct {
	ExpiredAt string
	Backend   string
	Cookie    string
	RuleId    int
	DunName   string
}

type KeyAndFieldResponse struct {
	Key     string `json:"key" form:"key"`
	FieldId int
}

type GameShieldRuleIdRequest struct {
	RuleId int `json:"rule_id" form:"rule_id" binding:"required"`
}

type SDKInfo struct {
	RuleID     string `json:"rule_id"`               // 规则ID
	ClientIP   string `json:"client_ip"`             // 客户端IP
	GatewayIP  string `json:"gateway_ip,omitempty"`  // 网关IP
	SDKUUID    string `json:"sdk_uuid"`              // SDK-UUID
	SessionID  string `json:"session_id"`            // 会话ID
	SDKType    string `json:"sdk_type"`              // SDK类型
	SDKVersion string `json:"sdk_version,omitempty"` // SDK版本
	System     string `json:"system"`                // 系统
	ExtraInfo  string `json:"extra_info"`            // 附加信息
}
