mirror of
https://github.com/fosrl/pangolin.git
synced 2025-06-26 15:18:45 +02:00
Merge branch 'main' of https://github.com/fosrl/pangolin
This commit is contained in:
commit
33990da68c
16 changed files with 215 additions and 24 deletions
|
@ -81,6 +81,7 @@ export const users = sqliteTable("user", {
|
|||
emailVerified: integer("emailVerified", { mode: "boolean" })
|
||||
.notNull()
|
||||
.default(false),
|
||||
dateCreated: text("dateCreated").notNull(),
|
||||
});
|
||||
|
||||
export const twoFactorBackupCodes = sqliteTable("twoFactorBackupCodes", {
|
||||
|
@ -107,7 +108,9 @@ export const userOrgs = sqliteTable("userOrgs", {
|
|||
orgId: integer("orgId")
|
||||
.notNull()
|
||||
.references(() => orgs.orgId),
|
||||
roleId: integer("roleId").notNull().references(() => roles.roleId),
|
||||
roleId: integer("roleId")
|
||||
.notNull()
|
||||
.references(() => roles.roleId),
|
||||
});
|
||||
|
||||
export const emailVerificationCodes = sqliteTable("emailVerificationCodes", {
|
||||
|
@ -205,7 +208,9 @@ export const userResources = sqliteTable("userResources", {
|
|||
|
||||
export const limitsTable = sqliteTable("limits", {
|
||||
limitId: integer("limitId").primaryKey({ autoIncrement: true }),
|
||||
orgId: integer("orgId").references(() => orgs.orgId, { onDelete: "cascade" }),
|
||||
orgId: integer("orgId").references(() => orgs.orgId, {
|
||||
onDelete: "cascade",
|
||||
}),
|
||||
name: text("name").notNull(),
|
||||
value: integer("value").notNull(),
|
||||
description: text("description"),
|
||||
|
@ -233,4 +238,4 @@ export type RoleSite = InferSelectModel<typeof roleSites>;
|
|||
export type UserSite = InferSelectModel<typeof userSites>;
|
||||
export type RoleResource = InferSelectModel<typeof roleResources>;
|
||||
export type UserResource = InferSelectModel<typeof userResources>;
|
||||
export type Limit = InferSelectModel<typeof limitsTable>;
|
||||
export type Limit = InferSelectModel<typeof limitsTable>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue