refactor(dlq): inline DLQItemDocumentBase into DLQItemDocument
This commit is contained in:
1 parent
214fc4899c
commit
a895912b99
1 file changed
+2
-5
@@ -1,16 +1,13 @@
|
|||||||
import { Schema, model, type Types } from "mongoose";
|
import { Schema, model, type Types } from "mongoose";
|
||||||
import { DLQItemTypes, DLQItemStatuses, type DLQItem } from "@/types/dlqItem.js";
|
import { DLQItemTypes, DLQItemStatuses, type DLQItem } from "@/types/dlqItem.js";
|
||||||
|
|
||||||
type DLQItemDocumentBase = Omit<DLQItem, "id" | "monitorId" | "teamId" | "nextRetryAt" | "createdAt" | "updatedAt"> & {
|
export interface DLQItemDocument extends Omit<DLQItem, "id" | "monitorId" | "teamId" | "nextRetryAt" | "createdAt" | "updatedAt"> {
|
||||||
|
_id: Types.ObjectId;
|
||||||
monitorId: Types.ObjectId;
|
monitorId: Types.ObjectId;
|
||||||
teamId: Types.ObjectId;
|
teamId: Types.ObjectId;
|
||||||
nextRetryAt: Date;
|
nextRetryAt: Date;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
};
|
|
||||||
|
|
||||||
export interface DLQItemDocument extends DLQItemDocumentBase {
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const DLQItemSchema = new Schema<DLQItemDocument>(
|
const DLQItemSchema = new Schema<DLQItemDocument>(
|
||||||
|
|||||||
Reference in new issue
Block a user