| 1 | import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; |
| 2 | import { WorkData } from './workData.schema'; |
| 3 | |
| 4 | @Schema({ |
| 5 | collection: 'video', |
| 6 | versionKey: false, |
| 7 | toJSON: { virtuals: true }, |
| 8 | toObject: { virtuals: true }, |
| 9 | timestamps: false, |
| 10 | }) |
| 11 | export class Video extends WorkData { |
| 12 | @Prop({ |
| 13 | required: true, |
| 14 | }) |
| 15 | videoPath: string; // 视频路径 |
| 16 | } |
| 17 | |
| 18 | export const VideoSchema = SchemaFactory.createForClass(Video); |
| 19 |