The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/server/models/raw/Trash.ts

22 lines
616 B

import type { Db, IndexDescription } from 'mongodb';
import type { RocketChatRecordDeleted } from '@rocket.chat/core-typings';
import { BaseRaw } from './BaseRaw';
export class TrashRaw extends BaseRaw<RocketChatRecordDeleted<any>> {
constructor(db: Db) {
super(db, 'rocketchat__trash', undefined, {
collectionNameResolver(name) {
return name;
},
});
}
protected modelIndexes(): IndexDescription[] | undefined {
return [
{ key: { __collection__: 1 } },
{ key: { _deletedAt: 1 }, expireAfterSeconds: 60 * 60 * 24 * 30 },
{ key: { rid: 1, __collection__: 1, _deletedAt: 1 } },
];
}
}