File size: 548 Bytes
086ee97
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { Schema } from "mongoose";
import { registerModel } from "./register-model";

// Retain the send fence permanently. GitHub, not this collection, schedules jobs.
const schema = new Schema({
  dispatchId: { type: String, required: true, unique: true },
  inputSha256: { type: String, required: true },
  receipt: { type: Schema.Types.Mixed, required: true },
}, { collection: "test_dispatches", timestamps: true });
schema.index({ "receipt.createdAt": -1 });
export const TestDispatchModel = registerModel("TestDispatch", schema);