| 22 | // Product DynamoDb Table Creation |
| 23 | // product : PK: id -- name - description - imageFile - price - category |
| 24 | private createProductTable() : ITable { |
| 25 | const productTable = new Table(this, 'product', { |
| 26 | partitionKey: { |
| 27 | name: 'id', |
| 28 | type: AttributeType.STRING |
| 29 | }, |
| 30 | tableName: 'product', |
| 31 | removalPolicy: RemovalPolicy.DESTROY, |
| 32 | billingMode: BillingMode.PAY_PER_REQUEST |
| 33 | }); |
| 34 | return productTable; |
| 35 | } |
| 36 | |
| 37 | // Basket DynamoDb Table Creation |
| 38 | // basket : PK: userName -- items (SET-MAP object) |