This commit is contained in:
Owen Schwartz 2024-09-28 23:53:14 -04:00
commit 90c152adf5
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
9 changed files with 145 additions and 488 deletions

View file

@ -43,9 +43,10 @@ export const targets = sqliteTable("targets", {
targetId: integer("targetId").primaryKey({ autoIncrement: true }),
resourceId: text("resourceId").references(() => resources.resourceId, { onDelete: "cascade" }),
ip: text("ip").notNull(),
method: text("method"),
port: integer("port"),
method: text("method").notNull(),
port: integer("port").notNull(),
protocol: text("protocol"),
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
});
// Exit Nodes table
@ -71,4 +72,4 @@ export type Site = InferSelectModel<typeof sites>;
export type Resource = InferSelectModel<typeof resources>;
export type ExitNode = InferSelectModel<typeof exitNodes>;
export type Route = InferSelectModel<typeof routes>;
export type Target = InferSelectModel<typeof targets>;
export type Target = InferSelectModel<typeof targets>;