| 39 | // item1 - { quantity - color - price - productId - productName } |
| 40 | // item2 - { quantity - color - price - productId - productName } |
| 41 | private createBasketTable() : ITable { |
| 42 | const basketTable = new Table(this, 'basket', { |
| 43 | partitionKey: { |
| 44 | name: 'userName', |
| 45 | type: AttributeType.STRING, |
| 46 | }, |
| 47 | tableName: 'basket', |
| 48 | removalPolicy: RemovalPolicy.DESTROY, |
| 49 | billingMode: BillingMode.PAY_PER_REQUEST |
| 50 | }); |
| 51 | return basketTable; |
| 52 | } |
| 53 | |
| 54 | // Order DynamoDb Table Creation |
| 55 | // order : PK: userName - SK: orderDate -- totalPrice - firstName - lastName - email - address - paymentMethod - cardInfo |