major updates to device and links management in admin
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import { integer, pgTable, serial, text, timestamp, varchar } from "drizzle-orm/pg-core";
|
||||
import {
|
||||
integer,
|
||||
pgTable,
|
||||
serial,
|
||||
text,
|
||||
timestamp,
|
||||
varchar,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { device } from "./device.schema";
|
||||
import { relations } from "drizzle-orm";
|
||||
|
||||
@@ -7,6 +14,8 @@ export const link = pgTable("link", {
|
||||
|
||||
token: text("token").notNull().unique(),
|
||||
status: varchar("status", { length: 16 }).notNull().default("active"), // "active" | "inactive" | "expired" | "revoked"
|
||||
appName: text("app_name").notNull(),
|
||||
appPackage: text("app_package").notNull(),
|
||||
|
||||
linkedDeviceId: integer("linked_device_id").references(() => device.id, {
|
||||
onDelete: "set null",
|
||||
|
||||
Reference in New Issue
Block a user