Updates
This commit is contained in:
+32
-2
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
ClientRuleProtocols,
|
||||
ClientRuleTypes,
|
||||
} from "@/src/dict/client-rules-dict";
|
||||
import { MediaParadigms, MediaTypes } from "@/src/dict/media-dict";
|
||||
import { UserTypes } from "@/src/dict/user-types-dict";
|
||||
import { Variables } from "@/src/dict/variables-dict";
|
||||
@@ -237,12 +241,38 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
|
||||
dataType: "INTEGER",
|
||||
},
|
||||
{
|
||||
fieldName: "client_id",
|
||||
fieldName: "host_id",
|
||||
dataType: "INTEGER",
|
||||
defaultValue: 0,
|
||||
},
|
||||
{
|
||||
fieldName: "rule",
|
||||
fieldName: "client_id",
|
||||
dataType: "INTEGER",
|
||||
foreignKey: {
|
||||
cascadeDelete: true,
|
||||
destinationTableName: "clients",
|
||||
destinationTableColumnName: "id",
|
||||
destinationTableColumnType: "INTEGER",
|
||||
foreignKeyName: "client_rules_client_fk",
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: "rule_type",
|
||||
dataType: "TEXT",
|
||||
options: ClientRuleTypes.map((rt) => rt.value),
|
||||
},
|
||||
{
|
||||
fieldName: "destination",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "ports",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "protocol",
|
||||
dataType: "TEXT",
|
||||
options: ClientRuleProtocols.map((p) => p.value),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
+5
-1
@@ -150,8 +150,12 @@ export type BUN_SQLITE_WGUI_CLIENT_RULES = {
|
||||
*/
|
||||
updated_at?: number | "";
|
||||
user_id?: number | "";
|
||||
host_id?: number | "";
|
||||
client_id?: number | "";
|
||||
rule?: string;
|
||||
rule_type?: "all" | "destination" | "";
|
||||
destination?: string;
|
||||
ports?: string;
|
||||
protocol?: "any" | "tcp" | "udp" | "";
|
||||
}
|
||||
|
||||
export type BUN_SQLITE_WGUI_VARIABLES = {
|
||||
|
||||
Reference in New Issue
Block a user