Expires
@tsed/mongoose
Usage
typescript
import { Expires } from "@tsed/mongoose";
Overview
ts
function Expires(expires: number | string | Date): PropertyDecorator;
Description
Defines a TTL index on this path. Only allowed for dates.
Example
typescript
@Model()
export class EventModel {
@Expires('5d')
field: string;
}