mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-02 09:05:49 +02:00
Add verify middleware
This commit is contained in:
parent
e89ee4042a
commit
a8f944fc78
17 changed files with 1230 additions and 40 deletions
|
@ -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>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue