generator client { provider = "prisma-client-js" } datasource db { provider = "sqlite" url = env("DATABASE_URL") } model InstalledScript { id Int @id @default(autoincrement()) script_name String script_path String container_id String? server_id Int? execution_mode String installation_date DateTime? @default(now()) status String output_log String? web_ui_ip String? web_ui_port Int? server Server? @relation(fields: [server_id], references: [id], onDelete: SetNull) lxc_config LXCConfig? @@map("installed_scripts") } model Server { id Int @id @default(autoincrement()) name String @unique ip String user String password String? auth_type String? @default("password") ssh_key String? ssh_key_passphrase String? ssh_port Int? @default(22) color String? created_at DateTime? @default(now()) updated_at DateTime? @updatedAt ssh_key_path String? key_generated Boolean? @default(false) installed_scripts InstalledScript[] @@map("servers") } model LXCConfig { id Int @id @default(autoincrement()) installed_script_id Int @unique installed_script InstalledScript @relation(fields: [installed_script_id], references: [id], onDelete: Cascade) // Basic settings arch String? cores Int? memory Int? hostname String? swap Int? onboot Int? // 0 or 1 ostype String? unprivileged Int? // 0 or 1 // Network settings (net0) net_name String? net_bridge String? net_hwaddr String? net_ip_type String? // 'dhcp' or 'static' net_ip String? // IP with CIDR for static net_gateway String? net_type String? // usually 'veth' net_vlan Int? // Storage rootfs_storage String? rootfs_size String? // Features feature_keyctl Int? // 0 or 1 feature_nesting Int? // 0 or 1 feature_fuse Int? // 0 or 1 feature_mount String? // other mount features // Tags tags String? // Advanced/raw settings (lxc.* entries and other uncommon settings) advanced_config String? // Text blob for advanced settings // Metadata synced_at DateTime? config_hash String? // Hash of server config for diff detection created_at DateTime @default(now()) updated_at DateTime @updatedAt @@map("lxc_configs") }