Skip to content

Instantly share code, notes, and snippets.

@shaykav
Last active March 26, 2021 03:58
Show Gist options
  • Save shaykav/4220708314bf81179f135c40df5424b0 to your computer and use it in GitHub Desktop.
Save shaykav/4220708314bf81179f135c40df5424b0 to your computer and use it in GitHub Desktop.
import { attribute, hashKey, table } from '@aws/dynamodb-data-mapper-annotations';
import { APIGatewayEventRequestContext } from 'aws-lambda';
@table('CONNECTION_TABLE')
export class Connection {
/* ConnectionId */
@hashKey()
id: string;
@attribute({defaultProvider: () => new Date()})
createdAt: Date;
@attribute()
requestContext: APIGatewayEventRequestContext;
@attribute()
payload: Record<string, string>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment