feat: cloud storage updates, claims storage, appointment and insurance routes
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -50,6 +50,7 @@ export type ClaimFileMeta = {
|
||||
id?: number;
|
||||
filename: string;
|
||||
mimeType?: string | null;
|
||||
filePath?: string;
|
||||
};
|
||||
|
||||
//used in claim-form
|
||||
|
||||
Reference in New Issue
Block a user