From 229bc1fdcaf25908a65c307517d912576040fdd9 Mon Sep 17 00:00:00 2001 From: Artur Oliveira Date: Tue, 16 Dec 2025 11:48:32 -0300 Subject: [PATCH] feat(types): adicionar enums do backend no frontend - Cria `types/enums.ts` com `DatabaseType`, `Applications` e `ServersType` - Atualiza `types/Server.ts` para usar os novos tipos, substituindo `string` por tipos enumerados --- frontend/src/types/Server.ts | 14 ++++++++++++++ frontend/src/types/enums.ts | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 frontend/src/types/Server.ts create mode 100644 frontend/src/types/enums.ts diff --git a/frontend/src/types/Server.ts b/frontend/src/types/Server.ts new file mode 100644 index 0000000..41fa883 --- /dev/null +++ b/frontend/src/types/Server.ts @@ -0,0 +1,14 @@ +import { Applications, DatabaseType, ServersType } from "./enums"; + +export interface Server { + id: string; + name: string; + ip: string; + port: number; + user: string; + type: ServersType; + application: Applications; + dbType: DatabaseType; + createdAt: string; + updatedAt: string; +} \ No newline at end of file diff --git a/frontend/src/types/enums.ts b/frontend/src/types/enums.ts new file mode 100644 index 0000000..5760ce0 --- /dev/null +++ b/frontend/src/types/enums.ts @@ -0,0 +1,18 @@ +export type DatabaseType = + | 'MYSQL' + | 'POSTGRESQL' + | 'SQLSERVER' + | 'ORACLE' + | 'REDIS' + | 'MONGODB' + | 'MARIADB' + | 'NONE'; + +export type Applications = + | 'ASTERISK' + | 'HITMANAGER' + | 'HITMANAGER_V2' + | 'OMNIHIT' + | 'HITPHONE'; + +export type ServersType = 'PRODUCTION' | 'HOMOLOGATION' | 'DATABASE';