Exercise 2: Designing a Product Model — Possible Solution =========================================================== enum ProductStatus { DRAFT ACTIVE DISCONTINUED } model Product { id String @id @default(uuid()) name String sku String @unique price Decimal stock Int @default(0) description String? status ProductStatus @default(DRAFT) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("products") } Choice of type for the price: Decimal stores exact decimal numbers, so 19.99 is stored as exactly 19.99 and totals add up to the penny. Float would store an approximation, and rounding errors would creep into sums and comparisons. An acceptable alternative is an Int holding the price in pence (1999), which many payment systems use. (On PostgreSQL you might add @db.Decimal(10, 2) to fix the precision: up to 10 digits, 2 after the decimal point.) WHY THIS WORKS AS AN ANSWER ------------------------------ It uses a UUID ID, @unique, a numeric default, an optional field, an enum with a default, both timestamp attributes and @@map — and explains the money decision, which is the one that matters most in a real shop.