浏览代码

Add table

Owen 5 月之前
父节点
当前提交
befdc3a002
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      server/db/schema.ts

+ 10 - 0
server/db/schema.ts

@@ -371,6 +371,16 @@ export const versionMigrations = sqliteTable("versionMigrations", {
     executedAt: integer("executedAt").notNull()
     executedAt: integer("executedAt").notNull()
 });
 });
 
 
+export const badgerRules = sqliteTable("badgerRules", {
+    ruleId: integer("ruleId").primaryKey({ autoIncrement: true }),
+    resourceId: integer("resourceId")
+        .notNull()
+        .references(() => resources.resourceId, { onDelete: "cascade" }),
+    action: text("action").notNull(), // ACCEPT, DROP
+    match: text("match").notNull(), // CIDR, PATH
+    value: text("value").notNull()
+});
+
 export type Org = InferSelectModel<typeof orgs>;
 export type Org = InferSelectModel<typeof orgs>;
 export type User = InferSelectModel<typeof users>;
 export type User = InferSelectModel<typeof users>;
 export type Site = InferSelectModel<typeof sites>;
 export type Site = InferSelectModel<typeof sites>;