forked from Chatbot/v3-api
first commit v3 initialiazed a temporary repository for darmanet client
This commit is contained in:
35
src/database/model/user-insurance-snapshot.model.ts
Normal file
35
src/database/model/user-insurance-snapshot.model.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
import { Types } from 'mongoose';
|
||||
|
||||
@Schema({
|
||||
timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt' },
|
||||
versionKey: false,
|
||||
collection: 'user_insurance_snapshots',
|
||||
_id: true,
|
||||
})
|
||||
export class UserInsuranceSnapshotModel {
|
||||
@Prop({ type: Types.ObjectId, required: true, unique: true, index: true })
|
||||
userId: Types.ObjectId;
|
||||
|
||||
@Prop({ type: String, required: true })
|
||||
syncBatchId: string;
|
||||
|
||||
@Prop({ type: Date, required: true })
|
||||
syncedAt: Date;
|
||||
|
||||
@Prop({ type: Object, required: true })
|
||||
user_insurance_data: Record<string, unknown>;
|
||||
|
||||
@Prop({ type: Object, required: true })
|
||||
user_installments_data: Record<string, unknown>;
|
||||
|
||||
@Prop({ type: Date })
|
||||
createdAt: Date;
|
||||
|
||||
@Prop({ type: Date })
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export const UserInsuranceSnapshotSchema = SchemaFactory.createForClass(
|
||||
UserInsuranceSnapshotModel,
|
||||
);
|
||||
Reference in New Issue
Block a user