How to use the @tsed/mongoose.ObjectID function in @tsed/mongoose

To help you get started, we’ve selected a few @tsed/mongoose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / examples / mongoose / src / models / calendars / Calendar.ts View on Github external
import {Property, Required} from "@tsed/common";
import {Model, ObjectID} from "@tsed/mongoose";

@Model()
export class Calendar {
  @ObjectID("id")
  _id: string;

  @Required()
  name: string;

  @Property()
  owner: string;
}

@tsed/mongoose

Mongoose package for Ts.ED framework

MIT
Latest version published 2 days ago

Package Health Score

89 / 100
Full package analysis