This repository was archived by the owner on Jun 19, 2023. It is now read-only.
Add a @ttl decorator #98
Open
Description
It would be super useful if we could take advantage of DynamoDB's TTL functionality with a @ttl
decorator:
class MyDomainClass {
@autoGeneratedHashKey()
id: string;
@rangeKey({defaultProvider: () => new Date()})
createdAt: Date;
@ttl({defaultProvider: () => moment().add(7, 'days').unix() })
expiresAt: number;
}