jamlen
12/07/2021, 4:15 PMsst.Table
? This is what I'm trying but it errors with Type '{ ticketId: TableFieldType.STRING; ticketType: TableFieldType.STRING; startDate: TableFieldType.STRING; endDate: TableFieldType.STRING; cost: TableFieldType.NUMBER; }[]' is not assignable to type 'TableFieldType'
this.tables.cards = new sst.Table(this, "Cards", {
fields: {
accountId: sst.TableFieldType.STRING,
cardId: sst.TableFieldType.STRING,
tickets: [{
ticketId: sst.TableFieldType.STRING,
ticketType: sst.TableFieldType.STRING,
startDate: sst.TableFieldType.STRING,
endDate: sst.TableFieldType.STRING,
cost: sst.TableFieldType.NUMBER,
}]
},
primaryIndex: { partitionKey: "accountId", sortKey: "cardId" },
})
Garret Harp
12/07/2021, 4:17 PMjamlen
12/07/2021, 4:19 PM