package models

import (
	
	
)

// ServerKey Structure of the server keys
type ServerKey struct {
	ID        string `json:"id"`
	Type      string `json:"type"`
	Data      string `json:"data"`
	ServerID  string `json:"server_id"`
	UserID    string `json:"user_id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type KeyData struct {
	ClientUsername string `json:"clientUsername"`
	ClientPassword string `json:"clientPassword"`
	KeyPort        string `json:"key_port"`
}

func (ServerKey) () string {
	return "server_keys"
}

func ( KeyData) ( *User,  *Server) *Credentials {
	 := helpers.Env("APP_KEY", "") + .ID + .ID

	return &Credentials{
		Username: aes256.Decrypt(.ClientUsername, ),
		Key:      aes256.Decrypt(.ClientPassword, ),
		Port:     .KeyPort,
	}
}