package dto

type SettingInfo struct {
	DockerSockPath string `json:"dockerSockPath"`
	SystemVersion  string `json:"systemVersion"`
	SystemIP       string `json:"systemIP"`

	LocalTime string `json:"localTime"`
	TimeZone  string `json:"timeZone"`
	NtpSite   string `json:"ntpSite"`

	DefaultNetwork string `json:"defaultNetwork"`
	DefaultIO      string `json:"defaultIO"`
	LastCleanTime  string `json:"lastCleanTime"`
	LastCleanSize  string `json:"lastCleanSize"`
	LastCleanData  string `json:"lastCleanData"`

	MonitorStatus    string `json:"monitorStatus"`
	MonitorInterval  string `json:"monitorInterval"`
	MonitorStoreDays string `json:"monitorStoreDays"`

	AppStoreVersion      string `json:"appStoreVersion"`
	AppStoreLastModified string `json:"appStoreLastModified"`
	AppStoreSyncStatus   string `json:"appStoreSyncStatus"`

	FileRecycleBin   string `json:"fileRecycleBin"`
	LocalSSHConnShow string `json:"localSSHConnShow"`

	FirewallPortWhiteList string `json:"firewallPortWhiteList"`
}

type SettingUpdate struct {
	Key   string `json:"key" validate:"required"`
	Value string `json:"value"`
}

type AgentSettingUpdate struct {
	Key   string `json:"key" validate:"required,oneof=SystemIP DockerSockPath FileRecycleBin FirewallPortWhiteList"`
	Value string `json:"value"`
}

type SyncTime struct {
	NtpSite string `json:"ntpSite" validate:"required"`
}

type CleanData struct {
	SystemClean    []CleanTree `json:"systemClean"`
	BackupClean    []CleanTree `json:"backupClean"`
	UploadClean    []CleanTree `json:"uploadClean"`
	DownloadClean  []CleanTree `json:"downloadClean"`
	SystemLogClean []CleanTree `json:"systemLogClean"`
	ContainerClean []CleanTree `json:"containerClean"`
}

type CleanTree struct {
	ID       string      `json:"id"`
	Label    string      `json:"label"`
	Children []CleanTree `json:"children"`

	Type string `json:"type"`
	Name string `json:"name"`

	Size        uint64 `json:"size"`
	IsCheck     bool   `json:"isCheck"`
	IsRecommend bool   `json:"isRecommend"`
	CanDelete   bool   `json:"canDelete"`
}

type Clean struct {
	TreeType string `json:"treeType"`
	Name     string `json:"name"`
	Size     uint64 `json:"size"`
}

type SSHDefaultConn struct {
	WithReset   bool   `json:"withReset"`
	DefaultConn string `json:"defaultConn"`
}
type SSHConnData struct {
	Addr       string `json:"addr" validate:"required"`
	Port       uint   `json:"port" validate:"required,number,max=65535,min=1"`
	User       string `json:"user" validate:"required"`
	AuthMode   string `json:"authMode" validate:"oneof=password key"`
	Password   string `json:"password"`
	PrivateKey string `json:"privateKey"`
	PassPhrase string `json:"passPhrase"`

	LocalSSHConnShow string `json:"localSSHConnShow"`
}

type SystemProxy struct {
	Type     string `json:"type"`
	URL      string `json:"url"`
	Port     string `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type TerminalAIInfo struct {
	AIStatus              string `json:"aiStatus"`
	AIAccountID           string `json:"aiAccountId"`
	AIPrefix              string `json:"aiPrefix" validate:"required,oneof=@ai #ai /ai"`
	AIRiskCommands        string `json:"aiRiskCommands"`
	AIRiskCommandsDefault string `json:"aiRiskCommandsDefault"`
}

type FileManageAIInfo struct {
	AIStatus    string `json:"aiStatus"`
	AIAccountID string `json:"aiAccountId"`
}

type CommonDescription struct {
	ID          string `json:"id" validate:"required"`
	Type        string `json:"type" validate:"required"`
	DetailType  string `json:"detailType"`
	IsPinned    bool   `json:"isPinned"`
	Description string `json:"description"`
}
