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,77 @@
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { QuestionsModel } from './questions.model';
export interface UpdatedBy {
name: string; // User's mobile number
updatedAt: {
time: string; // Time of update
date: string; // Date of update
};
}
@Schema({
timestamps: false,
versionKey: false,
collection: 'dictionaries',
_id: true,
})
export class DictionariesModel {
@Prop({ type: String })
title: string;
@Prop({ type: 'string' })
category: string;
@Prop({ type: String })
type: 'Regulation' | 'Method';
@Prop()
questions: QuestionsModel[];
@Prop({ type: Boolean })
isActive: boolean;
@Prop({ type: [String] })
fileId: string[];
@Prop({ type: String })
icon: string;
@Prop({ type: String, required: false })
aiCollectionId: string;
@Prop({ type: String, required: false })
aiCollectionName: string;
/** Cached from AI get-collections-with-descriptions / get-collection-description. */
@Prop({ type: String, required: false })
description?: string;
@Prop({ type: [String], default: [] })
keywords?: string[];
/**
* Sync bookkeeping vs AI SoT.
* ok | missing | deactivated | stale
*/
@Prop({ type: String, required: false, default: 'ok' })
aiSyncStatus?: string;
@Prop({ type: Date, required: false })
lastSyncedAt?: Date;
@Prop({ type: Array })
createdAt: [];
@Prop({ type: Date })
createdISO: Date;
@Prop({ type: Date })
updatedAt: Date;
@Prop({ type: [Object] })
updatedBy: UpdatedBy[];
}
export const DictionariesSchema =
SchemaFactory.createForClass(DictionariesModel);