feat(commissions): add customer records and kanban workflow baseline

This commit is contained in:
2026-02-12 20:01:49 +01:00
parent f65a9ea03f
commit 994b33e081
10 changed files with 755 additions and 18 deletions

View File

@@ -158,6 +158,54 @@ async function main() {
},
})
}
const existingCustomer = await db.customer.findFirst({
where: {
email: "collector@example.com",
},
select: {
id: true,
},
})
const seededCustomer = existingCustomer
? await db.customer.update({
where: {
id: existingCustomer.id,
},
data: {
name: "Collector One",
phone: "+1-555-0101",
isRecurring: true,
notes: "Interested in recurring portrait commissions.",
},
})
: await db.customer.create({
data: {
name: "Collector One",
email: "collector@example.com",
phone: "+1-555-0101",
isRecurring: true,
notes: "Interested in recurring portrait commissions.",
},
})
await db.commission.upsert({
where: {
id: "11111111-1111-1111-1111-111111111111",
},
update: {},
create: {
id: "11111111-1111-1111-1111-111111111111",
title: "Portrait Commission Baseline",
description: "Initial seeded commission request for MVP1 board validation.",
status: "new",
customerId: seededCustomer.id,
budgetMin: 400,
budgetMax: 900,
dueAt: new Date(Date.now() + 14 * 24 * 60 * 60 * 1000),
},
})
}
main()