INNER CODE UNIT · TypeScript

$

afteracademy/wimm-apis · .templates/feature.generator.ts:120

export class ${featureCaps} {
  readonly _id: Types.ObjectId;

  @Prop({ required: true })
  type: string;

  @Prop({
    type: mongoose.Schema.Types.ObjectId,
    ref: User.name,
    required: true,
  })
  user: User;

  @Prop({ default: true })
  status: boolean;
}

export const ${featureCaps}Schema = SchemaFactory.createForClass(${featureCaps});

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…