Indexed
@tsed/mongoose
Usage
typescript
import { Indexed } from "@tsed/mongoose";
Overview
ts
function Indexed(index?: IndexOptions | boolean | string): PropertyDecorator;
Description
Tell Mongoose whether to define an index for the property.
Example
typescript
@Model()
export class EventModel {
@Indexed()
field: string;
}