first commit v3 initialiazed a temporary repository for darmanet client

This commit is contained in:
2026-09-08 16:04:01 +03:30
commit 5c7fd95052
216 changed files with 30050 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import { Prop, Schema } from '@nestjs/mongoose';
import { Types } from 'mongoose';
import { MessagesModel } from './messages.model';
@Schema({
timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt' },
versionKey: false,
})
export class ChatModel {
@Prop({ _id: true, default: new Types.ObjectId() })
sessionId: Types.ObjectId;
@Prop({ type: String })
chatTitle: string;
@Prop({ default: false })
chatClosed: boolean;
@Prop({ default: false })
connectedToExpert: boolean;
@Prop({ default: false })
onlineChatClosed: boolean;
@Prop({ default: null })
expertRate: number | null;
@Prop({ type: String })
expert: string;
@Prop({ type: [MessagesModel], default: [] })
messages: MessagesModel[];
@Prop({ type: Date, default: Date.now })
createdAt: Date;
@Prop({ type: Date, default: Date.now })
updatedAt: Date;
}