forked from Yara724/api
33 lines
602 B
TypeScript
33 lines
602 B
TypeScript
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
|
import { Document } from "mongoose";
|
|
|
|
export type LookupDocument = LookupModel & Document;
|
|
|
|
@Schema({ versionKey: false, collection: "lookups", timestamps: true })
|
|
export class LookupModel {
|
|
@Prop({ required: true })
|
|
url: string;
|
|
|
|
@Prop({ required: true })
|
|
authenticationToken: string;
|
|
|
|
@Prop({ required: true })
|
|
name: string;
|
|
|
|
@Prop({ type: Object, required: true })
|
|
response: any;
|
|
|
|
@Prop()
|
|
createdAt: Date;
|
|
|
|
@Prop()
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export const LookupSchema = SchemaFactory.createForClass(LookupModel);
|
|
|
|
|
|
|
|
|
|
|