package dto

type (
	// DBaaSRequest is the JSON request body for creating or updating a DBaaS service.
	DBaaSRequest struct {
		ID       string `json:"id"`
		Name     string `json:"name,omitempty"`
		Provider string `json:"provider"`
		APIKey   string `json:"apiKey,omitempty"`
	}

	// DBaaSResponse is the JSON response for DBaaS service endpoints.
	DBaaSResponse struct {
		ID       string `json:"id"`
		Name     string `json:"name,omitempty"`
		Provider string `json:"provider"`
		APIKey   string `json:"apiKey,omitempty"`
	}

	// DatabaseCreateRequest is the JSON body for creating a database instance.
	DatabaseCreateRequest struct {
		Name      string `json:"name,omitempty"`
		ServiceID string `json:"serviceId" binding:"required"`
		Vendor    string `json:"vendor" binding:"required"`
		Region    string `json:"region" binding:"required"`
	}

	// DatabaseUpdateRequest is the JSON body for updating database credentials.
	DatabaseUpdateRequest struct {
		Username *string `json:"username,omitempty"`
		Password *string `json:"password,omitempty"`
	}

	// DatabaseResponse is the JSON response for database instance endpoints.
	DatabaseResponse struct {
		ID        string  `json:"id"`
		Name      string  `json:"name,omitempty"`
		ServiceID string  `json:"serviceId"`
		Provider  string  `json:"provider"`
		Vendor    string  `json:"vendor"`
		Region    string  `json:"region"`
		Status    string  `json:"status"`
		Host      string  `json:"host,omitempty"`
		Port      int     `json:"port,omitempty"`
		DBName    string  `json:"dbName,omitempty"`
		Username  string  `json:"username,omitempty"`
		DSN       string  `json:"dsn,omitempty"`
		CreatedAt *string `json:"createdAt,omitempty"`
	}
)
