07c827e9fd
[web] last infrastructure conversions GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
19 lines
444 B
JavaScript
19 lines
444 B
JavaScript
import mongoose from '../infrastructure/Mongoose.mjs'
|
|
|
|
const { Schema } = mongoose
|
|
|
|
const DocSnapshotSchema = new Schema(
|
|
{
|
|
project_id: Schema.Types.ObjectId,
|
|
doc_id: Schema.Types.ObjectId,
|
|
version: Number,
|
|
lines: [String],
|
|
pathname: String,
|
|
ranges: Schema.Types.Mixed,
|
|
ts: Date,
|
|
},
|
|
{ collection: 'docSnapshots', minimize: false }
|
|
)
|
|
|
|
export const DocSnapshot = mongoose.model('DocSnapshot', DocSnapshotSchema)
|