mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
add deviceWebAuthCodes table to pg schema
This commit is contained in:
@@ -764,6 +764,21 @@ export const requestAuditLog = pgTable(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const deviceWebAuthCodes = pgTable("deviceWebAuthCodes", {
|
||||||
|
codeId: serial("codeId").primaryKey(),
|
||||||
|
code: text("code").notNull().unique(),
|
||||||
|
ip: text("ip"),
|
||||||
|
city: text("city"),
|
||||||
|
deviceName: text("deviceName"),
|
||||||
|
applicationName: text("applicationName").notNull(),
|
||||||
|
expiresAt: bigint("expiresAt", { mode: "number" }).notNull(),
|
||||||
|
createdAt: bigint("createdAt", { mode: "number" }).notNull(),
|
||||||
|
verified: boolean("verified").notNull().default(false),
|
||||||
|
userId: varchar("userId").references(() => users.userId, {
|
||||||
|
onDelete: "cascade"
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
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>;
|
||||||
@@ -819,4 +834,5 @@ export type Blueprint = InferSelectModel<typeof blueprints>;
|
|||||||
export type LicenseKey = InferSelectModel<typeof licenseKey>;
|
export type LicenseKey = InferSelectModel<typeof licenseKey>;
|
||||||
export type SecurityKey = InferSelectModel<typeof securityKeys>;
|
export type SecurityKey = InferSelectModel<typeof securityKeys>;
|
||||||
export type WebauthnChallenge = InferSelectModel<typeof webauthnChallenge>;
|
export type WebauthnChallenge = InferSelectModel<typeof webauthnChallenge>;
|
||||||
|
export type DeviceWebAuthCode = InferSelectModel<typeof deviceWebAuthCodes>;
|
||||||
export type RequestAuditLog = InferSelectModel<typeof requestAuditLog>;
|
export type RequestAuditLog = InferSelectModel<typeof requestAuditLog>;
|
||||||
|
|||||||
Reference in New Issue
Block a user