Untitled
unknown
plain_text
2 years ago
523 B
3
Indexable
// src/platform/platform.model.ts import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; export type PlatformDocument = Platform & Document; @Schema() export class Platform { @Prop({ required: true }) name: string; @Prop() image: string; @Prop({ enum: ['web', 'android', 'apple', 'desktop'], required: true }) type: string; @Prop({ type: Date, default: Date.now }) timestamp: Date; } export const PlatformSchema = SchemaFactory.createForClass(Platform);
Editor is loading...