feat(schema): add is_super_user to staff table (GRO-201)

Add boolean is_super_user column (default false) to staff table.
Update Staff interface in shared types.
Mark first manager as super user in both seed modes.
Update test fixtures to include isSuperUser field.

Co-authored-by: groombook-ci[bot] <ci@groombook.bot>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit was merged in pull request #150.
This commit is contained in:
groombook-engineer[bot]
2026-03-28 20:39:46 +00:00
committed by GitHub
parent f1b85bf294
commit 3a31ad71c2
8 changed files with 101 additions and 8 deletions
+2
View File
@@ -159,6 +159,8 @@ export const staff = pgTable("staff", {
// Better-Auth user ID — links staff business record to auth identity
userId: text("user_id").references(() => user.id, { onDelete: "set null" }),
role: staffRoleEnum("role").notNull().default("groomer"),
// Super users bypass appointment-booking restrictions and access admin panels
isSuperUser: boolean("is_super_user").notNull().default(false),
active: boolean("active").notNull().default(true),
// Token for iCal calendar feed subscription (no auth required)
icalToken: text("ical_token").unique(),