// Package dto add by blacknc <blacknc@163.com> at 2023/03/17 18:43:04
package dto

import "time"

type CreateAppClusterReq struct {
	OrgID         uint64   `json:"org_id"`
	ProjectID     uint64   `json:"project_id"`
	ClusterIDStrs []string `json:"cluster_ids" binding:"required"`
	DataappID     uint64   `json:"-"`
	CreatedBy     string   `json:"-"`
	SkipExists    bool     `json:"-"`
	ClusterIDs    []uint64 `json:"-"`
}

type DeleteAppClusterReq struct {
	ClusterID uint64
	DataappID uint64
	CreatedBy string
}

type ListAppClusterReq struct {
	DataappID  uint64
	ClusterID  uint64
	ClusterIDs []uint64
}

type ListAppClusterResp struct {
	BaseResp BaseResp         `json:"base_resp"`
	Data     []AppClusterInfo `json:"data"`
}

type ClusterLinkedAPPResp struct {
	BaseResp BaseResp       `json:"base_resp"`
	Data     []*DataAppInfo `json:"data"`
}

type AppClusterInfo struct {
	ID          uint64    `json:"-"`
	DataappID   uint64    `json:"dataapp_id"`
	ClusterID   uint64    `json:"cluster_id,string"`
	ClusterName string    `json:"cluster_name"`
	TierType    string    `json:"tier_type"`
	Cloud       string    `json:"cloud"`
	Region      string    `json:"region"`
	RegionCode  string    `json:"-"`
	CreatedAt   time.Time `json:"-"`
}

type GetPlaygroundAccountResp struct {
	Code             int       `json:"code"`
	Message          string    `json:"message"`
	Host             string    `json:"host"`
	Port             int       `json:"port"`
	Token            string    `json:"token"`
	ServerlessUser   string    `json:"serverless_user"`
	ServerlessPasswd string    `json:"serverless_passwd"`
	CreateAt         time.Time `json:"create_at"`
	ClusterId        uint64    `json:"cluster_id"`
	IsDedicate       bool      `json:"is_dedicate"`
}
