making strides in the device and link domain setup

This commit is contained in:
user
2026-03-27 23:58:06 +02:00
parent 8c45efc92e
commit c7c303a934
17 changed files with 1202 additions and 198 deletions

View File

@@ -0,0 +1,25 @@
import {
boolean,
pgTable,
serial,
text,
timestamp,
varchar,
} from "drizzle-orm/pg-core";
export const device = pgTable("device", {
id: serial("id").primaryKey(),
title: text("title").notNull(),
version: text("version").notNull(), // Docker image / Android version tag
status: varchar("status", { length: 16 }).notNull().default("offline"), // "online" | "offline" | "busy" | "error"
isActive: boolean("is_active").notNull().default(false),
containerId: text("container_id"), // Docker container ID on the VPS
host: text("host").notNull(), // VPS hostname or IP
wsPort: text("ws_port"), // ws-scrcpy WebSocket port
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
});