mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
refactoring dashboard
This commit is contained in:
16
dashboard/shared/schema/anomalies/AnomalyVisitSchema.ts
Normal file
16
dashboard/shared/schema/anomalies/AnomalyVisitSchema.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
|
||||
export type TAnomalyVisit = {
|
||||
project_id: Schema.Types.ObjectId
|
||||
visitDate: Date,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
const AnomalyVisitSchema = new Schema<TAnomalyVisit>({
|
||||
project_id: { type: Types.ObjectId, required: true },
|
||||
visitDate: { type: Date, required: true },
|
||||
created_at: { type: Date, required: true },
|
||||
})
|
||||
|
||||
export const AnomalyVisitModel = model<TAnomalyVisit>('anomaly_visits', AnomalyVisitSchema);
|
||||
Reference in New Issue
Block a user