diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ab75f3c..00c9328 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -232,6 +232,7 @@ model Product { description String? price Decimal @db.Decimal(12, 2) quantity Int @default(0) + type ProductType @default(PRODUCT) categoryId String? brand String? color String? @@ -438,6 +439,11 @@ enum WildberriesSupplyStatus { CANCELLED } +enum ProductType { + PRODUCT + CONSUMABLE +} + model Logistics { id String @id @default(cuid()) fromLocation String diff --git a/src/components/warehouse/product-card.tsx b/src/components/warehouse/product-card.tsx index f27d5a4..0a1b23d 100644 --- a/src/components/warehouse/product-card.tsx +++ b/src/components/warehouse/product-card.tsx @@ -18,6 +18,7 @@ interface Product { description: string price: number quantity: number + type: 'PRODUCT' | 'CONSUMABLE' category: { id: string; name: string } | null brand: string color: string @@ -180,13 +181,26 @@ export function ProductCard({ product, onEdit, onDeleted }: ProductCardProps) { {/* Дополнительная информация */}