feat: cloud storage updates, claims storage, appointment and insurance routes

This commit is contained in:
Gitead
2026-04-27 00:29:11 -04:00
parent 3e899376c3
commit da7038e051
8 changed files with 138 additions and 95 deletions

View File

@@ -12,13 +12,28 @@ const prisma = new PrismaClient({ adapter } as any);
async function main() {
const hashedPassword = await bcrypt.hash("123456", 10);
await prisma.user.upsert({
const admin = await prisma.user.upsert({
where: { username: "admin" },
update: {},
create: { username: "admin", password: hashedPassword },
});
console.log("Seed complete: admin user created (username: admin, password: 123456)");
// Seed 5 default staff members — rename these to real staff names in Settings
const defaultStaff = ["A", "B", "C", "D", "E"];
for (const name of defaultStaff) {
const existing = await prisma.staff.findFirst({
where: { userId: admin.id, name },
});
if (!existing) {
await prisma.staff.create({
data: { userId: admin.id, name, role: "Staff" },
});
}
}
console.log("Seed complete: 5 default staff members created (A, B, C, D, E)");
}
main()

View File

@@ -50,6 +50,7 @@ export type ClaimFileMeta = {
id?: number;
filename: string;
mimeType?: string | null;
filePath?: string;
};
//used in claim-form