feat: added heartbeat and fixed up gateway page

This commit is contained in:
Sheen Capadngan
2025-09-02 21:51:29 +08:00
parent 879361fd7a
commit d5dcaf0d59
13 changed files with 269 additions and 66 deletions
@@ -120,6 +120,8 @@ export async function up(knex: Knex): Promise<void> {
t.foreign("proxyId").references("id").inTable(TableName.Proxy).onDelete("SET NULL");
t.string("name").notNullable().unique();
t.dateTime("heartbeat");
});
await createOnUpdateTrigger(knex, TableName.GatewayV2);
+2 -1
View File
@@ -14,7 +14,8 @@ export const GatewaysV2Schema = z.object({
orgId: z.string().uuid(),
identityId: z.string().uuid(),
proxyId: z.string().uuid().nullable().optional(),
name: z.string()
name: z.string(),
heartbeat: z.date().nullable().optional()
});
export type TGatewaysV2 = z.infer<typeof GatewaysV2Schema>;