huridocs/uwazi

View on GitHub
app/api/sync/syncsModel.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import mongoose from 'mongoose';
import { MultiTenantMongooseModel } from 'api/odm/MultiTenantMongooseModel';

const syncSchema = new mongoose.Schema({
  lastSyncs: { type: mongoose.Schema.Types.Mixed, default: {} },
  name: String,
});
export interface Sync extends mongoose.Document {
  lastSyncs: { [key: string]: number };
  name: string;
}

export default new MultiTenantMongooseModel<Sync>('syncs', syncSchema);