|
1 | | -import { ProductDTO } from '../modules/products/dtos/product.dto'; |
| 1 | +import { OrderCreateManyInput, OrderItemCreateManyInput, ProductCreateInput, UserCreateManyInput } from '../generated/prisma/models'; |
2 | 2 |
|
3 | | -export const productsData: ProductDTO[] = [ |
| 3 | +export const productsData: ProductCreateInput[] = [ |
4 | 4 | { name: 'Classic T-Shirt', size: 'M', id: 'c1a9d6a2-1f3b-4a8e-9c2e-1b7f2d6a0a11', description: 'Soft cotton everyday t-shirt' }, |
5 | 5 | { name: 'Running Shoes', size: '42', id: 'd2b7f3c4-5a6d-4b9a-8e1c-2c8f3e7b1b22', description: 'Lightweight running shoes' }, |
6 | 6 | { name: 'Denim Jacket', size: 'L', id: 'e3c8a1b5-6d7e-4c2b-9f3a-3d9e4f8c2c33', description: 'Stylish blue denim jacket' }, |
@@ -57,3 +57,32 @@ export const productsData: ProductDTO[] = [ |
57 | 57 | { name: 'Slippers', size: '43', id: '48c3c5df-091a-4c67-52c7-157c32822931', description: 'Comfortable indoor slippers' }, |
58 | 58 | { name: 'Rain Jacket', size: 'XL', id: '59d4d6e0-1a2b-4d78-63d8-268d43933a42', description: 'Waterproof lightweight jacket' }, |
59 | 59 | ]; |
| 60 | + |
| 61 | +export const userData: UserCreateManyInput[] = [ |
| 62 | + { id: '9aaca58e-4ea2-4008-bfc7-2007cd91c0f1', email: 'test@test.example', name: 'Test', password: '123456' }, |
| 63 | +]; |
| 64 | + |
| 65 | +export const ordersData: OrderCreateManyInput[] = [ |
| 66 | + { id: '444e352e-acb2-46bd-a8d3-13f48379d4fe', userId: userData.find(user => user.email === 'test@test.example')!.id! }, |
| 67 | +]; |
| 68 | + |
| 69 | +export const ordersItemData: OrderItemCreateManyInput[] = [ |
| 70 | + { |
| 71 | + id: '8e4d87e8-8df6-45dc-9f0a-b379550abddf', |
| 72 | + orderId: ordersData[0].id!, |
| 73 | + name: 'Rain Jacket', |
| 74 | + size: 'XL', |
| 75 | + productId: '59d4d6e0-1a2b-4d78-63d8-268d43933a42', |
| 76 | + description: 'Waterprof lightweight jacket', |
| 77 | + quantity: 2, |
| 78 | + }, |
| 79 | + { |
| 80 | + id: 'c4745c57-7315-448f-adbf-c9979a8c8b6f', |
| 81 | + orderId: ordersData[0].id!, |
| 82 | + productId: '26a1a3bd-e7f8-4a45-30a5-f36a1061070f', |
| 83 | + name: 'Gloves', |
| 84 | + size: 'M', |
| 85 | + description: 'Winter insulated gloves', |
| 86 | + quantity: 2, |
| 87 | + }, |
| 88 | +]; |
0 commit comments