forked from Chatbot/v3-api
21 lines
467 B
TypeScript
21 lines
467 B
TypeScript
import { Prop, Schema } from '@nestjs/mongoose';
|
|
import { Types } from 'mongoose';
|
|
|
|
@Schema({
|
|
timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt' },
|
|
versionKey: false,
|
|
})
|
|
export class RateModel {
|
|
@Prop({ _id: true, default: new Types.ObjectId() })
|
|
sessionId: Types.ObjectId;
|
|
|
|
@Prop({ type: String })
|
|
rate: string;
|
|
|
|
@Prop({ type: Date, default: Date.now })
|
|
createdAt: Date;
|
|
|
|
@Prop({ type: Date, default: Date.now })
|
|
createdAtDate: Date;
|
|
}
|