mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-21 04:16:38 +00:00
Add verify middleware
This commit is contained in:
1
server/db/.gitignore
vendored
Normal file
1
server/db/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
names.json
|
||||
@@ -89,6 +89,16 @@ export const sessions = sqliteTable("session", {
|
||||
expiresAt: integer("expiresAt").notNull(),
|
||||
});
|
||||
|
||||
export const userOrgs = sqliteTable("userOrgs", {
|
||||
userId: text("userId")
|
||||
.notNull()
|
||||
.references(() => users.id),
|
||||
orgId: integer("orgId")
|
||||
.notNull()
|
||||
.references(() => orgs.orgId),
|
||||
role: text("role").notNull(), // e.g., 'admin', 'member', etc.
|
||||
});
|
||||
|
||||
// Define the model types for type inference
|
||||
export type Org = InferSelectModel<typeof orgs>;
|
||||
export type User = InferSelectModel<typeof users>;
|
||||
|
||||
Reference in New Issue
Block a user